Ind. Eng. Chem. Res. 1998, 37, 4017-4022
4017
Economic Optimization of an Industrial Semibatch Reactor Applying Dynamic Programming Corsin Guntern, Andreas H. Keller, and Konrad Hungerbu 1 hler* Safety & Environmental Technology Group, Chemical Engineering Department, ETH Zurich, CH-8092 Zurich, Switzerland
A methodology for the optimization of semibatch reactors using dynamic programming is proposed. This includes synthesis of a mathematical model, analysis of the performance of the process at its present state, definition of a set of decision variables, and optimization and simplification of this optimum toward feasibility. The methodology was applied to an industrial case study in the fine chemical industry using the lowest product cost as the objective function. Stages of equal feed volume were used instead of stages of equal time length. The obtained multistep feed profile was transformed into a feasible two-step procedure, which resulted in similar performances. Both procedures resulted in increased cycle times, but this loss in productivity was more than compensated for by a higher yield. Introduction The globalization of the chemical market, and as a result the growing competition, requires chemical producers to manufacture high-quality products at low production costs. Additionally, the growing ecological concern demands sustainable processes with the best possible conversion of energy and raw materials.1 These criteria should be fulfilled by using short and efficient procedures in order to start production as soon as possible.2,3 Process simulation is one efficient tool in process development. Chemical processes can be simulated and optimized on the basis of physical properties, kinetic and thermodynamic information, and unit operation models.4 But for several reasons, dynamic process simulations are rarely used in the fine chemical industry. First, the development of mathematical models describing chemical reactions is resource-intensive, needing carefully designed experiments with accurate measurements. Especially in fine chemical production, where every year dozens of process stages have to be developed, necessary physical and chemical data are often not available. On the other hand, knowledge of these data and use of models can lead to significant improvements in the performance of chemical processes as will be shown in this paper. Most common objective functions are designed to reach the maximum yield for the desired product5,6 or to maximize the profit. We used the minimization of production costs for a fixed amount of product as the objective function because the market volume of fine chemicals is often limited. In this article, a zero investment level is considered, which means that process improvement is implemented only by modification of operation variables such as feed rate and temperature. The influence of these parameters on selectivity, yield, and productivity is used to reach the best economic performance as defined above. The importance of considering ecological costs in optimizing chemical processes is growing because of the * Corresponding author: Tel.: +41-1-632 60 98. Fax: +411-632 10 53. E-mail:
[email protected].
changing social and political demands. These costs are caused by energy consumption (i.e., CO2 taxes) and endof-pipe processes (waste disposal, wastewater treatment, and incineration of byproducts). In this study the costs for waste disposal of the byproduct were considered in the production costs, thus favoring a higher yield. Dynamic programming is often recommended for the optimization of chemical processes.7-9 For semibatch operations it has been proposed to divide the feed into stages of equal time length.9 We propose to divide the feeding time into stages of equal feed volume for reasons that are explained below. Obviously, the course of the operation variables at the optimum of the objective function can have any value within the given constraints. The technical realization of rather complicated profiles would require sophisticated control strategies. In this study we investigate the performance of simplified profiles using the optimal one as a benchmark. The methodology presented is applicable for the design of a new chemical process as well as for retrofitting. In this study we investigated an industrial singlepurpose fine chemical production process consisting of a semibatch reactor and continuous reconditioning. Methodology Strategy. The applied procedure of process optimization includes model definition, analysis, optimization, and finally selection of the favorable process alternative (Figure 1). The procedure itself is iterative rather than sequential, but for simplification these loops are not shown. In the model definition step, a quantitative process model that represents the response of the system to changes in design and operating variables is set up.4 The iterative procedure of model development, consisting of experiments, data fitting, and model verification, is discussed elsewhere10 and will not be the topic of this article. The aim of the analysis step is to gain understanding of the process. In general, the detection of suboptimalities in economy, ecology, and process safety is especially important.
S0888-5885(98)00183-3 CCC: $15.00 © 1998 American Chemical Society Published on Web 08/29/1998
4018 Ind. Eng. Chem. Res., Vol. 37, No. 10, 1998
production, TV the target production value, EV the effective production value, and Φ a weighting factor. The value of the weighting factor Φ depends on the importance of the constraint and has to be determined such that the constraint is satisfied and the influence of the penalty term near the target value is small. For a semibatch reactor, the total production amount TP can be calculated from the number of batches ν times the amount of product per batch:
∫0τr(t)(V0 + ∫0tF(tz) dtz) dt
TP ) νMP
(2)
in which MP is the molecular weight of the product, τ is the total reaction time, r(t) is the reaction rate, V0 is the initial volume of the reactor, and F(tz) is the feed profile of the reactants. In most situations for liquidphase reactions, no significant density change takes place.6 When the total feed amount is assumed to be constant, the number of batches ν depends on the total batch time which includes the reaction time τ as well as the idle time θ, including setup, cleaning, and maintenance for a single batch:
ν)
tp τ+θ
(3)
where tp is the total production time. The production costs PC depend on the fixed expenses FE, the variable expenses per batch VEB, and the specific, time-dependent variable expenses VES:
PC ) FE + ν(VEB + VES × tf)
Figure 1. Structure of the proposed methodology for process improvements.
In the optimization step, a set of decision variables has to be defined and a set of alternatives has to be generated. By optimization, the best course of action from the available alternatives will be selected. For global optimization, dynamic programming was applied using ACSL Model and ACSL Optimize.11 Starting from this global optimum, a technically feasible optimum has to be derived. The simulation of the whole process might be used for testing the feasibility of the proposed changes. For example, controller stability or peaks in energy consumption are easy to examine with a rigorous model. In the final step a decision has to be made and one of the above alternatives applied. This strategy will be explained in more detail in the following sections. Definition of the Objective Function. Due to the limitations of the market volume of fine chemicals, the target of optimization should be the production of a given amount of chemical product with the lowest costs. Thus, we chose the objective function to be the sum of a performance criterion and a penalty term9 accounting for the deviation between targeted and effective production:
J)
PC + Φ(TV-EV)2 TP
(1)
where PC represents the production costs, TP the total
(4)
The fixed expenses are independent of the production amount and include equipment, salaries, infrastructure, administration, stock, and so forth, and VEB includes raw material costs, utilities, energy, setup, and maintenance costs, while VES accrues from additional utilities and energy used during the feed time tf. Generation of Alternatives and Optimization. The operation of a semibatch reactor is generally the most flexible, allowing manipulation of various process parameters. These are, for example, the feed rate profile, the temperature profile, the amount of initial reactants, and the amount of reactants added. In our study the task is to determine the variation of the feed rate F(t) with time to minimize the objective function defined above. For this purpose we used the modified dynamic programming algorithm described by ref 8. Usually with dynamic programming stages of equal time length are used for modeling the chemical process. In contrast, we divided the total feed into stages of equal volume added. The details of the mathematical procedure are given in de Tremblay and Luus (1989). Case Study Synthesis of Lithium Etinolate. The case study is an example from the fine chemical production, where lithium etinolate is a key component. The main reaction with rate r1 is the addition of unsaturated ketone with monolithium acetylenide (Figure 2). In addition a side reaction with rate r2 occurs where the ketone polymerizes.12 Monolithium acetylenide, dissolved in an organic solvent, is prepared in a reaction vessel. Then the ketone, dissolved in the same organic solvent, is added to produce lithium etinolate. This reaction is exother-
Ind. Eng. Chem. Res., Vol. 37, No. 10, 1998 4019
Figure 2. Reaction scheme showing the desired reaction r1 (above) and the byproduct formation r2 (below).
mic, and monolithium acetylenide is given in stoichiometric surplus. The process is conducted isothermically because of the solubility of acetylene. Process Model Kinetics and mass balances are given in eqs 5-10:
main reaction rate: r1 ) k1cKetonecLi-Ac
(5)
side reaction rate: r2 ) k2cKetone2
(6)
dNKetone ) FcKetone - r1V - 3r2V dt
(7)
dNLi-Ac ) -r1V - r2V dt
(8)
dNLi-Et ) r1V dt
(9)
dNBy-Prod ) r2V dt
(10)
mass balances:
in which ki is the reaction-rate constant of reaction i, ci is the concentration of compound i, and Ni is the number of moles of compound i. This formal kinetic model was derived from concentration courses of ketone and lithium etinolate measured in the plant reactor. For the main and side reactions the reaction order was assumed after reviewing the literature on possible reactions of ketones. The main reaction of monolithium acetylenide and the ketone to lithium etinolate was assumed to be first-order for both reactants. The undesired side reaction which is the formation of a polymer was assumed to be secondorder for the ketone. Kinetic parameters were found by fitting the experimental data to the model. The stoichiometric coefficients for the byproduct formation were found by elementary analysis of the byproduct. The rate constants of the reactions were determined at only one temperature and therefore the activation energies are not known. The simulated reactor consists of a stirred tank and a heat exchanger (Figure 3). The heat-exchange medium was methanol and its temperature was kept at -33 °C by controlling the methanol flow through the heat exchanger. The reaction temperature was controlled by the feed rate using a cascade control.13 This is possible because the reaction is fast and exothermal.
A higher feed rate leads to an increase of the heat production rate and influences therefore the reaction temperature. The measured variable of the primary loop is the temperature of the reaction mass TR, whose deviation is the input to a proportional-integral-derivative controller (PID). The manipulated variable of the secondary loop is the pumping rate. Its measured variable is the feed rate F, whose deviation is controlled by a proportional-integral controller (PI). Analysis of the Process at Its Present State. In this case study we want to increase the performance of the existing reactor by considering changes in the feed profile only, thus neglecting possible changes of the equipment. Simulated feed rate and time courses of the process in its actual state are described in Figure 4. Remarkable are the accumulation of the ketone, which is typical for semibatch operations, and the increasing feed rate toward the end of the feeding period. The reason for the increasing feed rate is the control system, which keeps constant the quantity of heat carried off during the feed time by keeping the reaction temperature constant. Due to the depletion of monolithium acetylide toward the end of the batch cycle, the ketone feed rate is increased to keep the reaction temperature constant. On the other hand, the increasing feed rate leads to an accumulation of ketone in the reactor, which increases the byproduct formation rate. Because a commercial process is considered, arbitrary units had to be introduced for reasons of confidentiality. The actual values from the plant for product costs, number of batches, and production were set to 100. The maximal allowed heat production in the reactor is limited by the heat-transfer rate through the reactor wall. Therefore, the upper feed rate is limited. For practical reasons also a lower limit of the feed rate exists because the pump output cannot go below a particular value. Qualitative estimations show that a lower feed rate would result in less ketone accumulation and less byproduct formation because low concentrations prefer the main reaction with lower reaction order referring to ketone.14 But a too low feed rate increases the cycle time and therefore lowers the productivity. If this dilemma situation is considered, the feed rate is a suitable parameter to influence the objective function. Optimization of the Feed Profile To carry out an optimization based on dynamic programming, the feed profile was split into 15 stages of equal amounts of ketone added to the reactor, resulting in varying time lengths of the different stages. Preliminary investigations showed that the main advantage of splitting the process into stages of equal volume lies in the fact that more similar state vectors are obtained at the end of the different stages, thus leading to a narrower grid and reducing the number of feed rates needed to calculate the gridpoints. Regarding the penalty term Φ in the objective function given by eq 1, the best results concerning the lowest production costs and the target production amount were obtained with a dynamic weighting factor, which was calculated as
Φmax - Φmin nstage - 1
Φ ) Φmin + (nstage - i)
(11)
4020 Ind. Eng. Chem. Res., Vol. 37, No. 10, 1998
Figure 3. Equipment and control setup in the production plant (FM, methanol flow; FM, methanol temperature).
Figure 4. Present state of the reactor and control system: feed rate (s), reaction volume (- - -), and concentration courses (-0-, monolithium acetylenide; -O-, lithium etinolate; -)-, ketone; -4-, byproduct).
Figure 5. Optimized reactor system for a multistep feed profile: feed rate (s), reactor volume (- - -), and concentration courses (-0-, monolithium acetylenide; -O-, lithium etinolate; -)-, ketone; -4-, byproduct).
The maximal weighting factor Φmax was set to 0.0003, the minimal weighting factor Φmin was set to 0.0001, the number of stages nstage was 15, and i denotes the actually used stage in the dynamic programming algorithm. The advantage of a dynamic weighting factor is that the sensitivity of the byproduct formation is highest at the end of the feeding time. Therefore, the goal of minimal production costs should have more weight than the goal of reaching a certain amount of product, and the penalty term should be a function of the feed volume added. The optimization leads to a decreasing feed rate, which results in a lower accumulation of the added polymer-building reactant (Figure 5). The accumulated amount of ketone remains approximately constant, keeping the rate of the byproduct formation roughly constant. When this is compared with the concentration
course of the actual feed profile (Figure 4), the steep increase of the byproduct formation rate could be prevented by this optimized feed profile. The formation of a byproduct is reduced by 46%. Therefore, 3.9% less batches are necessary to reach the same production, thus lowering product costs by 4.2%. The implementation of the optimal feed profile would require a complete redesign of the control system and changes at the existing hardware. Another solution is the simplification of the optimal feed profile as far as it can be integrated within the existing system. Of course, this simplified optimal feed profile should have comparable performance. The simplest decreasing profile has two steps with constant feed rates. Due to the fact that the total amount of ketone added was kept constant, only three parameters can be varied: the feed rate of the first step
Ind. Eng. Chem. Res., Vol. 37, No. 10, 1998 4021
Figure 6. Contour plot of the objective function J dependent on the two feed rates F1 and F2 at a constant feed time t1 ) 20 min.
F1, the feed rate of the second step F2, and the length of the first feed step t1. The optimization was carried out using ACSL Optimize with a Nelder-Mead search algorithm and using the objective function described in eq 1 with Φ set to 0.0004. The behavior of the system in the region of the optimum is best shown by the contour plot of the objective function. In Figure 6 the objective function J as given in eq 1 is shown dependent on the two feed rates. A sensitivity analysis reveals that the production costs are minimal in a valley where the value of F1 is inversely proportional to the value of F2. Contour plots for feed F1 versus feed time t1 and feed F2 versus feed time t1 gave similar results. The global minimum production costs are situated in the intersection of the three contour surfaces. The optimal values for the two-step feed design are shown in Figure 7. The first feed rate F1 is almost at the maximum level, while the second feed rate F2 amounts for only 43% of the first feed rate. The feed profile switches to feed rate F2 when around 60% of lithium acetylenide is converted to lithium etinolate. Because of the two constant feed rates, two maxima in the accumulation of ketone occur, the second one being higher. Its value reaches around 39% of the accumulation in the present system, whereas the optimal feed profile found by dynamic programming reached around 31%. As listed in Table 1, the multistep feed results in a significant improvement of yield and production costs, and the performance of the two-step profile is only slightly reduced. Although the feed time was prolonged for more than 90%, the same production amount could be reached because more product per batch is manufactured due to the higher selectivity, thus reducing the number of batches. The saved idle time is able to compensate for the longer feed time combined with the higher yield. Conclusions The use of the proposed methodology which relies on dynamic simulation has numerous advantages: (1) The derivation of a mathematical model increases the knowledge about the system and its behavior. The influence of the operation variables on the reactor economy can be predicted and a number of alternatives can be generated.
Figure 7. Optimized reactor system for a two-step feed profile: feed rate (s), reactor volume (- - -), and concentration courses (-0-, monolithium acetylenide; -O-, lithium etinolate; -)-, ketone; -4-, byproduct). Table 1. Results for Different Feed Profiles with Equal Production Amounts in Arbitrary Units
production costs number of batches yield of byproduct production capacity
present state
ideal profile
two-step profile
100 100 Xloss 100
95.8 96.1 0.54Xloss 100
96.0 96.3 0.56Xloss 100
(2) The proposed algorithm for dynamic programming is easy to use and practicable for semibatch optimization. (3) The theoretical global optimum found by dynamic programming can be used as a good benchmark for finding simplified solutions of the problem. (4) For the case study investigated substantial changes in the process design are not required because already a two-step feed profile results in about the same performance as the optimal multistep profile. (5) Through inclusion of the costs for waste disposal of the byproduct, the economic optimization of the investigated process resulted also in a reduction of the amount of waste. (6) The results of this work were implemented in the real plant. The higher yield could be reached and the plant is now working with a better performance. A crucial point in this methodology is the model generation. The principles of model generation are known but for its generation often the necessary data such as the concentration profiles of the main and of the side products are missing. Especially in the fine chemical industry, significantly more effort in this direction should be undertaken as the results of this study show.
4022 Ind. Eng. Chem. Res., Vol. 37, No. 10, 1998
In the retrofitting problem presented we were able to show that the systematic use of this methodology decreased the production costs by 4.0% with only minor changes in the process design. This is especially remarkable since the process had been optimized once before this study was conducted. Therefore, an application of this methodology during development should result in even better returns. We could also show that the prolongation of the feed time requires less raw materials and utilities and produces less waste by increasing the process selectivity. The production amount could be kept constant because less batches were necessary and the saved idle time could compensate for the feed time prolongation. Acknowledgment The authors thank J. Jeisy and S. Gentner from F. Hoffmann-La Roche Ltd. for their support and many helpful suggestions to carry out this work successfully and to R. Zechner for the experimental work. We also thank the reviewers for their valuable comments. Nomenclature c ) concentration, [mol m-3] EV) effective value of penalty term, [kg] F ) feed rate, [m3 s-1] F0 ) maximal feed rate, [m3 s-1] FE ) fixed expenses, [$] J ) objective function, [$ kg-1] k ) reaction-rate constant for order n, [m3(n-1) mol-(n-1) s-1] MP ) molecular weight of the product, [kg mol-1] N ) number of moles, [mol] N0 ) initial amount of monolithium acetylenide, [mol] nStage ) number of stages PC ) production costs, [$] r ) reaction rate, [mol m-3 s-1] t ) time, [s] tf ) freed time, [s] tp ) total production time, [s] TR ) temperature of reaction mass, [K] TP ) total production, [kg] TV ) target value of penalty term, [kg] V ) reaction volume, [m3]
V0 ) initial reaction volume, [m3] Vmax ) maximal reaction volume, [m3] VEB ) variable expenses per batch, [$] VES ) specific variable expenses, [$] Greek Letters Φ ) weighting factor, [$ kg-3] θ ) idle time, [s] ν ) number of batches τ ) reaction time, [s]
Literature Cited (1) Keoleian, G. A.; Menerey, D. Sustainable Development by Design: Review of Life Cycle Design and Related Approaches. Air Waste 1994, 44, 645-668. (2) Douglas, J. M. Process Synthesis for Waste Minimization. Ind. Eng. Chem. Res. 1992, 31, 238-243. (3) Ulrich, G. D. A Guide to Chemical Engineering Process Design and Economics; Wiley: New York, 1984. (4) Rippin, D. W. T. Simulation of Single- and Multiproduct Batch Chemical Plants for Optimal Design and Operation. Comput. Chem. Eng. 1983, 7, 137-156. (5) Chang, J.-S.; Hseih, W.-Y. Optimization and Control of Semibatch Reactors. Ind. Eng. Chem. Res. 1995, 34, 545-556. (6) Soroush, M.; Kravaris, C. Optimal Design and Operation of Batch Reactors. Ind. Eng. Chem. Res. 1993, 32, 866-881. (7) Sniedovich, M. Dynamic Programming; Marcel Dekker Inc.: New York, 1992. (8) de Tremblay, R.; Luus, R. Optimization of Non-Steady-State Operation of Reactors. Can. J. Chem. Eng. 1989, 67, 494-502. (9) Luus, R. Application of Dynamic Programming to Differential-Algebraic Process Systems. Comput. Chem. Eng. 1993, 17, 373-377. (10) Van Gigch, J. P. System Design Modeling and Metamodeling; Plenum Press: New York, 1991. (11) MGA. ACSL Optimize User’s Guide; Concord, MA, 1996. (12) Wiederkehr, H. Examples of Process Improvements in the Fine Chemicals Industry. Chem. Eng. Sci. 1988, 43, 1783-1791. (13) Stephanopoulos, G. Chemical Process Control, An Introduction to Theory and Practice; Prentice-Hall: Englewood Cliffs, NJ, 1984. (14) Levenspiel, O. Chemical Reaction Engineering; Wiley: New York, 1972.
Received for review March 24, 1998 Revised manuscript received July 6, 1998 Accepted July 7, 1998 IE980183M