CHEMICAL ENGINEERING TRANSACTIONS VOL. 57, 2017 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Sauro Pierucci, Jiří Jaromír Klemeš, Laura Piazza, Serafim Bakalis Copyright © 2017, AIDIC Servizi S.r.l. ISBN 978-88-95608- 48-8; ISSN 2283-9216 A Robust Model-based Control Approach for Online Optimal Feedback Control of Polymerization Reactors-Application to Polymerization of Acrylamide-water-potassium Persulfate (KPS) System Navid Ghadipashaa,Aryan Gerailia, Hector E. Hernandezb, Jose A.Romagnoli*a aDepartment of Chemical Engineering, Louisiana State University, Baton Rouge, LA 70803 bDepartamento de Ingenieria Quimica,Universidad de Guanajuato, Guanajuato, Mexico Jose@lsu.edu This contribution deals with the formulation and implementation of optimal nonlinear control strategies for controlling polymerization reactors in free radical polymerization. A multi objective optimization problem is first formulated to determine optimal trajectories for a range of target products. Alternative nonlinear control strategies are then formulated for controlling material concentrations and molar mass distributions (MMD) to robustly achieve the desired polymer properties. The strategies are based on the nonlinear input-output linearizing geometric approach which takes into account the nonlinear dynamics of the processes, formalized in the general dynamic model. Control case studies are discussed and implemented using different manipulated variables to force the system along the optimal targets. Performance of the controller is evaluated in each case and results are provided through investigations into the free radical polymerization of the acrylamide in water using potassium persulfate as initiator. 1. Introduction Control of polymerization reactors is an important section of the chemical industry which enables mass production of polymers with consistent quality. Producing uniform and in-specific polymers are of paramount importance to end user manufacturers who needs their products to be consistent for specific applications. Although advanced full feedback control of many type of reactors has been available for many years, the technology is less advanced for the polymeric systems. The principal difficulties in controlling polymerization reactors are related to the nonlinearities arising during the reaction due to gelation, high exothermicity and severe changes in kinetic coefficients of the system (e.g. propagation and termination rate). This makes the product quality achievement a much more complex issue and necessitates development of an advanced control strategy to regulate polymerization reactors. A primary goal in most of the polymerization reactions is to synthesize polymers with specific molar mass distribution (MMD). This is a fundamental polymer property which can affect markedly rheological and thermal properties of polymers such as strength and thermal stability. There has been many efforts in controlling MMD or molar mass averages such as 𝑀𝑛 and 𝑀𝑤 for example by Refinetti et.al (2014). Due to sensitive molecular structure of polymers, MMD can change by many factors such as concentration of material, reactor temperature or degree of mixing. While understanding the relationship between process inputs and control variables is a prerequisite for control design, quantifying an exact formulation between molar mass distribution and process variables is very difficult to establish. In this contribution we formulate and test a set of nonlinear controllers (using alternative manipulated variables) to control the material concentration and molar mass distribution (MMD) along their optimal trajectories. The strategies are based on the Exact Linearizing Control theory which relies on crucial prior knowledge of the process, formalized in the general dynamic model Soroush et.al (1992). An experimentally validated nonlinear process model was used first to perform dynamic optimization studies. To obtain a complete representation of the molar mass distribution, a similar methodology proposed by Crowley et.al DOI: 10.3303/CET1757185 Please cite this article as: Ghadipasha N., Geraili A., Hernandez H., Romagnoli J., 2017, A robust model-based control approach for online optimal feedback control of polymerization reactors-application to polymerization of acrylamide-water-potassium persulfate (kps) system, Chemical Engineering Transactions, 57, 1105-1110 DOI: 10.3303/CET1757185 1105 (1997) which is based on finite mass fractions is applied with modifications for dealing with semi-batch operations. The model incorporates the method of moment to obtain chain length distribution directly from kinetic rate equations. The validated model was then used for model-based optimization analysis to determine the optimal temperature profile in conjunction with the optimal monomer and initiator flow rates to reach a final target polymer. Results from the dynamic optimization are used as the set point of the controller. The model is applied to identify the input-output relationship for various possible choices of manipulated variables. In particular we derived the formulations to control the total amount of monomer by manipulating monomer flow. Furthermore, a non-linear controller is formulated to control the number average molar mass by manipulating initiator flow. It is demonstrated that by controlling number average molar mass and polymer concentration simultaneously, molar mass distribution can be controlled properly. To the best of author’s knowledge, this is the first time that a nonlinear model-based control method is applied for the feedback control of MMD. Polymerization of acrylamide in water using potassium persulfate (KPS) as initiator was used as an illustrative example to demonstrate the effectiveness of the proposed control strategy. 2. Process Model A detailed mechanistic model for solution polymerization of Acrylamide in batch and semi-batch reactors was developed and experimentally tested using the same approach proposed previously by Ghadipasha et.al (2016). Under standard assumptions such as well-mixed reactor, quasi steady state assumptions and long chain hypothesis, the following set of kinetic and dynamic equations describe the system: 𝑑𝑁𝑚 𝑑𝑡 = −(𝑘𝑝 + 𝑘𝑓𝑚 )𝑃0𝑁𝑚 + 𝐹𝑚 𝐶𝑚𝑓 − 𝐹𝑜𝑢𝑡 ∗ 𝐶𝑚 (1) 𝑑𝑁𝑖 𝑑𝑡 = −𝑘𝑑 𝑁𝑖 + 𝐹𝑖 𝐶𝑖𝑓 − 𝐹𝑜𝑢𝑡 ∗ 𝐶𝑖 (2) 𝑑𝑁𝑠 𝑑𝑡 = −𝑘𝑓𝑠 𝑁𝑠𝑃0+𝐹𝑖 𝐶𝑠𝑖𝑓 + 𝐹𝑚 𝐶𝑠𝑚𝑓 − 𝐹𝑜𝑢𝑡 ∗ 𝐶𝑠 (3) 𝑑(𝜆0𝑉) 𝑑𝑡 = (𝑘𝑓𝑚 𝑁𝑚 + 𝑘𝑡𝑑 𝑃0𝑉 + 𝑘𝑓𝑠 𝑁𝑠)𝛼𝑃0 + 1 2 𝑘𝑡𝑐 𝑃0 2𝑉 (4) 𝑑(𝜆1𝑉) 𝑑𝑡 = [(𝑘𝑓𝑚 𝑁𝑚 + 𝑘𝑡𝑑 𝑃0𝑉 + 𝑘𝑓𝑠 𝑁𝑠)(2𝛼 − 𝛼 2) + 𝑘𝑡𝑐 𝑃0𝑁] 𝑃0 (1 − 𝛼) (5) 𝑑(𝜆2𝑉) 𝑑𝑡 = [(𝑘𝑓𝑚 𝑁𝑚 + 𝑘𝑡𝑑 𝑃0𝑉 + 𝑘𝑓𝑠 𝑁𝑠 )(𝛼 3 − 3𝛼2 + 4𝛼) + 𝑘𝑡𝑐 𝑃0𝑉(𝛼 + 2) 𝑃0 (1 − 𝛼) ] 𝑃0 (1 − 𝛼)2 (6) Where 𝑁𝑚 = 𝐶𝑚𝑉 , 𝑁𝑖 = 𝐶𝑖 𝑉 , 𝑁𝑠 = 𝐶𝑠𝑉 , Here 𝑁𝑚 , 𝑁𝑖 and 𝑁𝑠 are the total moles of monomer, initiator and solvent inside the reactor.𝛼 is the probability of propagation and 𝑃0 is the concentration of live polymer. V represents the volume of the content of the reactor, 𝐹𝑚 and 𝐹𝑖 are the flow rates of monomer and initiator respectively which are fed to the reactor in the semi batch mode. 𝐹𝑜𝑢𝑡 is the constant flow rate out of the reactor for analysis purposes and 𝜆0 , 𝜆1 and 𝜆2 are the corresponding moments for the dead polymers. The model incorporates the method of finite molar mass moment to calculate chain length distribution directly from the kinetic equations. This approach which has been first introduced by Crowley et.al (1997) has been applied with some modifications for dealing with semibatch systems. 3. Dynamic Optimization The objective of the dynamic optimization is to provide optimal set point profiles for the controller. This will help the system to achieve standard closed-loop objectives and the process to operate economically. Decision variables in the optimization are selected based on their impact on the product quality and their capability for real time implementation. In the proposed case study, temperature, monomer and initiator flow rates were selected as decision variables. Temperature plays a key role in controlling the reaction kinetics which considerably affects the MMD. However, due to high exothermicity of polymerization reactions, the 1106 temperature profile cannot always be manipulated to control MMD. In this case monomer and initiator flowrates are powerful means of controlling MMD by affecting the concentration of the main feed to the reactor. Optimization of the model was performed using the gOPT function in gPROMS that applies the control vector parameterization (CVP) approach. For the proposed system the general optimal control problem is formulated as: min 𝑡𝑓,𝑢(𝑡),𝑣 𝐽(𝑡𝑓 ) Subjected to the process model and the following constraints: 𝑥(𝑡0) − 𝑥0 = 0 𝑡𝑓 𝑚𝑖𝑛 ≤ 𝑡𝑓 ≤ 𝑡𝑓 𝑚𝑎𝑥 𝑢𝑚𝑖𝑛 ≤ 𝑢(𝑡) ≤ 𝑢𝑚𝑎𝑥 𝑣𝑚𝑖𝑛 ≤ 𝑣(𝑡𝑓 ) ≤ 𝑣 𝑚𝑎𝑥 (10) Where J for the general case is defined as: 𝐽 = 𝑤1 ( 𝑋𝑓 𝑋𝑡 − 1) 2 + 𝑤2 ( 𝑀𝑤,𝑓 𝑀𝑤,𝑡 − 1) 2 + 𝑤3 ∑ ( 𝑓𝑖,𝑓 𝑓𝑖,𝑡 − 1) 2𝑛𝑐 𝑖=1 + 𝑤5(𝑁𝑚𝑓,𝑓 ) (11) Here 𝑥0 is the initial condition of the system including the initial loading in the reactor and 𝑡𝑓 stands for the time horizon while 𝑢(𝑡) indicates the control variables which are the temperature, monomer and initiator flow rates subjected to their lower and upper bounds. 𝑣𝑡 represents the time variant parameters being the volume of the contents of the reactor. The formulation of the objective function consists of four terms. 𝑋𝑓 ,𝑀𝑤,𝑓 and 𝑁𝑚𝑓,𝑓 are the monomer conversion, weight average molar mass and total amount of monomer which is fed to the reactor at the final time 𝑡𝑓 while 𝑋𝑡 and 𝑀𝑤,𝑡 are the desired target values for conversion and weight average molar mass. Total amount of monomer added to the reactor is considered in the objective function as it is desired to reach the final target using the minimum amount of material. 𝑤1 − 𝑤3 are the weighting factors, determining the significance of each term in the objective function. 4. Linearizing Control of Polymerization Reactors In this section we discuss about the control of state variables in a polymerization reactor. The purpose of control here is to keep the process state variables close to a pre-specified reference (optimal) value despite the disturbances and variations in process kinetics. In what follows we shall formulate alternative nonlinear control strategies based on the Exact Linearizing Control approach. 4.1 Control algorithms The control objective is to track a reference output signal indicated as 𝑦∗(𝑡) (set point of the control system). The principle of the linearizing approach is to find a control law 𝑢(𝜃, 𝑦∗) that is a multivariable nonlinear function of 𝜃 and 𝑦∗, such that the tracking error (𝑦∗ − 𝑦) is governed by a prespecified stable linear differential equation called a reference model. Here 𝜃 is a vector of parameters which are either measured on line or can be obtained from an observer. The control algorithm can be explained in three steps. First the input output model should be derived by appropriate manipulation of the general dynamic model. This provides an explicit relation between the manipulated variables and the control objectives which takes the form of a 𝑛𝑡ℎorder differential equation: 𝑑𝑛 𝑦 𝑑𝑡 𝑛 = 𝑓0(𝑡) + 𝑢(𝑡)𝑓1(𝑡) (12) With 𝑛 being the relative degree of the input/output model. Depending on the control and manipulated variables, 𝑓0(𝑡) and 𝑓1(𝑡) could be highly complex functions of the model parameters. However, the relation is always linear with respect to the manipulated variable. Secondly, a stable linear reference model of the 1107 tracking error (𝑦∗(𝑡) − 𝑦(𝑡)) is selected. The model determines how we desire the tracking error to decrease and presented as follow: ∑ 𝜆𝑛−𝑗 𝑑𝑗 𝑑𝑡 𝑗 [𝑦∗(𝑡) − 𝑦(𝑡)] = 0 𝜆0 = 1 𝑛 𝑗=0 (13) The coefficients 𝜆𝑛−𝑗 are tuning coefficients which should be selected so that the Eq(12) is stable. Finally the control design consists of calculating the control action 𝑢(𝑡) such that the input-output model exactly matches the reference model. Using Eq(12) and substituting for 𝑑 𝑛𝑦 𝑑𝑡 𝑛 in Eq(13) solution for 𝑢(𝑡) can be obtained: 𝑢(𝑡) = 1 𝑓1 (𝑡) [−𝑓0(𝑡) + ∑ 𝜆𝑛−𝑗 𝑑𝑗 𝑑𝑡𝑗 [𝑦∗(𝑡) − 𝑦(𝑡)] + 𝑑𝑛 𝑦∗ 𝑑𝑡 𝑛 𝑛 𝑗=0 ] (14) 4.2 Controlling total amount of monomer by manipulating monomer flow rate One way of controlling polymer composition is to feed monomer at a rate 𝐹𝑚 (𝑡) from a reservoir of monomer into the reactor. The formalism of the nonlinear controller using monomer flow as manipulated variable is considered in this case. The relative degree of Monomer flow with monomer composition is one thus simplifying the controller formulation. Using Eq(1) and substituting for 𝑑𝑦 𝑑𝑡 in Eq(14), an explicit relation for monomer feed rate 𝐹𝑚 (𝑡) can be obtained with respect to known variables: 𝐹𝑚 = 𝑑𝑁𝑚 𝑑𝑡 ∗ – 𝜆𝑝 [𝑁𝑚 ∗ − 𝑁𝑚𝑝 ] − 𝜆𝐼 [∫(𝑁𝑚 ∗ − 𝑁𝑚𝑝)𝑑𝑡] + 𝐹𝑜𝑢𝑡𝐶𝑚 + (𝑘𝑝)𝐶𝑝𝑁𝑚 𝐶𝑚𝑓 (15) Where, 𝑁𝑚∗ is the optimal known trajectory for total amount of monomer, obtained by applying the dynamic optimization on the system. 4.3 (Multi-loop Control): Controlling total amount of monomer and number average molar mass (Mn) by manipulating Monomer and Initiator flow rate In the following an alternative multi-loop controller scheme will be tested using, in addition to the nonlinear control for total amount of monomer, a second loop adjusting initiator flow to control the number average molar mass. Selection of number average molar mass as the second control parameter is based on the influence it has on the weight average molar mass results. The cumulative weight average molar mass can be calculated appropriately knowing the instantaneous weight average molar mass 𝑀𝑤,𝑖𝑛𝑠𝑡 and the mass of polymer in the reactor 𝑚𝑝: 𝑀𝑤(𝑡) = 𝑤 ∫ 𝑀𝑛,𝑖𝑛𝑠𝑡 𝑑𝑚𝑝(𝑡) 𝑡 0 𝑚𝑝(𝑡) (16) Where w is the “instantaneous polydispersity”, which is typically less than 2 for free radical polymerization. According to Eq(16) both 𝑀𝑛,𝑖𝑛𝑠𝑡 and 𝑚𝑝 should be tracked properly with respect to their nominal values to achieve the desired weight average molar mass. Here we assume that by applying the same technique as previous case, mass of polymer can be controlled around the nominal trajectory. Using the same principles described above and following the derivations for obtaining the controller formulation for controlling 𝑀𝑛, a single loop controller for number average molar mass using initiator as manipulated variable is as follow. 𝐹𝑖 = 𝑑2 𝑀𝑛 ∗ 𝑑𝑡 2 + 𝐵𝑀𝑛 − 𝜆𝑝(𝑀𝑛 ∗ − 𝑀𝑛𝑝) − 𝜆𝐼 ∫ (𝑀𝑛 ∗ − 𝑀𝑛𝑝) 𝑡 0 𝐴𝑀𝑛 (17) Where 𝐴𝑀𝑛 and 𝐵𝑀𝑛 are complex functions of 𝛼,𝜆 and 𝑃0 which is not shown here due to space limitations. 1108 5. Control Implementation For testing and simulating the performance of the proposed non-linear feedback controller, a controller module was formulated and implemented using Excel/ which interacts continuously with the gPROMS model (Plant) performing the control action in a regular number of sampling times. The set point trajectory is the optimal trajectory obtained during the optimization studies and while one of the input manipulated variables is adjusted by the feedback controller all other inputs are fixed according to the optimal recipe obtained previously. Uncertainty is introduced in the kinetic parameters of the model to account for a realistic simulation, emulating real plant behaviour. The three possible manipulated variables in this case are the temperature, monomer and initiator flow rates. Total amount of monomer has been selected as the control variable (single loop case) and its controllability with respect to the manipulated variables has been investigated. Conversion and weight average molar mass profiles are also sketched and compared with their nominal (optimal) trajectories. For the multi-loop controller, moles of monomer and number average molar mass were selected as the control variables and the initiator and monomer flow rates were applied as manipulated variables. Figure 1 shows a schematic representation of the approach followed in our simulation studies. Figure 1: Schematic representation of the proposed approach for optimization and nonlinear control of polymerization systems 6. Results and discussion Two optimization recipes are illustrated here to demonstrate the feasibility of the multi objective optimization discussed earlier. In the first problem the product qualities (conversion, weight average molar mass and molar mass distribution) are considered in the objective function given enough time and material for the reaction to reach the targets. In the second case total amount of monomer which is fed to the reactor is also considered in the objective function. For the sake of brevity, only the results of the second case is shown. As can be observed in Figure 2, there is a good agreement between the conversion, weight average molecular weight and molecular weight distribution profiles at the end of the reaction and their corresponding targets. Figure 2: Simulation results of the optimal trajectories considering conversion, weight average molar mass, molar mass distribution and cost function in the objective function for reducing the total amount of monomer 1109 The simulation results using the multi-loop configuration and using the optimal profiles as the set point are presented in Figure 3. As it is shown in Figure 3 in by controlling both 𝑁𝑚 and 𝑀𝑛, the controller is perfectly able to compensate for deviation in 𝑀𝑤 from almost the beginning of the reaction. This is extremely an important advantage since variation in weight average molar mass even at the start of the reaction would affect the final molar mass distribution and the product quality. Figure 3: Simulation results for controlling total amount of monomer and weight average molar mass by manipulating the monomer and initiator flow respectively 7. Conclusions Control of polymerization processes has been challenging due to the complexity of the polymeric systems. In this paper, a simple and consistent approach for controlling material concentration and weight average molar mass have presented. The controller applies a detailed nonlinear mechanistic model that is based on moments of dead polymer and material balance equations. A multi-loop scheme was structured to control the weight average molar mass. Simulation results showed good performance of the proposed technique. This approach is convenient for controlling polymerization reactors and paves the way for real-time applications of optimizing control ideas which is currently underway. Reference Crowley, T.J.,Choi, K.Y., 1997, Optimal control of molecular weight distribution in a batch free radical polymerization process. Ind Eng Chem Res. ,36,3676-3684 Ghadipasha, N., Geraili, A.,Romagnoli, J.A., Castor, C.A., Drenski, M.F., Reed, W.F., 2016, Combining on-line characterization tools with modern software environments for optimal operation of polymerization processes,4,5 Refinetti D., Sonzogni A., Manenti F., Lima N.M., Linan L.Z., Filho R.M., 2014, Modeling and Simulation of Poly(L-Lactide) Polymerization in Batch Reactor. The Italian Association of Chemical Engineering AIDIC. ,37, 2283-9216 Soroush M., Kravaris C., 1992, Nonlinear control of a batch polymerization reactor-an experimental-study. AIChE J. ,38,1429-1448 1110