271742 Studying Various Optimal Control Problems in Biodiesel Production in a Batch Reactor Under Uncertainty

Wednesday, October 31, 2012: 9:55 AM
324 (Convention Center )
Pahola T. Benavides, Industrial Engineering, University of Illinois at Chicago, Chicago, IL and Urmila Diwekar, Vishwamitra Research Institute, Center for Uncertain Systems: Tools for Optimization and Management, Clarendon Hills, IL


Optimal control problems encountered in biodiesel production can be formulated using various performance indices like maximum concentration, minimum time, and maximum profit.  The problems involve determining optimal temperature profile so as to maximize these performance indices. This paper presents these three formulations and analyzes the solutions in biodiesel production.  We also present the maximum profit problem where the variability and uncertainties in the feed composition of soybean are considered.  


Optimal control problems are defined in the time domain and their solution requires establishing a performance index for the system.  Because of the dynamic nature, optimal control problems are much more difficult to solve compared to normal optimization.  In this paper, we are proposing an alternative approach that avoids the use of large-scales NLP solvers. Moreover, we study the three optimal control problems on batch reactors: maximum concentration problem (MCP) of methyl ester, the minimum time problem (MTP), and the maximum profit problem (MPP) for biodiesel production. The MCP and MTP are solved using the maximum principle, and the approach is based on the Steepest Ascent of Hamiltonian.  On the other hand, the MPP is solved using an algorithm that combines the maximum principle and NLP techniques.   This algorithm is an efficient approach which avoids the solution of the two-point boundary value problem that results in the pure maximum principle or in the solution of the partial differential equations for the pure dynamic programming formulation. Biodiesel is one of the most well-known examples for alternative energy and is also environmentally friendly emission profile [1].  Here we present the optimal control problem where optimal temperature profile is derived using optimal control theory.

Optimal control problems become more challenging when variability in any parameter or variable is included.  In biodiesel production, there are inherent uncertainties that have a significant impact on the process.  One of the most influential uncertainties in this process is the feed composition since the percentage and type of triglycerides in biodiesel composition varies considerable [2].  This uncertainty can be modeled using probabilistic techniques, and can be propagated using stochastic modeling iterative procedures [3].  Therefore, at the end of this paper we propose a stochastic maximum profit problem (SMPP) that regards the variability in the feed composition to observe how this uncertainty affects the process economic in the batch reactor.      


Optimal Control Problems

Table 1 summarizes the optimization problems presented in this paper.   

Table 1 Optimal Control problems









Maximize CE




Minimize tf




Maximize profit

The kinetic model presented here is based on [4].


F1=dCTGdt=-k1CTGCA+k2CDGCE                                                                                       (1)

F2 =dCDGdt=k1CTGCA-k2CDGCE-k3CDGCA+k4CMGCE                                                  (2)

F3 =dCMGdt=k3CDGCA-k4CMGCE-k5CMGCA+k6CGLCE                                                 (3)

F4 =dCEdt=k1CTGCA-k2CDGCE+k3CDGCA-k4CMGCE+k5CMGCA-k6CGLCE           (4)                           

F5=dCAdt=-dCE dt                                                                                                                    (5)

F6=dCGLdt=k5CMGCA-k6CGLCE                                                                                          (6)


where CTG, CDG, CMG, CE, CA, and CGL are the state variables and represent: triglycerides, diglycerides, monoglycerides, biodiesel, methanol, and glycerol, respectively.  The initial conditions are: Ci (t0) = [CTG; 0; 0; 0; CA; 0]   [mol/L] and   ki is the reaction constant.

The objective function for the MPP is represented by Eq.7 [5]

maxJ''=MEPr-BoCot+ts                                                                                                              (7)

where ME is the amount if product (kg), Pr is the sales value of the product ($/kg), Bo is the amount of feed F (kg), Co is the cost of feed ($/kg), t is batch time (minutes) and ts is the setup time for each batch. However, this equation can be converted as:

maxJ''= max MEPr-BoCot+ts                                                                                                      (8)

Table 2 shows the information for profit function calculation.  The amount of feed involves the quantity of methanol and triglycerides at the beginning of the reaction while the amount of product is the final concentration of methyl ester which is maximized by finding a temperature profile as a control variable. 

Table 2 Information for maximum profit problem




  Soy bean oil (Triglycerides) a






  Biodiesel (methyl ester)

$ 3/gallon=$ 0.9/kg


  Setup time (ts)

10 min


a (www.icis.com). [2]

For the MCP and MTP, maximum principle is used to solve the optimal control problem.  On the other hand, a combination of maximum principle and nonlinear optimization (NLP) technique based on SQP algorithm is used to solve the MPP.

