CHEMICAL ENGINEERING TRANSACTIONS VOL. 76, 2019 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Petar S. Varbanov, Timothy G. Walmsley, Jiří J. Klemeš, Panos Seferlis Copyright © 2019, AIDIC Servizi S.r.l. ISBN 978-88-95608-73-0; ISSN 2283-9216 Dynamic Optimization of Continuous Chemical Process with Batch Operation Variable: A Case Study of a Fluid Catalytic Cracking Unit with CO Promoter Jia-Jiang Lin, Feng Xu, Xiong-Lin Luo* Department of Automation, China University of Petroleum, Beijing, 102249, China luoxl@cup.edu.cn Continuous chemical process will formulate a hybrid system when introducing batch operation. The optimisation of such systems requires dynamic optimisation with control parameters. Considering the complexity of engineering problems, it is usually solved by a direct method such as control vector parameterization (CVP), which reformulates the primal problem into a nonlinear programming problem (NLP). In detail, the continuous control variables are approximated by functions with finite parameters. The strategy is verified by the case study of a Fluid Catalytic Cracking Unit (FCCU) with CO promoter. An augmented dynamic model of an FCCU with high-efficiency regenerator is developed incorporating the quantitative correlation between average activity of CO promoters and the number of added CO promoters. By simulation, it’s found that the nominal operating conditions can only ensure safety performance, while the economic performance is neglected for the lack of exploiting the safety margin. The optimisation problem is solved by different kinds of approximation functions, which improves the solution of dynamic optimization problem. The result shows that tuning the continuous control variables across time according to optimized batch control variables obviously increases the economic performance during preserving safety. 1. Introduction In continuous chemical industry, such as petrochemical enterprise, the batch operation is usually treated as an auxiliary means to ensure system’s security and stability, and the continuous operation is controlled by regulatory controllers to maintain an operating condition. In this way, the batch operation is seen as disturbances, and it is cancelled by the regulatory controller PID. Ideally, the batch operation should be seen as control parameters of the dynamic optimization formed by the continuous process, and optimized alongside the continuous operation, which forms a wider optimization scheme (de Prada et al., 2018). Due to the difficulties of infinite-dimensional optimization, candidate solutions of dynamic optimization can only be detected by the necessary conditions of optimality, which corresponds to solving the two-point boundary value problems (TPBVPs) of Hamilton equations derived by Pontryagin maximum principle, also known as indirect method. Considering the complexity of the real engineer problems, the dynamic optimization problems are usually solved by direct methods. The basic idea of direct methods is to discretize the control problem (Zhai et al., 2017), and then applies NLP techniques to the resulting finite-dimensional optimization problem. The dynamic models of FCCU with a high-efficiency regenerator are normally modelled with excess air and substantial CO promoter, which assumes no CO exists in the regenerator. Only several papers consider the correlation of heterogeneous CO combustion with CO promoter. They introduced a factor xpt to represent the relative combustion rate, and factors xpro and ηpt to represent the concentration of CO promoter in the catalyst inventory and the activity of the CO promoter (Wang et al., 2014). A detail FCCU model includes quantitative correlation between amount of added CO promoter and CO combustion dynamic is still very lacking, which is the prerequisite for formulating a dynamic optimization. In this work, the conception and mathematical description of continuous process with batch operation are proposed in section 2. To verify the proposed method, an augmented dynamic model of a FCCU is obtained DOI: 10.3303/CET1976126 Paper Received: 28/02/2019; Revised: 14/03/2019; Accepted: 28/03/2019 Please cite this article as: Lin J.-J., Xu F., Luo X.-L., 2019, Dynamic Optimization of Continuous Chemical Process with Batch Operation Variable: A Case Study of a Fluid Catalytic Cracking Unit with CO Promoter, Chemical Engineering Transactions, 76, 751-756 DOI:10.3303/CET1976126 751 and discussed in section 3. Meanwhile, the formulated dynamic optimization is solved by CVP to show the substantial potential of improving the economic performance during preserving safety. 2. Continuous chemical process with batch operation variable 2.1 Conception of continuous chemical process with batch operation variable With the presence of the batch operation in continuous process, the system dynamic will slightly change between two periods. This kind of hybrid system could be described as Figure 1. … … … … ),,( uxx tf a = Initial Conditions Optimizer u ),,( uxx tf b = ),,( uxx tf c = u Figure 1: Hybrid system of continuous process with batch operation The ū in right-hand side is the batch operation in continuous process, it only implements in certain instant of time, which can be prescribed or optimized itself. The ODEs in the left-hand side are the system dynamic model {ẋ = fa(t, x(t), u(t))}aI, where I is an index set. If the cardinality of the set I is finite or countable infinite, then it leads to normal switched systems, which has its own necessary conditions of optimality called hybrid maximum principle (Pakniyat and Caines, 2015). If set I is a hypercube in Rn, then it can be reformulated as a dynamic model with parameters, i.e. ẋ = f(t, x(t), u(t), ū), which is the case discussed in this paper. Usually, the batch operation and continuous operation are independent in a continuous process. The batch operation is nothing but “disturbances” to regulatory controller. Unlike real disturbances, the manually batch operation is controllable. The batch operation and continuous operation, as well as system dynamical model should be combined together, which gives rise to a dynamic optimization with control parameters. 2.2 Mathematical formulation of continuous chemical process with batch operation variable For universality, the process model is represented as Eq(1)    = = )),(),(),(,(0 )),(),(),(,( uuxx uuxxx ttttf ttttf ada addd  (1) where xd(t) and xa(t) represents the vector of differential and algebraic state variables; u(t) and ū represents the vector of continuous and batch control variables, which serves as parameters in the equations; fd and fa represents the set of differential and algebraic equations. Moreover, all the state and control variables have their own constraints, represented by the upper bounds and lower bounds. The cost function J is to maximize the product revenue, while minimize the resource consumption, which is represented as Eq(2)  ++−= ft t adad cdttttctttrtJ 0 )()),),(),(,(),),(),(,(()),((min 21 uuuxxuuxxuu (2) where r(t, xd(t), xa(t), u(t), ū) and c1(t, xd(t), xa(t), u(t), ū) are the revenue generation and resource consumption rate during continuous operation, while c2(ū) represents the resource consumption at time instant t0. From the above, optimization of continuous process with batch operation is described as searching optimal trajectories of continuous control variables u(t) and optimal values of batch control variables ū to minimize J with given initial conditions, and stratifies Eq(1) and correspondent constraints. 2.3 Solving the optimization of continuous chemical process with batch operation variable Analytically, the optimization of continuous chemical process with batch operation variable can be solved in two steps. First, treat batch operation variables as parameters and the corresponding standard dynamic optimization can be solved by Pontryagin Maximum Principle. Second, with the solution of step 1, the cost function becomes multivariate functions of ū. The transformed problem can be solved by nonlinear optimization technique. Since the analytical solution of step 1 is unachievable for complex chemical process, the numerical solution is the only practical method to choose. Normally, the dynamic optimization is solved by direct methods. They parameterise 752 control and/or state variables as optimization variables, which puts the continuous control variables and batch control variables in equal status. Then the NLP technique is used to solve the reformulated problem. Normally, parameterization of infinite dimensional continuous variables is carried out by approximating them in finite dimensional linear spaces, which is originated from the Ritz method. Supposed that there is a function f(t)D, the approximating linear space DN = span{ϕ1(t), ϕ2(t), …, ϕN(t)}, then the approximation is carried out by f(t)   N i=1ωiϕi(t), where ωi is the projection of f(t) at ϕi(t). For Hilbert space, besides linear independence, orthogonality could also be expected, i.e. <ϕi(t), ϕj(t)> = 0 for  i  j. In practice, the optimization horizon [t0, tf] is subdivided into N  1 control stages, i.e. t0 < t1 < t2 <…< tN = tf, then the orthogonal basis function ϕi(t) can be represented as Eq(3)     = − else ,0 ),( )( 1 iii i tttt t   (3) Usually, Lagrange interpolation polynomials are used for φi(t). For piecewise constant function, the φi(t) = 1, which is the case in this paper. As for batch operation ū, it can be treated as constant functions, which are elements of one-dimensional linear space, and the basis function ϕ(t) takes the form ϕ(t) = 1 for t0  t  tf. Then the batch operation ū can be parameterized themselves. There are two kinds of discretization methods, i.e. sequential and simultaneous method. Sequential methods only parameterize control variables, while simultaneous methods parameterize both control and state variables, which will dramatically increase the number of decision variables of the reformulated NLP problem. Due to the large number of state variables of FCCU, the sequential method CVP is chosen in this paper. 3. Application on FCCU with CO promoter 3.1 FCCU description The FCC process continues to play a key role in an integrated refinery as the primary conversion process of crude oil to lighter products. Model of FCCU with high-efficiency regenerator has been referred, and validity of the simulation has also been identified in our early work (Wang et al., 2014) in gPROMS software. The regulatory control system is comprised of five controllers. They control the riser temperature, catalyst inventory in the stripper, catalyst inventory in the dense bed, reactor pressure, and the pressure difference between the reactor and the regenerator (Figure 2). The cracking kinetic model adopts a five-lump model as follows: GAS OIL(A)⎯→νADDIESEL(D) + νANNAPHTHA(N) + νAGGAG(G) + νACCOKE(C) (4) DIESEL(D)⎯→νDNNAPHTHA(N) + νDGGAG(G) + νDCCOKEI (5) NAPHTHA(N)⎯→νDGGAG(G) (6) Figure 2: Schematic diagram of FCCU with high-efficiency regenerator 3.2 Batch property of CO promoter CO combustion promoter is added manually and periodically in FCCU, which belongs to the batch operation of a continuous process. In order to formulate a dynamic optimization with control parameters, an augmented dynamic model of a FCCU with high-efficiency regenerator incorporating the quantitative correlation between average activity and concentration of CO promoter and the amount of added CO promoter is developed. 753 The presence of CO combustion promoter significantly affects the heterogeneous CO combustion in the regenerator, which influences the system dynamics through Eqs(7) and (8). )ustionheterocomb(COO 2 1 CO 2 s 2 2 ⎯→⎯+ r (7) 5.15.0 OCOtPproPt 4 6s 2 2 106.5 exp1019.2 pyyxc RT r         − = (8) xpro is almost determined during unit start-ups, since large amount of CO combustion promoter will be added up to a certain concentration, it will be added periodically at a small amount. The price of CO combustion promoter is much higher than the catalyst, normally xpro < 1 %. The equilibrium activity of ηpt is ~ 11 %. The deactivation equation of fresh CO combustion promoter in a catalytic cracking regenerator is given by Eq(9) (Liu et al., 2001). 052.0 21.0055.1 1 )( Pt + + = t t (9) Since the CO promoter in the catalyst is a mixture of old and new CO promoter, the average activity of CO promoter in the current period is determined not only by the current additive amount, but also by the historical additive amount. The following assumptions are used for simplicity: the average activity of mixed CO promoter is calculated by a simple weighted method by mass. That is to say, if there are m1 kg and m2 kg CO combustion promoter, which have activity η1 and η2 at t respectively, then the average activity at t is η = (m1η1 + m2η2) / (m1 + m2); mass balance of CO promoter is hold, i.e. Mi kg of CO promoter is added and lost every 8 h before, and M0 kg of CO promoter is added initially. Besides, the loss of CO promoter is instantaneous right before the CO combustion promoter is added, and the loss of CO combustion promoter of different periods is proportional to its mass. According to the assumption above, the dynamic of average activity of CO promoter is illustrated as Figure 3 by simulation. 0 55 110 165 220 0 20 40 60 80 100 208 210 212 214 216 8 12 16 20 A v e ra g e A c ti v it y /% Time/h (a) A v e ra g e A c ti v it y /% Time/h (b) Figure 3: The dynamic of average activity of CO promoter: (a) simulation of 220 h, (b) simulation of one period (8 h) After decades of periods, the dynamic of average activity of CO promoter becomes periodical, and shows the same tendency as the deactivation dynamic of the fresh CO promoter. Thus, using the form of Eq(9) as the fitting function gives the analytical function of average activity of mixed CO promoter, which is Eq(10). 0.07986 668.284.19 1 )( + + = t t o  (10) Now, the quantitative correlation between amount of added CO promoter in the current cycle and the process dynamic model can be described by Eq(11) and Eq(12). opro ooptpro MM tMtM t + ++ = )8()( )(   (11) cat opro pro M MM x + = (12) where Mpro is amount of added CO combustion promoter in the current cycle, Mo is the remain amount of CO promoter from before, Mcat is the amount of catalyst. 754 3.3 Sensitivity analysis of FCCU Since the temperature rise in the dilute phase is the main indicator of afterburning and riser temperature directly connects to the productivity of the valuable product, Figure 4 shows the sensitivity analysis based on base case operating condition, which Tra_sp(t) = 494 ℃, Vrg1(t) = 49.34 km3/h, and Mpro = 4 kg. 0 120 240 360 480 78 79 80 81 82 C o n v e rs io n /% Time/min (a) Triser = 493 ℃ Triser = 494 ℃ Triser = 495 ℃ 0 120 240 360 480 -12 0 12 24 36 T e m p e ra tu re R is e i n t h e F re e b o a rd /℃ Time/min (b) Triser = 493 ℃ Triser = 494 ℃ Triser = 495 ℃ Upper Bound Figure 4: Sensitivity analysis of FCCU; a) conversion; b) temperature rise in the freeboard As shown in Figure 4, as the activity of CO promoter decreases, the temperature rise in the freeboard increases, while the conversion of the riser reactor slowly increases. This indicates that high activity induces low conversion, which fails to exploit the benefits of adding CO promoter. This inefficiency is caused by riser temperature controller. Specifically, higher activity of CO promoter increases the temperature of regenerated catalyst, in order to maintain the riser temperature unchanged, the regenerated catalyst circulation rate is decreased, which causes the decreasing of conversion. On the other hand, since the catalyst cracking is an endothermic reaction, increasing riser temperature will increase conversion. It indicates the higher riser temperature can be adopted at higher activity of CO promoter without causing afterburning. The analysis above suggests that the benefit of adding CO promoter could be exploited by tuning continuous operation variables across time. Moreover, since the FCCU is operated with abundant combustion air, the combustion air flow rate is taken as optimization variables too. 3.4 Dynamic optimization of FCCU The set points of riser temperature Tra_sp(t) and the combustion air flow rate Vrg1(t) are continuous control variables, the cost function is defined by additional profit comparing with base case operating condition. For simplicity, the cost function takes the form Eq(13). prorgprorgsprann prorgspraddprorgspra MdttVfMtVtTtF MtVtTtFMtVtTJ 311_1 480 0 1_11_ )))(()),(),(,( )),(),(,(()),(),((min   ++− −=  (13) where ω1d, ω1n and ω3 denote the price of diesel, naphthas and CO promoter; Fd and Fn are the yield of diesel and naphthas; f is the energy consumption of air blower with respect to Vrg1(t) (Wang and Cai, 2010). The dynamic optimization is solved with CVP by the unity of gPROMS. From the point of numerical calculation, the original path constraints are relaxed by some ε. For example, for path constrain xlb  x(t)  xub, by introducing a new variable xb, and ẋb = max(0, xlb – x(t), x(t) – xub), xb(t0) = 0, the relaxation is given by extra end-point constrain xb(tf)  ε. Approximation functions of continuous control variables are a series of piecewise constant functions. It starts with 8 basis functions, then a refinement method (Huang and Luo, 2018) is used. In details, the time interval with largest increment of Tra_sp(t) is equally divided into two subintervals, then the optimal solution of current iteration is used as an initial guess for next iteration. The new NLP is solved again, until the improvement of J between two subsequent iterations is less than predefined JT. Table 1: Detail cost function data of optimal result of last iteration Resource/product Base case condition Optimal result Difference Profits Naphthas 285.1719 285.2048 0.0329 t 230.3 ¥ Diesels 266.1554 266.3651 0.2097 t 1,279.17 ¥ CO promoter 4 3.3523 0.6475 kg 129.5 ¥ Combustion air 1,420,991 1,411,238 9,753 km3 184.25 ¥ The refinement result is illustrated as Figure 5, and Figure 6 and Table 1 give the optimal result of the last iteration. As illustrated in Figure 5, the solution gets better when partition goes finer, and the iteration stops after 755 13 iterations. With 21 basis functions for every continuous control variable, the optimal profit is J = 1,823.22 ¥ /8h = 1.996106 ¥/y. Figure 5: The refinement process: (a) amount of added CO combustion promoter; (b) cost function J 0 120 240 360 480 490 492 494 496 T e m p e ra tu re /% Time/min (a) Riser Temperature Set Points flow rate conversion 48.5 48.8 49.1 49.4 49.7 C o m b u s ti o n A ir F lo w R a te /k m 3 h -1 temperature 79.5 81.0 82.5 84.0 C o n v e rs io n ( % ) 0 120 240 360 480 -5 0 5 10 15 20 Upper Bound T e m p e ra tr u e R is e i n t h e F re e b o a rd /℃ Time/min (b) Upper Bound temperature rise O2 content 2.8 3.2 3.6 4.0 4.4 O 2 M o la r F ra c ti o n i n t h e F lu e G a s /% Figure 6: Optimal solution of last iteration; a) riser temperature, combustion air flow rate and conversion; b) temperature rise in the freeboard and O2 molar fraction in the flue gas The optimal solution requires decreasing Tra_sp(t) and Vrg1(t) across time and cutting down the additive amount of CO promoter. In addition, the conversion decreases overall across time, which fits the dynamic of deactivation of CO promoter, and the temperature rise in the freeboard and O2 molar fraction in the flue gas almost lie below the upper bound. All in all, the benefit of adding CO promoter is fully exploited, and combustion air is saved. 4. Conclusions In this study, the conception and mathematical description of the continuous chemical process with batch operations is proposed. In order to implement dynamic optimization on the case study of FCCU with CO promoter, an augmented dynamic model is developed, which qualitatively incorporates the batch operation into dynamic model. Then the optimization is solved by CVP with refinement. The result shows that optimizing continuous and batch control variables together gains considerable benefits during preserving constraints. References de Prada C., Mazaeda R., Podar S., 2018, Optimal operation of a combined continuous–batch process, Computer Aided Chemical Engineering, 44, 673-678. Huang D., Luo X., 2018, Process transition based on dynamic optimization with the case of a throughput- fluctuating ethylene column. Industrial & Engineering Chemistry Research, 57(18), 6292-6302. Liu D., Ma F., He S., 2001, Deactivation kinetics of Pt/Al2O3 promoter in a catalytic cracking regenerator. Petrochemical Technology, 30(1), 5-8. Pakniyat A., Caines P. E., 2015, On the relation between the hybrid minimum principle and hybrid dynamic programming: a linear quadratic example, IFAC-PapersOnLine, 48(27), 169-174. Wang R., Luo X., Xu F., 2014, Economic and control performance of a fluid catalytic cracking unit: Interactions between combustion air and CO promoters. Industrial & Engineering Chemistry Research, 53(1): 287–304. Wang X., Cai J., 2010, Energy saving innovation to control system of main air compressor in FCCU. Petrochemical Industry Technology, 17(1), 29-32. Zhai C., Wang R., Ren Z., Sun W., 2017, Dynamic optimization of fed-batch fermentation with constraint on wastewater discharge, Chemical Engineering Transactions, 61, 499-504, DOI:10.3303/CET1761081. 8 12 16 20 1 2 3 4 5 A m o u n t o f A d d e d C O P ro m o te r/ k g Number of Basis Functions (a) Lower Bound Upper Bound 8 12 16 20 300 800 1,300 1,800 2,300 C o s t F u n c ti o n /¥ Number of Basis Functions (b) 756