Professional Documents
Culture Documents
49~2, 1989
Printed in Great Britain. All rights reserved
1. INTRODUCTION
(DAOP1)
x,U~t),z(t)
s.t.
t~[0, 11,
z ( o ) = Zo,
xL <~x <<.X U,
U L <~ U(t) <~ U U,
Z L <~Z ( t ) <~Z U,
where:
= an objective function,
g, c = inequality and equality design constraint
vectors,
x = decision variable vector,
Z ( t ) = state profile vector,
U(t) = control profiles,
50
x L, x U = variable bounds,
U L, U U = control profile bounds,
Z L, Z u = state profile bounds.
The differential-algebraic optimization problem
(DAOP1), as stated, cannot be solved directly by
typical nonlinear programming techniques or optimal
control methods. One cannot optimize continuous
profiles directly with an NLP technique, nor is it
possible to impose bounds and/or general constraints
involving Z ( t ) and U(t). Even when the profiles are
discretized and treated as decision variables, repeated, and often expensive, solution of the DAE
model (probably with a large number of sensitivity
equations) is still required here. Optimal control
methods, on the other hand, will deal with continuous control profiles but normally cannot handle
general algebraic constraints (such as c or g).
In the following sections we present and justify a
method for the solution of (DAOP1), especially for
biochemical reactor problems. In the next section a
form of discretization is presented which converts the
differential equations to a set of algebraic equations.
Here orthogonal collocation is applied to finite elements for the purpose of handling discontinuous
control profiles. Following this, stability and accuracy properties, which normally apply to numerical
integration techniques, will be discussed as they apply
to orthogonal collocation: In addition, an equivalence between the Kuhn-Tucker conditions and
variational conditions will be derived for a wide class
of differential-Mgebraic optimization problems
(DAOPs). The last section deals with the optimization of a fed-batch reactor. In the simplest case it is
seen that solutions are found that compare well with
an analytically-based solution. More complex cases
are then solved and presented which do not have
analytic solutions.
PROGRAMMING PROBLEM
te[0, 11,
(1)
z ( 0 ) = z0.
,=02Z'ff)i(t)
where
~ (t -- t~)
Oi(t) = k~=.o,,~, Z tk)'
(2)
where
R(ti) = ~.
2)~y(ti) - - F ( X ,
3=0
i = 1. . . . K,
(4)
with z0 = Z0.
Using the ODE model (4), (DAOP1) becomes:
rain cb(x, ui, zi),
(NLP1)
x,ut,zr
s.t.
i = 1 . . . . . K,
Z0 ~ Z 0 ,
xL<x
<.X U,
Z 1 <~z~ <<,Z U
zr+ E(t) =
uL <~ u~ <~ U U,
2. D I S C R E T I Z A T I O N O F DAOP1 T O A N O N L I N E A R
Zk+l(l),
t(~/+ j --
i=1 ..... NE
for
(t -- tt,kl)
k = Ij (tt01 -- tt~kl)
for i = 1. . . . . N E .
The discretized residual or collocation equations
can be written down immediately from (4) as:
K
NE,
(6)
z~+ ~ ( t ) = ~ zto~(~to~(t)
j=0
qS[0~(t) = ~bj(t) = l f I
(t - t[,k])
= ou (tto~ -- tli~])'
0,
j=O
l = 1 . . . . . K,
(9)
i = 1. . . . . N E ,
j = 0 . . . . . K,
l = 1 . . . . . K.
i=1,
i = 1 . . . . . N E , j = 0 . . . . . K. (5)
It is convenient at this point, in order to save a
considerable amount of rewriting, to define the expression ( i - 1 ) ( K + 1 ) + j by the label i/J]. This
label, [ij] - (i - 1)(K + 1) + j , is not to be confused
with the commonly-used double subscripts for
matrices (e.g. A~ meaning the element in the ith row
and j t h column). F o r an equivalent derivation of
finite-element collocation which uses matrix notation
see Finlayson (1980). Furthermore, the indices i and
j can themselves take on other characters when the
context requires it. F o r example, [ i - lk] becomes
(i-2)(K+l)+k
for some i and k, and [ i l ] =
(i - 1)(K + 1) + 1 for some i. With this convention
(5) becomes:
j = 0 . . . . . K.
(8)
~Ot0](t) = x x
tE[~j,c~,+l].
i = 1. . . . .
utol~tol(t)
j=l
j=0
u ~ t ) = Y~
K
. . . .
~j(t,)
l~ ~tti~) = L z~,jj~
~,)
51
(7)
.,NE,
/ = 1 . . . . . K.
(10)
with Zcl0j= Z 0.
In (10) the expression dp;(tt) can be easily calculated
offline (see Villadsen and Michelsen, 1978) since it
depends only on the Legendre root locations. Now,
assuming for the moment the variables ct~, x and ut~~
are fixed, (10) is composed of M [ N E ( K ) + 1] equations and M [ N E ( K + 1)] state coefficients. To make
the system well-posed, an additional set of
M(NE
1) equations is written to make the polynomials z ' r + l ( t ) continuous at the interior knots ct~,
i = 2 . . . . . N E . This is done by enforcing:
-
i = 2.....
NE,
(11)
"or equivalently:
K
z[,0]= ~zt~
tj3qSj(t=l)
(12)
3=0
52
UL<~uix(~,+I)<~ U
i = 1 . . . . . NE.
3. P R O P E R T I E S
u~i)
= ~ utol~l'j(t = O)
i = 1. . . . .
NE
j=l
and
K
u~i+l)=
~ ulo]~j(t = 1)
i = 1. . . . . NE.
j=l
(NLP2)
x,uId],zpl]~t~
s.t.
R(tti~ ) = 0 ,
i=l ..... NE
L = I .....
Z[10] = Z 0 ,
K
i = 2. . . . . N E
j=0
x L ~<'x ~<x U,
U L ~< ut~.,] ~< U U,
Z L ~ Ztil] ~ Z U.
i=l ..... NE
In this formulation the knot positions, ct~,are formulated as decision variables and found by the optimization procedure as points of control profile
discontinuity. As expected, state profiles remain continuous because of the continuity constraints. With
the knot positions as decision variables, we now have
an accurate and efficient strategy to solve very general
and difficult optimal control problems, as long as
orthogonal collocation approximates the state
profiles accurately within each element.
In the next section we will justify the assumption
that the state profiles can be accurately approximated
by discussing both stability and accuracy properties
of orthogonal collocation. Here we show that solving
the differential equations via orthogonal collocation
is equivalent to performing a fully implicit RungeKutta integration at Gaussian roots.
O F T H E N L P STRATEGY
j~(t)= 2y(t),
Vy, z,
(14)
Vy, z, t.
53
U(t),z(t)
+
s.t.
(DAOP2)
c[U(t), z ( t ) ] = o,
c:[Z(b)] =
0,
Z ( a ) = Zo.
54
min q'(z:) + ~
U[tl]'2[il]'~t
~ w[iAd2)(g[iA,uD])
(NLP3)
i= 1 j~ 1
NE
Icf~ + i
i=l
-- E
~T+ l~X+ I dt
NE
=-E
E 'qol
" ':+
[01~K+l(t[01)
i=lj=l
c(zto ~, uto~) = O,
gaze) <. o,
_f,,+l,,
T ,a*
~ g + I'~K+ 1 d t = - 2 Kr+ l(OCi+ 1)ZK+ l(~i+ 1)
cA:) = o,
Z[lol- Zo = 0,
l : ~ =i]0
Z[i0] - z i -K+lk
Zf--
NE
aK+
i=2,.
''
I(~NE+ 1) = O.
K
T
"
i=lj~l
T
T
+ I%~g(ztol, ut01) + v[olc(,.[o1, ut01)]
+ {~,(z:)+/(g:(z:) + ~fc:(=:)}
NE
i=1
NE+ 1
--
i=2
1Zf"
To simplify this function we first consider the optimality conditions for the continuity variables zt~01.By
noting that, from (1 1) and (12):
K
z~,-+11(~,) = E =t,-1,loci(t = 1)
j=0
i=lj=l
i = 2 . . . . . NE,
(3L
NE
~z[iol
=0
i=2
[0~
(12)
~T
,NE.
1)]"
(15)
Note that we have defined the Kuhn-Tucker multipliers (2, p and v) differently than usual, but equivalently, by including the positive quadrature weights,
wt,jl. In addition, we assume that the adjoint variable
profile can be approximated as 2x+ ~(t), a continuous,
piecewise polynomial function of the same order as
zK+l(t) with 2K+~(ti,s~)=2tu 1. Now since -~K+l is a
piecewise polynomial of order K, we can make the
following equivalence by noting that K-point Gaussian quadrature is exact for polynomial integrands of
i=I,...,NE.
L = ~ y. w[,A[4)(ttol) + 2[rlF(ttol)
i=lj=l
T
T
.,
+ ztr~2x+
l(t[02) + #[olg(ztik, ulif) + v[o2c(-lo 2, utiA)]
8(ti'Jl) + /\/0F(t['J])|2.
U(t)
) M T D,+ ,(tto )
s.t.
Og
~l-lr
r+lt~,)--2K+l(Ctl)
aufm
Oc
i=2,...,NE;
k auiol )
\ ouiow
fo
Z ( t ) = F[Z(t), U(/)]
, Ocs
(c)
(d)
2K+ l(cq) = 0
(e)
O~ OF
~+~-~A
=0,
+ 08-~M
A(b)=0,
qf=
ArE
z" K +
I(~NE+ 2)'
g(ztv], ulvj) ~ O,
c(zto1, utol) = 0;
(g)
Z(a) = Z 0,
--7:-+',(c<,) = "r+
-' 1(~,) i = 2 . . . . ,NE,
(f)
(SCP1)
g[Z(t)] <<.o.
8~
O~+Ogs
55
Cr(Zf)= 0,
gi(zi) <<.o;
(h)
#f,/xtu~>/0;
(i)
r
_
~t01[g(~t0], ut01)] = 0,
ufgi(zr) = o.
We now see that (a) is a discrete analog of the
adjoint equations which can easily be derived from
standard optimal control theory. They can also be
obtained directly by applying orthogonal collocation
on finite elements to the adjoint equations. Similarly,
(b) is a discrete analog of the variational conditions
on the control profiles while (c) and (d) represent
relationships on the final and initial conditions, respectively, for the adjoint variables. Finally, (e-g) are
simply feasibility conditions for the ODEs and the
problem constraints and the remaining expressions
relate to the optimality conditions for the inequality
constraints.
Note that, except for the conditions on purely state
variable constraints [e.g. g(Z(t)) <~0], all of the above
equations are discrete analogs of the conditions
found in Bryson and Ho (1975) for variational problems. To deal with state variable constraints, variational conditions have traditionally been defined
using higher time derivatives of these constraints in
order to express them as functions of the control.
This approach has often been used in order to
facilitate analytic solution of the optimal control
problem. On the other hand, Jacobson et al. (1971)
derived alternate conditions for state variable con-
M(t)rg[Z(t)] =0,
M ( t ) >>-O,
(e)
Z(a) = Zo,
J. E. CUTHRELLand L. T. BIEGLER
56
_(
mrs
\Km+S ]
U
+(1-S/SF)~,
(BFP)
l?(t) = U/Sr
V(O) = 7 l,
S
P(S)=Pmax K p + S ( l + S / K i n ~ '
0 ~ X(t) ~ 40 g 1-~,
O ~ S(t) ~ 100g1-1,
0 4 V ( t ) ~ 101,
0<~ U(t)<~ 5 O g S h -1,
72 ~< T ~ 200 h,
where:
#(X, S) = growth rate of biomass (h -1)
p (S) = production rate of penicillin
(g p g 1X-h-i),
#max = 0.11 h -1
Pmax = 0.0055 g P g-I X-h 1,
Kx = 0.006 g S g - t X,
Kp = 0.0001 g S 1-1,
Kin = 0.1 g S 1-1,
U(t),T
X(t)=p(X,S)X-
~FV U X ( 0 ) = l . 5 g 1 - 1 ,
P
"(t) = p ( S ) X -- KdevP -- ( ~ F V ) U
P(0) = 0.0 g 1-1,
U(t),Sf
Ye/s = 1.2 g X g -1 S,
S r = 5OOgS1-1.
It is important to point out that two differences
exist between the above formulation and that cited in
Lim et al. (1986). Both differences are due to inconsistencies in the Lim et al. (1986) paper (Modak,
1987). First, the maintenance term in the substrate
equation was changed from 0.029X [cf. (23) p. 1414
Lim et aL, 1986) to 0.029S/(K m + S). Secondly, the
value of 0.004 [cf. (22) ibid.] was corrected to 0.0055
for/)max' It should be noted that the above corrections
must be made (Modak, 1987) in order to reproduce
the results given in Fig. 2 of Lim et al. (1986). For
more details about this fermenter problem the interested reader is also referred to Bajpai and Reuss
(1980, 1981).
57
6O
50
45
50
40
-~ 40
35
5o
~ 30
25-~
20
~_
15 -
2O
10 5
I
20
I
40
I
60
I
80
I
100
I
120
10
0
I
140
I
40
I
60
I
80
11
Time (h)
10
A
35
i_.
30
O~
25
oL
20
40
60
80
100
120
140
10 I,
,..m
9 8 -
6 -i 7-
'=
uo
4-3--
I1_
I
0
20
I
Time (h)
_,=
o
>
6
0
I
20
I
100
I
120
I
140
T i m e (h)
58
3/4
3/3
3/4
3/3
11.21, 28.79
20, 50
20, 50
20, 40
124.9
80
80
80
-82.90
- 73.07
- 73.98
134.39
J~
8
"6
40
35
30
25
~ 2o
m o d i f i e d by c h a n g i n g t h e s u b s t r a t e u p p e r b o u n d to
S ( t ) <~25.0. Finally, in C a s e IV a m o r e c o m p l e x
objective f u n c t i o n was used t h a t includes the penicillin yield a n d b a t c h time as well as the cost o f the
feed solution, a n d reflects the n e t profit o f t h e p r o c e s s
p e r batch:
= - 2 . 5 x I O - 2 P ( T ) V ( T ) + 168T
o
u
15
1(3
L_,
U(t) dt.
+ 8.5 x 10 .4
O
10
--
--
40
60
80
I00
120
140
o=
5
2
1
[
20
Time (h)
20
to
I
50
45
k~
40
35
30
25
11
lO
20 15
10
20
I
40
I
I
60
80
Time (h)
[
I 00
I
120
t40
6
0
I
20
40
60
80
100
120
140
T i m e (h)
r~
4"
128.29
126.34
132.14
72.0
- 87.83
-87.79
-87.69
120.95
50
45
25
40
A
Ic::
35
~
2
30
20
~ z5
o 20
o
,,~ 15
10
g,
0
20
40
100
120
140
11
60
eo
Time (h)
40
35
o= 30
~ 25
E
~, lO
o
II1
I
40
I
60
I
80
I
100
I
120
I
140
7
6
....
0
I
20
Time (h)
45
40
~ 25
4
3
20
,,~ 15
10
2
fl_
38
lO
lO
From the optimal profiles (Figs 5-7) and parameters (Table 2) obtained in Case I it can be seen
that solutions found with the proposed math programming approach are close to the analyticallybased solution. Here slight differences can be seen in
the math programming results. For example, the
control profile is not at its bounds during the first two
feeding periods, the substrate profile attains a slightly
lower peak value, and the biomass profile has a
slightly altered slope after ~ 30 h. However, in both
cases the volume is at its upper bound at final time
and the product profiles are almost identical. Also,
the optimal objective function value, final time value
and knots for the NLP solution differ only by a small
amount: -87.83, 128.29 and 11.46 and 29.29 vs
-87.05, 124.9 and 11.21 and 28.79 from the Lira
solution. This represents an improvement in the objective function over the analytically-based solution.
This improvement is worth noting because the state
59
35
30
1
o
20
40
60
8o
lOO
12o
I
14o
Time (h)
13/1-2--E
I
20
[
40
I
60
I
80
I
1 O0
I
120
T i m e (h)
Fig. 11. C o n t r o l p r o f i l e f o r Case I I I .
I
140
60
J. E, CUTHRELLand L. T. BIEGLER
40 -
45
35
40
35
30
J=
30
25
2O
ZO
15
t0
5
o
m
10
20
30
40
50
I
60
I
70
I
80
Time (h)
1o
J...~
7 "~
--
o 4
:~
--
I
20
40
60
80
100
120
I
140
Time (h)
25
40
I._,
20
o=
"~
L.,
35
30
15
25
20
c
oo
.Q
g,
I
-5
o
IO
~
9
b~ e
._~ r
11
lO
~ 9
>o
15
--
O.
30
40
50
60
70
7
6
20
40
60
80
100
120
140
Time (h)
Fig. 13. Substrate and volume profiles for Case I I l .
10
20
80
Time (h)
i._,
2o
o
15
5~
L
11
61
(1986). Here we easily enforced S(t) <<,25.0 and obtained both good results in terms of the optimal
control profile and the state profile approximation
accuracy.
Finally, in Case IV use of a different objective
function results in an optimal batch time of 72 h (its
lower bound) and optimal knots at 18.54 and 32.60.
Observe again (Figs 14--16) that excelllent results are
obtained in terms of the accuracy of the state profiles,
and a final Kuhn-Tucker error of 7.02 x 10 -s was
obtained. Note that in this case the final volume is not
at its upper bound.
4.3. Comparison o f computation aspects
10
9
3
>
f
I
10
I
20
[
30
I
40
I
50
I
60
I
70
I
80
Time (h)
The approach presented here for solving discontinuous control problems offers a number of advantages over other methods. Alternate solution
methods for problems of this type couple a DAE
(differential-algebraic) solver to an optimization
routine. The DAE solver integrates the model in an
inner loop while the optimizer functions in an outer
loop to perform the optimization. This approach
can be quite expensive, particularly if a gradient
based optimizer (e.g. SQP) is used. In this case, the
required gradients will likely be obtained through
perturbation of the model, or through sensitivity
equations. On the other hand, Lim et al. (1986)
applied variational conditions to (BFP) and had to
solve a two-point boundary-value problem. Here they
repeatedly used a shooting method coupled with
LSODE to optimize their profile, although this only
had to be done over the final feeding portion of the
batch.
Just as important as the above difficulties, is the
inability of DAE solvers to explicitly handle inequalities, such as profile bounds. In the work of Modak
et al. (1986) and Lim et al. (1986), the bounds on the
control profile were handled implicitly, by knowing
the portions of reaction time over which these bounds
were active. The condition on the tank volume
could, however, be considered an upper bound, but
this was also handled implicitly by setting the
flowrate to zero when the tank was full. For handling
inequality constraints with an ODE (or DAE) solver,
only one other option exists, that of Sargent and
Sullivan (1977). However, even this approach does
not overcome the problem of potentially-expensive
solutions.
Our approach, on the other hand, formulates a
discrete version of (BFP) as an NLP, and the above
difficulties are not encountered. However, two important considerations with our approach involve the
choices of K and N E and solution of the resulting
large-scale nonlinear program. The first problem is
currently handled by a trial and error solution. The
second problem can be remedied by using large-scale
SQP decomposition methods (see Vasantharajan and
Biegler, 1988; Locke et al., 1983). These problems
form the basis for future research.
J. E. CUTHRELLand L. T. BIEGLER
62
5. CONCLUSIONS
Ascher U. and G. Bader, Stability of collocation at Gaussian points. SIAM J. Numer. Anal. 23, 412-422 (1986).
Bajpai R. K. and M. Reuss, A mechanistic model for
penicillin production. J. Chem. Technol. Biotechnol. 30,
332-344 (1980).