In the SMPP, the objective function is subject to fluctuations due to the uncertainty arising in the feedstock content.  In a previous work of our group [6], we showed the uncertainty characterization and the stochastic simulation for the feed stock composition of soybean oil.  The interest of these types of problems is to determine the expected value of the maximum profit.   Then, the objective function for the SMPP is shown in Eq. 9.

maxJ''=E max MEPr-BoCot+ts                                                                                        (9)

Result and discussion

 Figure 1 shows the concentration profiles obtained for the three optimal control problems and two base cases (base case 1: 315K and 2: 323K).  To start with, consider the concentration profile of methyl ester for the MCP.  Here, we are comparing the concentration values at constant temperature with the values calculated at optimal temperature profile. It can be seen that at 100 minutes, the concentration of biodiesel using optimal control reaches its maximum value, 0.7944mol/L; while at constant temperature, the maximum concentration is 0.7324mol/L and 0.7829mol/L, respectively.  This change represents an increase of 8.46 % (base case 1) and 1.47% (base case 2) on the concentration of methyl ester.  The increment for the second base case is not significant since the constant profile at 323K belongs to the constant optimal profiles reported in the literature [7].  Moreover, if we fix the concentration at 0.7324mol/L (concentration reached in base case1), the reaction time needed is 30.5 minutes which represents 69.5% less than it was at the beginning (100 minutes) after using optimal control.  Compare with base case 2, the reduction on time represents 46% of the original time.  This improvement does not affect the behavior of the other components because after 50 minutes their concentrations remain constant.  For the MTP, after fixing the concentration of methyl ester to 0.7324mol/L the minimum time reached is 30.6 minutes when optimal control is applied, while for base case 1 and 2 their minimum time is reached at 100 and 54 minutes, respectively.  Although, the optimal control profiles shown in Figure 2 for the two optimal control problems are significantly different, their results are similar showing that this problem have multiple solutions.

Figure 1 Concentration Profiles.

Figure 2 Optimal Temperature Profiles

For the case of MCP, it can be seen that at 50 of minimum time there is an increase of Biodiesel concentration of 25.56% (case 1) and 8.50% (case 2).  Moreover, if we compute the profit in the MCP and MTP using Eq. 9 and compare these values with the profit found in the MPP, there is an increment of 45.32% and 355.58%, respectively.


Table 3 Comparison of the optimal control problems


Maximum Concentration

Minimum Time

Maximum Profit

Biodiesel concentration (mol/L)




Time (minutes)




Profit  ($/hr)




Table 4 shows results of these problems regarding uncertainty.  As shown, in stochastic case there is an improvement of 6.68% compared to the deterministic case and very significant improvement compare with the two base cases.  In other words, the SMPP gives 9.99$/hr more than MPP (deterministic) and 148.163$/hr and 76.951$/hr more than base case 1 and 2, respectively.

Table 4 Comparison deterministic and stochastic cases.






Biodiesel concentration (mol/L)





Time (minutes)





Profit  ($/hr)






The problems presented in this article involved determining optimal temperature profile so as to maximize or minimize three performance indices: concentration, time, and profit for biodiesel production. MCP and MTP were solved using maximum principle and steepest ascent of the Hamiltonian.  The solution of these two problems results in similar equations for maximum principle.  In both cases reaction time was around 30.5 to 30.6 minutes and concentration of biodiesel was the same.  While in MPP, the technique used was based on combining the maximum principle and NLP techniques.  Applying optimal control under uncertainty it resulted in better time to produce the same amount of biodiesel which improved the profit value of the problem.


1.        Zhang, Y.; Dube, M.A.; McLean, D.D.; Kates, M. Biodiesel production from waste cooking oil: 1. Process design and technological assessment. Bioresour. Technol. 89 (2003) 1. 

2.        Linstromberg WW. Organic chemistry. MA: DC Heath and Co. Lexington. (1970) 129.

3.        Diwekar U, Rubin ES. Stochastic modelling of chemical processes. Comput. Chem. Eng. 15 (1991) 105

4.        Noureddini H, Zhu D. Kinetic of transesterification of soybean oil. J Am Oil Chem Soc.  74 (1997) 1457.

5.        Kerkhof, L H. J.; Vissers, J. M.  On the profit of optimum control in batch distillation.  Chem. Eng. Sci. 33 (1978) 961.

6.        Benavides, P.; Diwekar, U.  Optimal Control of Biodiesel Production in a Batch Reactor Part II: Stochastic Control.  Fuel. 94 (2012) 218.

7.        Leung, D, Guo, Y.  Transesterification of neat and used frying oil: optimization for biodiesel production.  Fuel Process Technol.  87 (2006) 883.

Extended Abstract: File Not Uploaded
See more of this Session: Process Control Applications
See more of this Group/Topical: Computing and Systems Technology Division