CHEMICAL ENGINEERING TRANSACTIONS VOL. 61, 2017 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Petar S Varbanov, Rongxin Su, Hon Loong Lam, Xia Liu, Jiří J Klemeš Copyright © 2017, AIDIC Servizi S.r.l. ISBN 978-88-95608-51-8; ISSN 2283-9216 Real-time Optimization and Control of an Industrial Ethylbenzene Dehydrogenation Process Xiaoqiang Wanga,b, Vladimir Mahalecb,*, Zhi Lia, Feng Qiana aKey Laboratory of Advanced Control and Optimization for Chemical Processes (East China University of Science and Technology) , Ministry of Education, Shanghai 200237, China bDepartment of Chemical Engineering, McMaster University, Hamilton, ON, Canada L8S 4L7 mahalec@mcmaster.ca Styrene is one of the most important monomers in the petrochemical industry. In this study, a novel methodology for tight integration of Real-Time Optimization (RTO) and Model Predictive Control (MPC) is applied to an industrial ethylbenzene dehydrogenation process for producing styrene. This optimization-control framework is able to improve the automation level of ethylbenzene dehydrogenation process under various unfavourable conditions, especially the plant-model mismatch and disturbances. In the RTO layer, a constraint-adaptation strategy is adopted, which makes it easier to update the steady-state model. In the MPC layer, an MPC with Nonlinear Successive Linearization (MPC-NSL) is employed to deal with the nonlinear dynamic characteristics of the process and to match the steady-state gain at the steady-state point. In addition, an economic Steady- State Target Optimization (SSTO) layer is inserted between RTO and MPC layers to update continuously the set-points for MPC. The two-layered integration framework is easy to maintain because the models adopted in the three layers originate from the same nonlinear dynamic model. The comprehensive dynamic model of the styrene process is developed based on two large core fixed-bed axial-radial flow reactors described by Partial Differential Algebraic Equations (PDAE). The model parameters are corrected, and accuracy is validated using actual industrial data before it is used for simulation. Case study shows that the proposed optimization-control framework significantly improves the operation level. 1. Introduction Styrene is the fourth most important monomer in the petrochemical industry (Yee et al., 2003) mainly produced by catalytic ethylbenzene dehydrogenation. Studies of this process started with the modelling of the reactor based on the homogeneous model (Sheel and Crowe, 1969), followed by the heterogeneous model coupling dusty gas model for axial-flow reactor (Elnashaie et al., 1993) and radial-flow reactor (Tamsilian et al., 2012). Optimization of operation explored the optimal steam injection location along the catalytic bed (Clough and Ramirez, 1976) while heuristic multi-objective optimization algorithms: NSGA (Yee et al., 2003), MODE (Gujarathi and Babu, 2010) were used to study the problem of maximizing three conflicting objectives. Plant- wide control methodologies were applied in order to maximize economic profits via control structure designs simulating based on HYSYS (Vasudevan et al., 2009) and Aspen Plus (Luyben, 2011). In practice, the optimal operating conditions obtained by off-line optimization and design may not be feasible or optimal for the real process, while (Müller et al., 2012) proposed to combine process models with plant operating data for the optimization of process operation. Integration of RTO and MPC is a good choice to adapt to unfavorable actual conditions. The main problem in integrating RTO and MPC is the inconsistency of models used in RTO and in MPC, as well as their mismatches with the process. Two main approaches were proposed to address this problem. The one- layered approach merges RTO and MPC into a single layer (Zanin et al., 2002), which may be computational expensive due to difficulties in solving the resulted NLP problem. (Souza et al., 2010) improved this approach by including the gradient of economic objective into the objective of controller. But the weighting factors in the objective function should be carefully tuned to keep stability and performance (Adetola and Guay, 2010). What’s more, this approach lacks functional transparency and complicates human interaction and engineering (Kadam DOI: 10.3303/CET1761053 Please cite this article as: Wang X., Mahalec V., Li Z., Qian F., 2017, Real-time optimization and control of an industrial ethylbenzene dehydrogenation process, Chemical Engineering Transactions, 61, 331-336 DOI:10.3303/CET1761053 331 and Marquardt, 2007). The two-layered approach is a cascaded feedback control system based on the established time-scale decomposition in the automation hierarchy. It usually employs a Steady-State Target Optimization (SSTO) layer between RTO and MPC for continually calculating best admissible targets for the MPC based on steady-state version of the dynamic model in MPC. The performance and stability was analyzed by (Ying and Joseph, 1999). (Marchetti et al., 2014) discussed three designs of SSTO. (Ławryńczuk et al., 2008) proposed to improve the consistency between the models in SSTO and the comprehensive model in the RTO layer by linear or linear-quadratic approximations, and it was applied in a yeast fermentation process (Ławryńczuk, 2011). In this study, the comprehensive dynamic model of ethylbenzene dehydrogenation process is developed and validated by industrial data. In the RTO layer, the constraint-adaptation is adopted as suggested in (Chachuat et al., 2009) instead of the model-parameter adaptation strategy. Different versions of the nonlinear dynamic model are used in three layers: nonlinear steady-state model in the RTO layer, linearized dynamic model in the MPC layer, steady-state linearized dynamic model in the SSTO layer. Two strategies for updating the linear model in MPC are compared. Plant-model mismatch is introduced to test the proposed framework under measurable or unmeasurable disturbances. 2. Dynamic model of the ethylbenzene dehydrogenation process Figure 1: Schematic diagram of the process The schematic diagram of the process is shown in Figure 1. The ethylbenzene dehydrogenation is an endothermic and reversible reaction, where the heat is provided by the superheated steam. In this study, the reactor model is described by Eq(1), Eq(2) and Eq(3) with the following assumptions: (1) Ideal gas mixture because of the reactor is operated under high temperature and low pressure. (2) Uniform flow: the deflector in the reactor promotes the uniform flow pattern. (3) No mass or heat diffusion in the axial direction - the pressure drop only exists in the radial direction. (4) Reaction only occurs in the catalyst bed. (5) Only the radial-flow part is considered because the axial-flow part has very small impact. (1) (2) (3) The reactor model is a pseudo homogeneous model, but total heat capacity (Edvaldo Rodrigo et al., 2011) including heat capacity of catalysts is considered in the energy balance equation. The reaction kinetics model with corrected reaction rate parameters based on (Tamsilian et al., 2012) is shown in Table 1, while structure 332 parameters of reactors are shown in Table 2. The differentiation on radial direction is discretized using Orthogonal Collocation on Finite Elements (OCFE). Table 1: Reaction kinetics model No. Reaction Reaction rate ( j A ) ( j E ) 1 6 5 2 3 6 5 2 2 C H CH CH C H CHCH H« + 1 1 2 ( / ) EB STY H EB R k P P P K= - -0.3626 80,700.0 2 6 5 2 3 6 6 2 4 C H CH CH C H C H® + 2 2 ( ) EB R k P= 18.4053 250,000.0 3 6 5 2 3 2 6 5 3 4 C H CH CH H C H CH CH+ ® + 3 3 2 ( ) EB H R k P P= 0.1616 87,300.0 4 2 2 4 2 2 2 4H O C H CO H+ ® + 0.5 4 4 2 ( ) H O ETH R k P P= 0.1200 102,996.0 5 2 4 2 3H O CH CO H+ ® + 5 5 2 ( ) H O MET R k P P= -3.2100 65,723.0 6 2 2 2 H O CO CO H+ ® + 3 6 6 H2O CO R = k (P P )P / T 21.2402 76,382.0 exp( / ) j j j k A E RT= - , 2exp(-(122 725-126.3T-0.002194T )/RT) EB K = , 18.3144R kJ kmol K-= × × Table 2: Structure parameters of the reactors Catalysts Value R1 Value R2 Value Catalyst bulk density 1,350 kg/m3 Length 14.2 m Length 15.2 m Catalyst particle diameter 0.0037 m Inner diameter 0.75 m Inner diameter 0.80 m Bed void fraction 0.27 Outer diameter 1.40 m Outer diameter 1.50 m Heat capacity 0.92 kJ/kg/K Table 3: Parameters of the heat exchangers 2( / / ) ref U kW m K ( / ) ref F kg h 2( )A m E1 0.0343 40,567.40 2,000 E2 0.0835 73,973.75 800 The parameters for the two heat exchangers are shown in Table 3. The heat transfer coefficients of heat exchangers E1 and E2 are modelled using power-law: 0.8 ( / ) ref m ref U U F F= ´ . The furnaces F1 and F2 are modelled as heaters with 5-min lag. A lumped model with phase equilibrium inside is adopted for the evaporator (Fu et al., 2006). Figure 2: Validation of the dynamic model Validation of the developed model (marked as ‘M1’) from actual industrial data at a typical steady-state operating condition is illustrated in Figure 1. The validation of the dynamic model is shown in Figure 2 with five inputs at a sampling time of 15 minutes. The total trend of the dynamic responses matches the industrial measurements, with errors in ±1 % in value amplitudes. The errors may be caused by (1) Simplification assumptions and parameter errors; (2) Not measured temperature of ethylbenzene stream; (3) Unmeasured composition of ethylbenzene stream. Because the validation data were collected during the start-up, the temperature of 333 ethylbenzene stream may not be at high value (kept at 160 oC in the model) and this stream may not be pure. Any model cannot include all uncertainties of the process and predict perfectly, especially in process industry. In addition, the PID control loops which are consistent with the actual plant are added to the model as shown in Figure 1. 3. Integration of RTO and MPC In this study, an inaccurate model M2 is generated by introducing kinetics parameters mismatches (reaction rates increase by 20 %) to the developed dynamic model M1. Then nonlinear ARX models M3 based on sigmoid neural networks are identified from responses of M2. M3 has more mismatches with M1, which is used to simulate the real process. We define four input variables u1(kg/h), u2(kg/h), u3(oC), u4(oC) which are the set- points of FC1, FC3, TC1, TC2 respectively, as well as three output variables: y1(oC), R1 inlet temperature; y2(oC), R2 inlet temperature; y3(kmol/h), styrene flowrate in R2 product stream. Set-point of FC2 is deb(m3/h), which is not modelled in M3 (kept unchanged while identification). Three multi-input single-output ARX models for the three output variables are identified. The equations of nonlinear ARX model are shown in Eq(4) at a sampling time of 0.5 h. Each neural network has 10 hidden neurons. (4) The nonlinear ARX model is trained by a data set with 1000 points and validated by another data set having 200 points. The steady-state predictive ability of the nonlinear ARX model is tested by 1000 steady-state points generated by Latin Hypercube Sampling. Rooted mean square errors (RMSE) are summarized in Table 4. Table 4: RMSE of the identified model M3 y1 y2 y3 Training of dynamic model M3 0.2157 0.1737 0.2017 Validation of dynamic model M3 0.3068 0.3241 0.5972 Steady-state validation 0.8398 0.7928 1.7603 An input-output constrained RTO problem based on constraint-adaptation strategy is defined in Eq(5). The prices of styrene and ethylbenzene are 103/kmol and 316.08/m3 respectively. The prices of steam considers the consumption of energy. ε is the bias between the actual measurements and the predicted values at steady state. With iterations of RTO, the system will converge to a feasible but maybe suboptimal operating point for the process (Marchetti et al., 2009). The SSTO problem is formulated as Eq(6), which is an approximation of the RTO problem (Marchetti et al., 2014). The input-output constraints are included in SSTO as well. Due to the derivability of the neural networks, Eq(4) is easily transformed to a linear ARX model for MPC, while its steady- state version ys=Gus+y0+d is adopted in SSTO. (us, ys) are the set-points for the MPC. d is an output disturbance model to compensate the dynamic model. H is the hessian matrix at (u*,y*). SSTO executes at the same frequency with the MPC. The integration framework is shown in Figure 3. In this study, two integration strategies are compared. Algorithm I. Algorithm I is modified from (Marchetti et al., 2014), in which only the steady-state gain of linear model in MPC is adjusted to match that of (u*,y*) at the start of each RTO iteration. In this study, a dynamic model linearized at (u*,y*) from the nonlinear dynamic model M3 is used in MPC. Algorithm II. The dynamic model in MPC is linearized at current operating condition. Thus, the steady-state gain will match the steady state point ( , )u y at the end of each RTO iteration, while in Algorithm I the steady-state gain will have a mismatch if ( , ) ( *, *)u y u y¹ which is a frequent occurrence under plant-model mismatch. This property is helpful to meet the KKT condition of RTO, and to accelerate the convergence speed. Two improvements are expected: (1) Control performance; (2) Convergence speed of RTO because the steady- state gains of the linearized model at the end of each RTO iteration will match the gradients of the nonlinear steady-state model in RTO problem. (5) 334 (6) 4. Simulation results and analysis The measurable disturbance d1 (deb decrease by 3%) is introduced after the 3rd RTO calculation and unmeasurable disturbance d2 (mass fraction of ethylbenzene stream in deb decreases by 5 %, mass fraction of styrene increases by 5 %) is introduced after the 6th RTO calculation. For simplicity, the period for RTO calculation is fixed to 10 h to make sure that the process reaches to steady state, though methods for detecting steady state can be adopted to shorten the period. The dynamic responses are shown in Figure 4. If the calculated results of RTO are applied to the process directly (open-loop RTO), more periods are needed to converge and there are severe constraint violations especially when disturbances enter into the process. But if Algorithm I and Algorithm II are applied, the system will converge faster without constraint violations when the steady state is reached. Algorithm II exhibits better control performances than Algorithm I, especially in the first RTO period. When unmeasurable disturbance d2 enters into the process, Algorithm II drives the process to a steady state which is closer to the final convergent operating point shown between 50 - 60 h, which relieves the operation fluctuation. Figure 3: Structure for integration of RTO and MPC Figure 4: Dynamic responses 5. Conclusion In practice, it is inevitable to have plant-model mismatches due to lots of uncertainties in process industry. In this study, we have presented a two-layered framework which adopts models originated from the same nonlinear dynamic model. There are no mismatches between models inside the optimization-control layers, especially no mismatches of the steady-state gains. The measurements are used to compensate the mismatches between models and the actual process for closed-loop optimization and control. The optimization-control framework is applied on an industrial ethylbenzene dehydrogenation process. Simulation results show that the proposed framework is efficient in control performance and convergence speed under plant-model mismatch and disturbances. 335 Acknowledgments The first author would like to acknowledge the financial support of China Scholarship Council (CSC), No.201506740033. This work was supported by the National Natural Science Foundation of China (61333010, 61422303, 61590922) and Fundamental Research Funds for Central Universities. References Adetola, V., Guay, M., 2010. Integration of real-time optimization and model predictive control. Journal of Process Control, 20, 125-133. Chachuat, B., Srinivasan, B., Bonvin, D., 2009. Adaptation strategies for real-time optimization. Computers & Chemical Engineering, 33, 1557-1567. Clough, D. E., Ramirez, W. F., 1976. Mathematical modeling and optimization of the dehydrogenation of ethylbenzene to form styrene. AIChE Journal, 22, 1097-1105. Edvaldo Rodrigo, M., Delba Nisi Cosme, M., Adriano Pinto, M., Maciel Filho, R., 2011. Suiting Dynamic Models of Fixed-Bed Catalytic Reactors for Computer-Based Applications. Engineering, 03, 778-785. Elnashaie, S. S., Abdalla, B. K., Hughes, R., 1993. Simulation of the industrial fixed bed catalytic reactor for the dehydrogenation of ethylbenzene to styrene: heterogeneous dusty gas model. Industrial & Engineering Chemistry Research, 32, 2537-2541. Fu, D. G., Poncia, G., Lu, Z., 2006. Implementation of an object-oriented dynamic modeling library for absorption refrigeration systems. Applied Thermal Engineering, 26, 217-225. Gujarathi, A. M., Babu, B., 2010. Multi-objective optimization of industrial styrene reactor: Adiabatic and pseudo- isothermal operation. Chemical Engineering Science, 65, 2009-2026. Kadam, J. V., Marquardt, W., 2007. Integration of economical optimization and control for intentionally transient process operation, Springer. Ławryńczuk, M., 2011. Online set-point optimisation cooperating with predictive control of a yeast fermentation process: A neural network approach. Engineering Applications of Artificial Intelligence, 24, 968-982. Ławryńczuk, M., Marusak, P., Tatjewski, P., 2008. Cooperation of model predictive control with steady-state economic optimisation. Control and Cybernetics, 37, 133-158. Luyben, W. L., 2011. Design and control of the ethyl benzene process. AIChE journal, 57, 655-670. Müller, D., Höser, S., Kahrs, O., Arellano-Garcia, H., Wozny, G., 2012. Optimization of process operation strategies by combining process models with plant operating data. Chemical Engineering Transactions, 29, 1495-1500. Marchetti, A., Chachuat, B., Bonvin, D., 2009. Modifier-adaptation methodology for real-time optimization. Industrial & Engineering Chemistry Research, 48, 6022-6033. Marchetti, A., Ferramosca, A., González, A., 2014. Steady-state target optimization designs for integrating real- time optimization and model predictive control. Journal of Process Control, 24, 129-145. Sheel, J. G., Crowe, C., 1969. Simulation and optimization of an existing ethylbenzene dehydrogenation reactor. The Canadian Journal of Chemical Engineering, 47, 183-187. Souza, G. D., Odloak, D., Zanin, A. C., 2010. Real Time Optimization (Rto) With Model Predictive Control (Mpc). Computers & Chemical Engineering, 34, 1999–2006. Tamsilian, Y., Ebrahimi, A. N., Ramazani SA, A., Abdollahzadeh, H., 2012. Modeling and sensitivity analysis of styrene monomer production process and investigation of catalyst behavior. Computers & Chemical Engineering, 40, 1-11. Vasudevan, S., Rangaiah, G., Konda, N. M., Tay, W. H., 2009. Application and evaluation of three methodologies for plantwide control of the styrene monomer plant. Industrial & Engineering Chemistry Research, 48, 10941-10961. Yee, A. K., Ray, A. K., Rangaiah, G., 2003. Multiobjective optimization of an industrial styrene reactor. Computers & Chemical Engineering, 27, 111-130. Ying, C. M., Joseph, B., 1999. Performance and stability analysis of LP‐MPC and QP‐MPC cascade control systems. AIChE Journal, 45, 1521-1534. Zanin, A. C., Gouvêa, M. T. d., Odloak, D., 2002. Integrating real-time optimization into the model predictive controller of the FCC system. Control Engineering Practice, 10, 819–831. 336