computers & chemical engineering volume 28 issue 8 2004 [doi 10.1016_j.compchemeng.2003.09.003]...

12
Computers and Chemical Engineering 28 (2004) 1325–1336 A new robust technique for optimal control of chemical engineering processes Simant R. Upreti Department of Chemical Engineering, Ryerson University, Toronto, Ont., Canada M5B 2K3 Received 1 August 2002; received in revised form 1 September 2003; accepted 3 September 2003 Abstract A new optimal control technique is presented to provide good quality, robust solutions for chemical engineering problems, which are generally non-linear, and highly constrained. The technique neither uses any input of feasible control solution, nor any auxiliary condition. The technique generates optimal control by applying the genetic operations of selection, crossover, and mutation on an initial population of random, binary-coded deviation vectors. Each element of a deviation vector corresponds to a control stage, and is a deviation from some “mean” control value randomized initially for that stage. The deviation, and the mean control value map on to the actual discrete step value of control at that stage. The mapping is logarithmic in beginning, but is later allowed to alternate with a linear one. The genetic operations are periodically followed by the replacement of mean control values by a newly available optimal control solution, and by the size-variation of control domain between its limits. The optimal control technique is successfully tested on four challenging problems of chemical engineering. © 2003 Elsevier Ltd. All rights reserved. Keywords: Non-linear systems; Optimal control; Genetic algorithms 1. Introduction The optimal control of chemical engineering processes offers the realization of high standards of product purity, op- erational safety, and environmental regulations in addition to reduction in production costs. Given a wide spectrum of op- timal control applications (Biegler, Cervantes, & Wächter, 2002), there has been a vigorous effort in the last 10 years to develop efficient optimal control techniques. These tech- niques are based on variational calculus using Pontryagin’s maximum principle (Pontryagin, Boltyanskii, Gamkrelidge, & Mishchenko, 1962), dynamic programming (first applied by Luus, 1990), non-linear programming (summarized by Biegler et al., 2002), and search. While the variational tech- niques require gradient information, the programming tech- niques rely on either gradient information, or enumeration (direct or stochastic). The search techniques use direct search (Luus & Hennessy, 1999), semi-exhaustive search (Gupta, 1995), or evolutionary search (Lee, Han, & Chang, 1997; Lee, Han, & Chang, 1999; Wang & Chiou, 1997). Tel.: +1-416-979-5000x6344; fax: +1-416-979-5044. E-mail address: [email protected] (S.R. Upreti). The determination of optimal control can be very difficult, and open-ended due to frequent presence of non-linearity in process models, inequality constraints on process vari- ables, and implicit process discontinuities (Barton, Allgor, Feehery, & Galán, 1998). This presence gives rise to a multimodal, and non-continuous relation, or functional, be- tween a performance index and a control function. The gradient-based techniques are limited to unimodal and con- tinuous functionals. For multimodal, and non-continuous functionals, the results of these techniques are sensitive to starting points. The enumeration-based techniques, on the other hand, suffer from unreasonably tremendous amount of performance index evaluations, even for modestly sized optimal control problems. The search techniques mentioned above, carry out reasonable amount of performance index evaluations with different sizes of control domain, and com- binations of several control functions. With this approach, these techniques try to increase the probability of generating optimal solutions. A good optimal control technique, especially when ap- plied for the first time on a particular process, should 1. provide consistent, good quality results regardless of starting points; 0098-1354/$ – see front matter © 2003 Elsevier Ltd. All rights reserved. doi:10.1016/j.compchemeng.2003.09.003

Upload: asimilatrix

Post on 16-Sep-2015

3 views

Category:

Documents


0 download

DESCRIPTION

dgdf

TRANSCRIPT

  • Computers and Chemical Engineering 28 (2004) 13251336

    A new robust technique for optimal controlof chemical engineering processes

    Simant R. Upreti

    Department of Chemical Engineering, Ryerson University, Toronto, Ont., Canada M5B 2K3Received 1 August 2002; received in revised form 1 September 2003; accepted 3 September 2003

    Abstract

    A new optimal control technique is presented to provide good quality, robust solutions for chemical engineering problems, which aregenerally non-linear, and highly constrained. The technique neither uses any input of feasible control solution, nor any auxiliary condition.The technique generates optimal control by applying the genetic operations of selection, crossover, and mutation on an initial population ofrandom, binary-coded deviation vectors. Each element of a deviation vector corresponds to a control stage, and is a deviation from somemean control value randomized initially for that stage. The deviation, and the mean control value map on to the actual discrete step valueof control at that stage. The mapping is logarithmic in beginning, but is later allowed to alternate with a linear one. The genetic operations areperiodically followed by the replacement of mean control values by a newly available optimal control solution, and by the size-variation ofcontrol domain between its limits. The optimal control technique is successfully tested on four challenging problems of chemical engineering. 2003 Elsevier Ltd. All rights reserved.

    Keywords: Non-linear systems; Optimal control; Genetic algorithms

    1. Introduction

    The optimal control of chemical engineering processesoffers the realization of high standards of product purity, op-erational safety, and environmental regulations in addition toreduction in production costs. Given a wide spectrum of op-timal control applications (Biegler, Cervantes, & Wchter,2002), there has been a vigorous effort in the last 10 yearsto develop efficient optimal control techniques. These tech-niques are based on variational calculus using Pontryaginsmaximum principle (Pontryagin, Boltyanskii, Gamkrelidge,& Mishchenko, 1962), dynamic programming (first appliedby Luus, 1990), non-linear programming (summarized byBiegler et al., 2002), and search. While the variational tech-niques require gradient information, the programming tech-niques rely on either gradient information, or enumeration(direct or stochastic). The search techniques use direct search(Luus & Hennessy, 1999), semi-exhaustive search (Gupta,1995), or evolutionary search (Lee, Han, & Chang, 1997;Lee, Han, & Chang, 1999; Wang & Chiou, 1997).

    Tel.: +1-416-979-5000x6344; fax: +1-416-979-5044.E-mail address: [email protected] (S.R. Upreti).

    The determination of optimal control can be very difficult,and open-ended due to frequent presence of non-linearityin process models, inequality constraints on process vari-ables, and implicit process discontinuities (Barton, Allgor,Feehery, & Galn, 1998). This presence gives rise to amultimodal, and non-continuous relation, or functional, be-tween a performance index and a control function. Thegradient-based techniques are limited to unimodal and con-tinuous functionals. For multimodal, and non-continuousfunctionals, the results of these techniques are sensitive tostarting points. The enumeration-based techniques, on theother hand, suffer from unreasonably tremendous amountof performance index evaluations, even for modestly sizedoptimal control problems. The search techniques mentionedabove, carry out reasonable amount of performance indexevaluations with different sizes of control domain, and com-binations of several control functions. With this approach,these techniques try to increase the probability of generatingoptimal solutions.

    A good optimal control technique, especially when ap-plied for the first time on a particular process, should

    1. provide consistent, good quality results regardless ofstarting points;

    0098-1354/$ see front matter 2003 Elsevier Ltd. All rights reserved.doi:10.1016/j.compchemeng.2003.09.003

  • 1326 S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336

    2. use a reasonable amount of performance index evalua-tions.

    The results of such a technique will provide better startingpoints for problem-specific techniques to fine tune the re-sults, and check their globality. Chemical engineers furtherdesire the ease of implementation and programming, mini-mum restrictions and auxiliary conditions, and freedom fromanalytical and error-prone derivatives.

    In this work, a new optimal control technique is presentedto provide robust, good quality solutions independent ofstarting points, and auxiliary conditions. The technique isbased on Genetic Algorithms (Holland, 1975), which simu-late the evolution of living beings. These algorithms generaterobust optimal solutions (Goldberg, 1989a) by stochasticallyemphasizing (selecting) optimally better variable-values, re-combining (crossing over) them, and changing them slightly(mutating) in a randomly generated collection (population).The previous applications of Genetic Algorithms on opti-mal control problems include the works of Michalewicz,Janikow, and Krawczyk (1992), Seywald, Kumar, andDeshpande (1995), and Lee et al. (1997). In particular,Lee et al. (1997) applied Genetic Algorithms for the op-timal control of continuous polymerization reactors. Theyobtained better results in comparison to iterative dynamicprogramming as well as sequential quadratic programming.

    Explained later in Section 3, the presented optimal con-trol technique applies genetic operations on a population ofrandom, binary-coded deviation vectors. An element of a de-viation vector carries the value of deviation of control fromits mean value. A control vector is mapped to each devia-tion vector, and a vector of randomly initialized mean con-trol values. Each element of these vectors corresponds to acontrol stage. After a few repetitions of genetic operations,a newly generated optimal control vector is used to updatethe vector of mean control values, and the size of controldomain is varied within its limits. The genetic operations areapplied again. For the size-variation of control domain, itssuccessive contraction is alternated with successive expan-sion. The mapping of control vectors is kept logarithmic inthe beginning, but later on alternated with a linear one. Thesalient features of this technique, namely,

    1. the update of mean control values;2. the alternation of the size-variation of control domain;3. the alternation of control mapping;

    distinguish it from the previous applications of Genetic Al-gorithms. These features are intended to generate desir-

    umax

    ui, 2(deviation)

    0 umin u_

    i

    (mean value) (control value)u i = u i (u_i , u i, 2)

    Fig. 1. A snapshot of the ith stage mean, deviation and control values in a control domain.

    able solutions with a small population size, or equivalently,reduced performance index evaluations, and computationtimes. This outcome is promoted by the above features,which increase the diversity of population under genetic op-erations, and avoid premature convergence.

    2. Problem formulation

    The following process model is considered for optimalcontrol:dxdt

    = f (x, u), 0 t tf (1)

    In Eq. (1), x is a vector of state variables, and u is a controlfunction within some specified bounds. Both x and u arefunctions of time, t, over a given process operation time tf .State vector x is known at t = 0. Eq. (1) is subject to thesatisfaction of g, a vector of constraints on x and u.

    The objective is to obtain the optimal control function,which would optimize a given performance index J(x). Thediscrete step values of u, equispaced over process operationtime, are considered as optimization variables. These stepvalues form a control vector u.

    3. The optimal control technique

    Given Nu stages of step values for control function u, thepresented optimal control technique is applied on a problemby randomly initializing a mean control value ui for eachstage, i = 0, 1, . . . , Nu 1. At any ith stage, the step valueof control, ui, is calculable from ui, and a binary-coded de-viation ui,2 by means of some mapping. Between the con-trol limits of umin and umax, Fig. 1 shows a snapshot of ui,ui, and ui,2, the Nu values of each of which form vectors,u, u and u2, respectively. In addition to u, a population of

    u2 is also randomly generated. The mapping to calculatecontrol u from u, and any u2 in its population is describedin the next section. Logarithmic mapping is used in the be-ginning to emphasize relative precision within the elementsof u (Coley, 1999a).

    To generate an optimal control vector u, the genetic op-erations of selection, cross-over, and mutation are succes-sively applied to the population of binary-coded deviationvector u2. A value of performance index is associated witheach u2 by using its corresponding control u (as calculatedfrom the mapping) to solve the process model of a problem.

  • S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336 1327

    These performance index evaluations are done before se-lection. The value of each performance index is scaled upby raising it to a specified power, n > 1, to favor the op-timally better members of the population during selection(Goldberg, 1989b; Coley, 1999b). If any process constraintis violated for any u2, its performance index is set to zeroso that the infeasible u2 is eliminated in the next round ofselection after participating in crossover and mutation.

    After a specified number of generations, Ngen, of geneticoperations, the domain of u is contracted, and u is replacedby u following the approach of Luus and Hennessy (1999).This completes one iteration of the optimal control tech-nique. Control domain is contracted in successive iterationsuntil it reaches its minimum size, when it is expanded suc-cessively. This expansion helps in searching a better optimalcontrol vector in a bigger control domain. When the maxi-mum size of control domain is reached, its successive con-traction is resumed to let the refinement of a hopefully new,optimal control vector. In this way, successive contraction isalternated with successive expansion for the size-variationof control domain.

    When the fractional improvement of optimal performanceindex falls below a specified level, the alternation of the log-arithmic mapping with a linear mapping is enabled betweenthe iterations. The three operationsof (i) replacing u byu, (ii) alternating the size-variation of control domain, and(iii) alternating the mappingavoid premature stagnationof the population under genetic operations, and perpetuallypromote the search and refinement of an optimal controlvector. The application of the optimal control technique isterminated after a specified number of iterations.

    3.1. Mapping

    For any ith control stage, a mapping relates a binary-codeddeviation ui,2 (positive or negative) and a mean controlvalue ui to the decimal value of a control ui. Thus, a map-ping provides a control vector u corresponding to eachbinary-coded deviation vector u2 in its population. Thepresented optimal control technique uses the following log-arithmic and linear mappings:

    Logarithmic mapping: For any ith stage of control, thelogarithmic mapping provides the step value, ui = byiwhere

    b = umax umin (2)

    yi = logbui +logbD

    2Nbit 1 ui,2 (3)

    In Eq. (2), b is the logarithmic base, and umax andumin are the maximum and minimum values of controlfunction u. In Eq. (3), D is the variable value of controldomain between the limits of Dmin > 0 and b, andNbit is the number of bits specified to represent any ithelement of u2, i.e. ui,2.

    Linear mapping: The linear mapping is straightforward,and is given by

    ui = ui + D2Nbit 1 ui,2 (4)

    Logarithmic mapping emphasizes the relative order of mag-nitudes of control values at different stages. This propertyleads to an efficient search of feasible control solutions in alarge control domain with a low value of Nbit. This search isespecially important during the initial iterations of the pre-sented optimal control technique, which later on alternatesthe logarithmic mapping with the linear one to refine an op-timal control solution.

    3.2. Inputs

    The presented optimal control technique needs the fol-lowing inputs:

    1. The number of state variables, their initial values, andconstraints.

    2. The range of integration, its accuracy (), the minimumstep of integration (hmin), and the initial step of integration(hini).

    3. The number of step changes or stages (Nu) for controlfunction u.

    4. The minimum value (Dmin) of control domain, its max-imum value (Dmax), and a factor (C) to vary the size ofcontrol domain.

    5. A seed number to generate pseudo-random numbers.6. The number of inactive iterations (No) needed to start

    the alternation of the logarithmic mapping with the linearmapping.

    7. The number of iterations (Nitr) of the optimal controltechnique.

    8. The following parameters for the genetic operations ofselection, crossover, and mutation:(a) The number of bits (Nbit) to represent ui,2.(b) The number of cross-over sites (Nxsites) for any ui,2.(c) The probability of cross-over (pc).(d) The probability of mutation (pm).(e) The power index (n) to scale performance index.(f) The number of genetic generations (Ngen) every iter-

    ation.

    3.3. Algorithm

    Following is the algorithm of the presented optimal con-trol technique:

    1. Initialize,(a) u, the vector of mean values of control function for

    all Nu stages using,

    ui = umin + Ri(umax umin),0 Ri 1, i = 0, 1, . . . , Nu 1 (5)

  • 1328 S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336

    where Ri is the ith pseudo-random number obtainedfrom a pseudo-random number generator.

    (b) A population of Npop binary-coded deviation vec-tors u2 using the pseudo-random number genera-tor, where Npop = NuNbit.

    (c) The variable control domain, D = (umaxumin)/2.(d) A boolean variable (needed to enable the alterna-

    tion of logarithmic mapping with linear mapping),ALTERNATE = FALSE.

    2. Set logarithmic mapping for the genetic operations ofselection, crossover, and mutation.

    3. Carry out the following operations on the population of

    u2 for Ngen generations:(a) Performance index evaluation for each u2.(b) Selection based on scaled performance index.(c) Crossover with probability pc.(d) Mutation with probability pm.

    4. Store the resulting optimal value of performance index(J), and corresponding optimal control vector (u).

    5. Replace u by u.6. If ALTERNATE is TRUE, repeat Steps 35 once with

    linear mapping.7. If ALTERNATE is FALSE, then if for No consecutive

    iterations, the fractional change in J is less than 1%, setALTERNATE = TRUE. (This step executes only once.)

    8. If D is equal to either Dmin or Dmax, set thesize-variation factor for control domain, C = C1.(This step allows the alternation of the successivecontraction of D with its successive expansion.)

    9. Set D = CD. If D < Dmin, set D = Dmin. If D >Dmax, set D = Dmax. (This step allows the variation ofD within its limits.)

    10. Go to Step 2 until the specified number of iterations,Nitr , are done.

    4. Application and results

    The presented optimal control technique was applied tothe four problems of (i) ethanol fermentation, (ii) proteinproduction, (iii) penicillin production, and (iv) methylcy-clopentane hydroisomerization. The optimal control of theseprocesses has been attempted by several researchers, andreported to be very challenging. The parameters used bythe technique, both common and specific to the four prob-lems, are listed in Tables 1 and 2, respectively. The min-imum number of two bits was taken to represent a devia-tion value for control at any stage. This approach reducesthe population size for the deviation vectors (in Step 1(b) ofAlgorithm), and consequently, the overhead of performanceindex evaluations. To increase the diversity of the resultingsmall population, a high value of 0.2 for mutation probabil-ity was chosen. For the sake of comparison, the number ofcontrol stages, and the accuracy of integration were taken tobe same as in previous studies.

    Table 1The parameters (as described in Section 3.2) used by the presented optimalcontrol technique common to all four problems

    Nbit 2Nxsites 1pc 0.6pm 0.2n 2Ngen 10No 200Nitr 3000C 0.75Dmin 1 104

    To statistically examine the robustness of optimal controlsolutions, the technique was applied 90 times to each prob-lem. Each time for a problem, an application was initial-ized with a unique random seed to generate pseudo-randomnumbers, which were also used to carry out stochastic ge-netic operations. The subtractive method of Knuth (1973)was employed to generate these numbers. The 90 randomseeds had a varying number of digits up to nine.

    It may be noted that due to the use of stochastic ge-netic operations by the presented optimal control technique,there is always a possibility of a sudden, increased rate ofimprovement of an optimal performance index after anyspecified number of iterations. This phenomenon was wit-nessed many times during the 360 applications of the pre-sented technique, and is different than that experienced withgradient-based techniques, which progressively decrease therate of improvement. Since the application of the presentedtechnique cannot be allowed to run forever, a deterministictermination criterion of Nitr = 3000 was used. With this cri-terion, the technique took reasonable computation times forall 360 applications, and generated results, which were ingood agreement with those previously reported. When theapplications terminated, the fractional improvement of opti-mal performance index per unit iteration with this termina-tion criterion was of O(104) or less.

    To solve the differential equations of process model, thefifth-order RungeKutta Fehlberg method with CashKarpparameters, and adaptive step-size control (Press, Teukolsky,Vetterling, & Flannery, 2002) was used. The method wasprogrammed to exit immediately with zero performanceindex in case of integration failure due to any infeasi-ble control function, or any violation of constraints. Foreach problem, the resulting 90 values of optimal perfor-

    Table 2The parameters (as described in Section 3.2) used by the presented optimalcontrol technique specific to each of the four problems

    Process model hmin hini Nu

    Ethanol fermentation 1 106 1 102 0.2 20Protein production 1 107 1 102 0.2 45Penicillin production 1 106 5 103 0.2 20Methylcyclopentane

    hydroisomerization1 106 1 102 0.2 10

  • S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336 1329

    mance index, and corresponding control solutions wereanalyzed.

    The technique was coded in C++ language. The repro-ducibility of the results of the technique was established byrunning it on three different computers, and two differentcompilers (Microsoft Visual C++ 6.0, and GNU C++, gcc2.95.3-5). The reported results of this study were obtainedusing an IBM computer (Pentium III with 192 MB RAM).

    4.1. Fermentation of ethanol

    The fermentation of ethanol in a fed-batch reactor hasbeen used for optimal control by Hong (1986), Chen andHwang (1990), Luus (1993a), Hartig, Keil, and Luus (1995),Bojkov and Luus (1996), Luus and Hennessy (1999), andGupta (1995). The following model has been used for thisprocess:dx1dt

    = Ax1 ux1x4

    (6)

    dx2dt

    = 10Ax1 + u150 x2x4

    (7)

    dx3dt

    = Bx1 ux3x4

    (8)

    dx4dt

    = u (9)

    where

    A = 0.4081 + (x3/16)

    x20.22 + x2 (10)

    B = 11 + (x3/71.5)

    x20.44 + x2 (11)

    In the above model, x1 is cell mass concentration, x2 issubstrate concentration, x3 is product concentration, and x4is the liquid volume inside the reactor. The initial conditionsare:

    x1(0) = 1, x2(0) = 150,x3(0) = 0, x4(0) = 10 (12)The control function u is feed rate, which is constrained asfollows:

    0 u 12 (13)There is an additional inequality constraint on the liquidvolume,

    x4(tf) 200 (14)at the final time, tf = 63 h. The objective is to find the opti-mal control function, which would maximize the followingperformance index:

    J = x3(tf)x4(tf) (15)

    std. dev.avg.

    random seed no.

    f 1

    02

    9080706050403020100

    6

    5

    4

    3

    2

    1

    0

    Fig. 2. The fractional difference of J from its best reported value vs.randomly seeded application of the presented optimal control techniqueto ethanol fermentation.

    4.1.1. ResultsThe results of the 90 different applications of the opti-

    mal control technique are plotted in Fig. 2 as the fractionaldifferences of optimal performance index (J) from its bestreported optimal value (Jbest = 2.08411 104, Luus &Hennessy, 1999) versus seed numbers. The fractional dif-ference is given by, f = 1 J/Jbest. Thus, in the figure,a plot-point closer to abscissae denotes a more accurate re-sult. The overall accuracy of the 90 f -values is quantifiedby their low average of 1.7%, while their precision is quan-tified by their low standard deviation of 1.1% in the interval,0.445.4%.

    The maximum optimal value of Jmax = 2.074969 104 was obtained from the 90 applications. As shown inTable 3, this value, which has f = 0.44%, agrees wellwith those obtained earlier through four different optimalcontrol techniques of semi-exhaustive search (Gupta, 1995),direct-search (Luus & Hennessy, 1999), sequential quadraticprogramming (Hartig et al., 1995), and iterative dynamicprogramming (Hartig et al., 1995). The values of the optimalcontrol vector corresponding to Jmax are listed in Table 4.

    To generate Jmax, the presented optimal control techniquetook a reasonable computation time of 458 s (on the IBMcomputer) during which 1,200,000 objective function callswere made to integrate Eqs. (6)(9) from 0 to 63 h. This num-ber of calls is greater than 184,000890,000 such calls usedby the direct search technique (Luus & Hennessy, 1999),which generated the Jbest. However, as shown in Table 3,the presented technique used random initialization as againstthe specific initial control value used by the direct searchtechnique.

  • 1330 S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336

    Table 3The comparison of results for ethanol fermentation with those reported earlier using different optimal control techniques

    Technique Starting point Jmax (104) Computation time (s)Present Random 2.074969 458 (on the IBM computer)Semi-exhaustive search (Gupta, 1995) Specific u given by Luus (1991) 2.0830 3600 (on 486/33 personal computer)Direct-search (Luus & Hennessy, 1999) u = 3 for all stages 2.08411 34533710 (on Pentium/120)Sequential quadratic programming

    (Hartig et al., 1995)Random 2.0805 87840 (for 400 starting points

    on 486/66 personal computer)Iterative dynamic programming

    (Hartig et al., 1995)u = 3 for all stages 2.0836 8640 (on 486/66 personal computer)

    For the presented technique, the objective function callsreported in this work include successful as well as failedintegration attempts. Some attempts fail due to infeasiblecontrol functions, or any violation of constraints.

    4.2. Production of secreted protein

    The production of secreted protein in a fed-batch bioreac-tor has been used for optimal control by Park and Ramirez(1988), Luus (1992), and Gupta (1995). The following modelhas been used for this process:

    dx1dt

    = g1(x2 x1) ux1x5

    (16)

    dx2dt

    = g2x3 ux2x5

    (17)

    dx3dt

    = g3x3 ux3x5

    (18)

    dx4dt

    = 7.3g3x3 + u20 x4x5

    (19)

    Table 4The optimal control values, corresponding to Jmax = 2.074969 104, forethanol fermentation

    Stage (i) ui0 1.175828 1051 4.453167 1052 3.170494 1043 2.111250 1014 9.937975 1015 1.3254106 1.3445057 1.7548478 1.8767979 2.731385

    10 2.48184911 3.96607912 3.82615913 4.68525214 6.38186615 6.54918416 1.018872 10117 1.199999 10118 9.340255 10519 4.797458 106

    dx5dt

    = u (20)

    where

    g3 = 21.87x4(x4 + 0.4)(x4 + 62.5) (21)

    g2 = x4 exp(5x4)0.1 + x4 (22)

    g1 = 4.75g30.12 + g3 (23)

    In the above model, x1 and x2 relate to the concentrationof secreted and total protein, respectively. x3 and x4 denotethe concentration of cell and glucose, respectively. x5 is thevolume of the reactor. The initial conditions are:

    x1(0) = x2(0) = 0, x3(0) = 1,x4(0) = 5, x5(0) = 1 (24)The control function u is feed rate, which is constrained asfollows:

    0 u 2 (25)The objective is to find the optimal control function, whichwould maximize the following performance index:

    J = x1(tf)x5(tf) (26)at the final time, tf = 15 h.

    4.2.1. ResultsThe results of the 90 different applications of the optimal

    control technique are plotted in Fig. 3 as fractional differ-ences of optimal performance index from its best reportedoptimal value (Jbest = 3.2686867 101, Luus & Hennessy,1999) versus seed numbers. The overall accuracy of the 90f -values is quantified by their low average of 0.77%, whiletheir precision is quantified by their low standard deviationof 0.27% in the interval, 0.292.0%.

    The maximum optimal value of Jmax = 3.259277 101 was obtained from the 90 applications. As shown inTable 5, this value, which has f = 0.29%, agrees wellwith those obtained earlier through three different optimalcontrol techniques of variational calculus (Park & Ramirez,1988), direct-search (Luus & Hennessy, 1999), and iterative

  • S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336 1331

    std. dev.avg.

    random seed no.

    f 1

    02

    9080706050403020100

    2.5

    2

    1.5

    1

    0.5

    0

    Fig. 3. The fractional difference of J from its best reported value vs.randomly seeded application of the presented optimal control techniqueto protein production.

    dynamic programming (Luus & Hennessy, 1999). The val-ues of the optimal control vector corresponding to Jmax arelisted in Table 6.

    To generate Jmax, the presented optimal control techniquetook a reasonable computation time of 1,244 s (on the IBMcomputer) during which 2,700,000 objective function callswere made to integrate Eqs. (16)(20) from 0 to 15 h. Thisnumber of calls is higher than 1,600,0002,100,000 suchcalls used by the direct search technique (Luus & Hennessy,1999), which generated the Jbest. However, as shown inTable 5, the presented technique used random initializationas against the specific initial control value used by the directsearch technique.

    4.3. Production of penicillin

    The production of penicillin in a fed-batch reactor hasbeen used for optimal control by Lim, Tayeb, Modak, andBonte (1986), Cuthrell and Biegler (1989), Luus (1993b),Mekarapiruk and Luus (1997), Luus and Hennessy (1999),

    Table 5The comparison of results for protein production with those reported earlier using different optimal control techniques

    Technique Starting point Jmax (101) Computation time (s)Present Random 3.259277 1244 (on the IBM computer)Variational calculus (Park & Ramirez, 1988) Specific u (not reported) 3.25a Not reportedDirect-search (Luus & Hennessy, 1999) u = 1 for all stages 3.2686867 less than 36968 (on Pentium/120)Iterative dynamic programming

    (Luus & Hennessy, 1999)Random 3.2686867 35847391 (on Pentium/120)

    a As read from graph.

    Table 6The optimal control values, corresponding to Jmax = 3.259277 101, forprotein production

    Stage (i) ui Stage (i) ui0 1.946846 101 23 1.9827891 1.354798 101 24 1.993832 1.445002 101 25 1.9930753 2.301419 101 26 3.628645 1014 2.092167 101 27 1.9038735 3.634367 101 28 1.704626 2.581563 101 29 1.0784047 2.062290 101 30 6.814616 1058 3.093587 101 31 9.726911 1029 3.128208 101 32 7.885631 101

    10 7.903737 101 33 7.933671 10111 3.282011 101 34 7.990748 10112 6.231075 101 35 7.958244 10113 2.174090 101 36 8.060720 10114 1.455103 101 37 8.040727 10115 1.810653 38 8.068483 10116 5.237942 101 39 8.239965 10117 4.205993 101 40 8.338405 10118 1.976336 41 8.590953 10119 7.359788 101 42 9.138066 10120 5.723070 101 43 1.04717221 4.989463 101 44 1.99905322 1.994245

    Dadebo and McAuley (1995), and Gupta (1995). The fol-lowing model has been used for this process:dx1dt

    = h1x1 u x1500x4 (27)

    dx2dt

    = h2x1 0.01x2 u x2500x4 (28)

    dx3dt

    =h1x10.47

    h2x11.2

    2.9 102x3x1

    104 + x3+ ux4

    [1 x3

    500

    ](29)

    dx4dt

    = u500

    (30)

    where

    h1 = 0.11x36 103x1 + x3 (31)

  • 1332 S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336

    h2 = 5.5 103x3

    104 + x3(1 + 10x3) (32)

    In the above model, x1, x2 and x3 denote the concentrationof biomass, product and substrate, respectively. x4 is reactorvolume. The initial conditions are:

    x1(0) = 1.5, x2(0) = x3(0) = 0, x4(0) = 7 (33)The control function u is feed rate, which is constrained asfollows:

    0 u 50 (34)In addition, the following inequalities must not be violated:

    0 x1 40 (35)0 x3 25 (36)0 x4 10 (37)The objective is to find the optimal control function, whichwould maximize the following performance index:

    J = x2(tf)x4(tf) (38)at the final time, tf = 132 h.

    For this problem, several applications of the optimal con-trol technique did not generate any feasible control vector(uf ) with 20 elements or stages, for a large number of iter-ations. This situation was handled by starting the techniquewith the following inputs:

    1. One stage of control function u, i.e. Nu = 1, which cor-responds to a population of two deviation vectors, u2.

    2. Two generations of genetic operations on the populationevery iteration, i.e. Ngen = 2.

    As soon as any uf was found, Nu was incremented by one.The size of vectors u, u and u2, and of the population of

    u2 was updated accordingly. A new population of u2of the updated size was randomly generated. The vector ufwas used to initialize a new vector of mean control values,i.e. u. The value for its new incremental element or stagewas set equal to the last stage value of uf . The applicationof the technique was resumed with these changes, whichcontinued until Nu became equal to 20. At that point, Nitrwas set to zero, Ngen was set to 10, and the technique wasapplied to generate an optimal control solution.

    Table 7The comparison of results for penicillin production with those reported earlier using different optimal control techniques

    Technique Starting point Jmax (101) Computation time (s)Present Random 8.787298 2932 (on the IBM computer)Semi-exhaustive search (Gupta, 1995) Specific u cited by Gupta (1995) 8.8 2820 (on 486/33 PC)Direct-search (Luus & Hennessy, 1999) u = 11.9 for all stages 8.79964 17726 (on Pentium/166

    digital computer)Iterative dynamic programming (Luus, 1993b) u = 11.9 for all stages 8.7948 9000 (on 486/33 personal computer)Iterative dynamic programming

    (Mekarapiruk & Luus, 1997)Specific u given by Gupta (1995),or Luus (1993b)

    8.7959 Not reported

    std. dev.avg.

    random seed no.

    f 1

    02

    9080706050403020100

    8

    7

    6

    5

    4

    3

    2

    1

    0

    Fig. 4. The fractional difference of J from its best reported value vs.randomly seeded application of the presented optimal control techniqueto penicillin production.

    4.3.1. ResultsThe results of the 90 different applications of the optimal

    control technique are plotted in Fig. 4 as fractional differ-ences of optimal performance index from its best reportedoptimal value (Jbest = 8.8 101, Gupta, 1995) versus seednumbers. The overall accuracy of the 90 f -values is quan-tified by their low average of 1.2%, while their precisionis quantified by their low standard deviation of 1.3% in theinterval, 0.147.7%.

    The maximum optimal value of Jmax = 8.787298 101 was obtained from the 90 applications. As shown inTable 7, this value, which has f = 0.14%, agrees wellwith those obtained earlier through three different optimalcontrol techniques of semi-exhaustive search (Gupta, 1995),direct-search (Luus & Hennessy, 1999), and iterative dy-namic programming (Luus, 1993b; Mekarapiruk & Luus,1997). The values of the optimal control vector correspond-ing to Jmax are listed in Table 8.

    To generate Jmax, the presented optimal control techniquetook a reasonable computation time of 2932 s (on the IBMcomputer) during which 1,866,400 objective function calls

  • S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336 1333

    Table 8The optimal control values, corresponding to Jmax = 8.787298 101, forpenicillin production

    Stage (i) ui0 4.7065041 5.5370372 6.6370243 3.759060 1014 3.334574 1015 8.3651686 8.9217807 9.1907528 9.2862829 9.069012

    10 9.40633711 9.09498012 9.26478813 9.41432614 9.49796215 9.73548016 9.51296817 9.49060318 9.58165919 9.623707

    were made to integrate Eqs. (27)(30) from 0 to 132 h. Thisnumber of calls is higher than 81,000 such calls used by thedirect search technique (Luus & Hennessy, 1999). However,as shown in Table 7, the presented technique used randominitialization as against the specific initial control value usedby the direct search technique.

    4.4. Hydroisomerization of methylcyclopentane

    The hydroisomerization of methylcyclopentane to ben-zene in the presence of a bifunctional catalyst in a tubularreactor has been used for optimal control by Luus, Dittrich,and Keil (1992). The following model has been used for thisprocess:dx1dt

    = k1x1 (39)

    dx2dt

    = k1x1 (k2 + k3)x2 + k4x5 (40)

    Table 9The coefficients of the rate constants for the hydroisomerization of methylcyclopentane

    i ci,1 ci,2 ci,3 ci,4

    0 2.918487 103 8.045787 103 6.749947 103 1.416647 1031 9.509977 3.500994 101 4.283329 101 1.733333 1012 2.682093 101 9.556079 101 1.130398 102 4.429997 1013 2.087241 102 7.198052 102 8.277466 102 3.166655 1024 1.350005 6.850027 1.216671 101 6.6666895 1.921995 102 7.945320 102 1.105666 101 5.033333 1026 1.323596 101 4.696255 101 5.539323 101 2.166664 1017 7.339981 2.527328 101 2.993329 101 1.199999 1018 3.950534 101 1.679353 1.777829 4.974987 1019 2.504665 105 1.005854 102 1.986696 102 9.833470 103

    dx3dt

    = k2x2 (41)

    dx4dt

    = k6x4 + k5x5 (42)

    dx5dt

    = k3x2 + k6x4 (k4 + k5 + k8 + k9)x5+ k7x6 + k10x7 (43)

    dx6dt

    = k8x5 k7x6 (44)

    dx7dt

    = k9x5 k10x7 (45)

    where,

    ki =4

    j=1ci,ju

    j1, i = 1, 2, . . . , 10 (46)

    In the above model, t is the characteristic time definedas the ratio of catalyst mass up to a given reactor sec-tion to methylcyclopentane feed rate, x1 is the mole frac-tion of methylcyclopentane, x2x6 are the mole fractionsof five intermediate species, and x7 is the mole fraction ofproduct benzene. kis are rate constants, which depend onthe coefficients ci,j listed in Table 9. The initial conditionsare:

    x1(0) = 1, x2(0) = x3(0) = = x7(0) = 0 (47)The control function u is catalyst blend, the ratio of the massof hydrogenating catalyst to that of total catalyst mass, asthe function of the characteristic time. u is constrained asfollows:

    0.6 u 0.9 (48)The objective is to find the optimal control, which wouldmaximize the following performance index:

    J = x7(tf) (49)or benzene concentration at the characteristic final time,tf = 2000 g h/mol, corresponding to the exit of the reactor.

  • 1334 S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336

    Table 10The comparison of results for methylcyclopentane hydroisomerization with those reported earlier using different optimal control techniques

    Technique Starting point Jmax (102) Computation time (s)Present Random 1.00937 166 (on the IBM computer)Sequential quadratic programming (Luus et al., 1992) Random 1.00527 185 (for 100 starting points on

    CRAY XMP/24 digital computer)Iterative dynamic programming (Luus et al., 1992) u = 0.75 for all stages 1.00942 360-960 (on CRAY XMP/24 digital computer)Iterative dynamic programming (Luus et al., 1992) u = 0.75 for all stages 1.00942 10800 (on computer with 386/33

    processor and mathematical coprocessor)

    4.4.1. ResultsThe results of the 90 different applications of the op-

    timal control technique are plotted in Fig. 5 as fractionaldifferences of optimal performance index from its best re-ported optimal value (Jbest = 1.00942 102, Luus et al.,1992) versus seed numbers. The overall accuracy of the 90f -values is quantified by their very low average of 0.0094%,while their precision is quantified by their very low standarddeviation of 0.0024% in the interval, 0.0050.02%.

    The maximum optimal value of Jmax = 1.00937 102was obtained from the 90 applications. As shown in Table 10,this value, which has f = 0.005%, agrees very well withthose obtained earlier through two different optimal controltechniques of sequential quadratic programming (Luus et al.,1992), and iterative dynamic programming (Luus et al.,1992). The values of the optimal control vector correspond-ing to Jmax are listed in Table 11.

    To generate Jmax, the presented optimal control techniquetook a reasonable computation time of 166 s (on the IBMcomputer) during which 173,200 objective function callswere made to integrate Eqs. (39)(45) from 0 to 2000 unitsof the characteristic time. For this problem, the number of

    std. dev.avg.

    random seed no.

    f 1

    05

    9080706050403020100

    18

    16

    14

    12

    10

    8

    6

    4

    2

    0

    Fig. 5. The fractional difference of J from its best reported value vs.randomly seeded application of the presented optimal control techniqueto methylcyclopentane hydroisomerization.

    Table 11The optimal control values, corresponding to Jmax = 1.00937102, formethylcyclopentane hydroisomerization

    Stage (i) ui 100 6.6608111 6.7369332 6.7630653 8.9994294 8.9998895 8.9999946 8.9994667 8.9999798 8.9999469 8.999914

    objective function calls using any direct search technique isnot available in literature. As shown in Table 10, the com-putation time taken by the presented technique to generateJmax is less than that taken by sequential quadratic program-ming as well as iterative dynamic programming on a muchfaster CRAY supercomputer.

    5. Discussion and conclusion

    A new technique was presented to provide robust so-lutions for the optimal control of non-linear, multimodal,and non-continuous processes of chemical engineering. Thetechnique was tested on four challenging, well-studied opti-mal control problems of (i) ethanol fermentation, (ii) proteinproduction, (iii) penicillin production, and (iv) methylcy-clopentane hydroisomerization. The technique demonstratedits robustness by generating results with (i) the low valuesof average fractional difference of performance index (fromits best, reported value) in the range 0.00941.7%, and (ii)the low values of standard deviation (of the fractional differ-ence) in the range 0.00241.3%. These statistical results arebased on the 360 applications (90 different randomly initi-ated applications for each of the four problems) of the pre-sented technique. The computation time required for the ap-plication of the technique was quite reasonable in the range1662932 s on a 750 MHz personal computer. It is worthnoting that the technique did not utilize any feasible controlinput, or any other helpful, a priori information to generateoptimal solutions.

  • S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336 1335

    For the first three problems, the comparison of the numberof objective function evaluations of the presented techniquewas done with that of a direct search technique (Luus &Hennessy, 1999), which, like the presented technique, doesnot have any other major computation overhead than theobjective function evaluation requiring the complete inte-gration of ordinary differential equations. It was found thatthe presented technique required greater numbers of objec-tive function evaluations. However, the technique showedan economy of computation for the last problem, and gen-erated optimal solution in less time than that taken by se-quential quadratic programming as well as iterative dynamicprogramming on a much faster CRAY supercomputer. It isnoteworthy that the technique always used random initial-ization unlike very specific initial control values as used bythe direct search technique for all problems. Random ini-tialization broadens the scope of the presented technique tosolve optimal control problems with minimum or no helpful,a priori initialization. These solutions may be efficiently uti-lized by techniques allowing specific initializations to gen-erate new or improved solutions.

    The third problem of penicillin production was the mostdifficult one due to the presence of three additional inequal-ity constraints on state variables along with a large controldomain. This situation made it impossible to randomly gen-erate a population with at least one eligible member (relatedto a feasible control function), and implement the presentedoptimal control technique as usual. In fact, as seen in Table 7,all previous techniques solved this problem with a very spe-cific starting point. The presented technique took care of thissituation by slowly increasing the number of control stagesfrom one to the given number of 20. It is not unlikely thatproblems with a larger number of inequality constraints, andsize of control domains could pose such difficulty. Anotherdifficulty that could be envisaged is the possible limitationof the presented technique to handle a large number of con-trol stages (or variables) with modest computation overhead.The technique is based on Genetic Algorithms, which for alarger number of variables require a larger size of populationfor its adequate diversity, and consequently, an equally largenumber of objective function evaluations. In such a scenario,computation overhead could be an issue with slower com-puters thereby yielding premature solutions in limited timeframes. The conventional gradient-based techniques of vari-ational calculus, or sequential quadratic programming do nothave this limitation, and therefore can be used to improvethe premature solutions. These techniques offer the benefitof progressively converging to a local optimum. This benefitcan be exploited to assure the globality of an optimal solu-tion by improving different premature solutions. The devel-opment of such a hybrid approach forms the focus of futureresearch.

    Based on the comparative numerical evidence in thisstudy, the presented technique shows promise in solvingnon-linear, discontinuous optimal control problems, gen-erating alternative control solutions, furnishing start-up

    guesses for other techniques, and validating their results.The presented technique does not depend on any auxiliarycondition, or any information on derivatives or feasible con-trol inputs. As such, the technique is easily programmable,and readily applicable for the optimal control of a varietyof challenging chemical engineering processes.

    Acknowledgements

    The financial support of Ryerson University Faculty SeedGrant, and the Natural Sciences and Engineering ResearchCouncil of Canada is gratefully acknowledged.

    References

    Barton, P. I., Allgor, R. J., Feehery, W. F., & Galn, S. (1998). Dynamicoptimization in a discontinuous world. Industrial and EngineeringChemistry Research, 37, 966981.

    Biegler, L. T., Cervantes, A. M., & Wchter, A. (2002). Advances insimultaneous strategies for dynamic process optimization. ChemicalEngineering Science, 57, 575593.

    Bojkov, B., & Luus, R. (1996). Optimal control of non-linear systemswith unspecified final times. Chemical Engineering Science, 51(6),905919.

    Chen, C. T., & Hwang, C. (1990). Optimal control computation fordifferential-Algebraic process systems with general constraints. Chem-ical Engineering Communications, 97, 926.

    Coley, D. A. (1999a). An introduction to genetic algorithms for scientistsand engineers (2nd ed., p. 87). New Jersey: World Scientific.

    Coley, D. A. (1999b). An introduction to genetic algorithms for scientistsand engineers (2nd ed., p. 78). New Jersey: World Scientific.

    Cuthrell, J. E., & Biegler, L. T. (1989). Simultaneous optimization andsolution methods for batch reactor control profiles. Computers andChemical Engineering, 13, 4962.

    Dadebo, S. A., & McAuley, K. B. (1995). Dynamic optimization of con-strained chemical engineering problems using dynamic programming.Computer and Chemical Engineering, 19, 513525.

    Goldberg, D. E. (1989a). Genetic algorithms in search, optimization &machine learning. New York: Addison-Wesley.

    Goldberg, D. E. (1989b). Genetic algorithms in search, optimization &machine learning (p. 124). New York: Addison-Wesley.

    Gupta, Y. P. (1995). Semiexhaustive search for solving nonlinear optimalcontrol problems. Industrial and Engineering Chemistry Research,34(11), 38783884.

    Hartig, F., Keil, F. J., & Luus, R. (1995). Comparison of optimizationmethods for a fed-batch reactor. Hungarian Journal of IndustrialChemistry, 23, 141148.

    Holland, J. H. (1975). Adaptation in natural and artificial systems. AnnArbor: University of Michigan Press.

    Hong, J. (1986). Optimal substrate feeding policy for fed-batch fermenta-tion with substrate and product inhibition kinetics. Biotechnology andBioengineering, 27, 14211431.

    Knuth, D. E. (1973). The art of computer programming (Vol. 2). Reading,Massachussetts: Addison-Wesley.

    Lee, M. H., Han, C., & Chang, K. S. (1997). Hierarchical time-optimalcontrol of a continuous co-polymerization reactor during start-up orgrade change operation using genetic algorithms. Computers andChemical Engineering, 21, S1037S1042.

    Lee, M. H., Han, C., & Chang, K. S. (1999). Dynamic optimization ofa continuous polymer reactor using a modified differential evolutionalgorithm. Industrial and Engineering Chemistry Research, 38(12),48254831.

  • 1336 S.R. Upreti / Computers and Chemical Engineering 28 (2004) 13251336

    Lim, H. C., Tayeb, Y. J., Modak, J. M., & Bonte, P. (1986). Computa-tional algorithms for optimal feed rates for a class of fed-batch fer-mentation: Numerical results for penicillin and cell mass production.Biotechnology and Bioengineering, 28, 14081420.

    Luus, R. (1990). Application of dynamic programming to high-dimensional nonlinear optimal control problems. International Jour-nal of Control, 52, 239250.

    Luus, R. (1991). Application of iterative dynamic programming to stateconstrained optimal control problems. Hungarian Journal of IndustrialChemistry, 19(4), 245254.

    Luus, R. (1992). On the application of iterative dynamic programmingto singular optimal control problems. IEEE Transactions on AutomicControl, 37, 18021806.

    Luus, R. (1993a). Application of dynamic programming todifferential-algebraic process systems. Computers and ChemicalEngineering, 17(4), 373377.

    Luus, R. (1993b). Optimization of fed-batch fermentors by iterative dy-namic programming. Biotechnology and Bioengineering, 41, 599602.

    Luus, R., Dittrich, J., & Keil, F. J. (1992). Multiplicity of solutionsin the optimization of a bifunctional catalyst blend in a tubularreactor. Canadian Journal of Chemical Engineering, 70(4), 780785.

    Luus, R., & Hennessy, D. (1999). Optimization of fed-Batch reactors bythe LuusJakola optimization procedure. Industrial and EngineeringChemistry Research, 38(5), 19481955.

    Mekarapiruk, W., & Luus, R. (1997). Optimal control of inequality stateconstrained systems. Industrial and Engineering Chemistry Research,36(5), 16861694.

    Michalewicz, Z., Janikow, C. Z., & Krawczyk, J. B. (1992). A modi-fied genetic algorithm for optimal control problem. Computers andMathematics with Applications, 23(12), 8394.

    Park, S., & Ramirez, W. F. (1988). Optimal production of secreted proteinin fed-batch reactors. AIChE Journal, 34, 15501558.

    Pontryagin, L. S., Boltyanskii, V. G., Gamkrelidge, R., & Mishchenko,E. (1962). The mathematical theory of optimal processes. New York:Interscience.

    Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. (2002).Numerical recipes in C++. The art of scientific computing (2nd ed.,pp. 719727). New York: Cambridge University Press.

    Seywald, H. R., Kumar, R. R., & Deshpande, S. M. (1995). Genetic algo-rithm approach for optimal control problems with linearly appearingcontrols. Journal of Guidance, Control and Dynamics, 18(1), 177182.

    Wang, F., & Chiou, J. (1997). Optimal control and optimal time locationproblems of differential-algebraic systems by differential evolution.Industrial and Engineering Chemistry Research, 36(12), 53485357.

    A new robust technique for optimal control of chemical engineering processesIntroductionProblem formulationThe optimal control techniqueMappingInputsAlgorithm

    Application and resultsFermentation of ethanolResults

    Production of secreted proteinResults

    Production of penicillinResults

    Hydroisomerization of methylcyclopentaneResults

    Discussion and conclusionAcknowledgementsReferences