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 On-Line Model-Based Control of Crystal Size Distribution in Cooling-Antisolvent Crystallization Processes Navid Ghadipashaa, Jose A. Romagnoli*a, Stefania Troncib, Roberto Barattib a Dept. of Chemical Engineering, Louisiana State University, South Stadium Road, Baton Rouge, LA 70803 b Dipartimento di Ingegneria Meccanica, Chimica e dei Materiali, Universit_a degli Studi di Cagliari, Piazza D’Armi, I-09123, Cagliari, Italy jose@lsu.edu This contribution deals with the formulation and implementation of different nonlinear model-based controllers for controlling the crystal size distribution (CSD) in non-isothermal antisolvent crystallization processes. Three different control algorithms are developed and tested experimentally. First, knowing the exact transfer function of the crystal mean size and CSD variance as a function of antisolvent feed rate and temperature, an internal model based controller is defined to achieve the desired CSD characteristics. Subsequently, by exploiting the analytical solution of the CSD mean size, the geometric linearizing controller is developed to track the system to the target. An alternative configuration of the geometric linearizing controller is also tested using an observer based PI controller, which is more convenient for experimental implementation. Experimental validation of the strategies is carried out for the ternary system of water-ethanol-sodium chloride. 1. Introduction Crystallization is a widely used technique for the separation and purification of crystalline solid products. It is a ubiquitous unit operation in many industries including food, pharmaceutical and fine chemicals. One of the important structural property of the crystals which can largely influence the textural and physical characteristics of the particles is the crystal size distribution (CSD). For example, the shape of the CSD can have considerable impact on the product features such as dissolution rate, bulk densities and packing properties. A great deal of effort on controlling the CSD has been reported in the literature (e.g., Nagy and Braatz, 2012) most of them using the population balance equations (PBE) for dynamic modelling of the crystallization systems. One of the main issue using PBE is that it may result in complex dynamic models which cannot be easily used for model-based control designs and real time implementation. As an alternative, it was recently shown by Grosso et.al (2011) that it is possible to describe a crystallization process by means of a stochastic approach which allows the obtainment of the CSD evolution with respect to time using the Fokker−Planck equation. The proposed formulation provides a global model to describe the parameter dependence on operation conditions (Cogoni et al., 2013) and recently such approach was generalized applying the noise induced transition theory, which led to the obtainment of deterministic nonlinear differential equation describing mean and mode of the CSD (Baratti et al., 2016). In this contribution, different model based feedback control strategies were applied and compared to achieve a specific particle size distribution in the crystallization of sodium chloride in water using ethanol as antisolvent. The proposed methodology utilizes the benefits of combining cooling and antisolvent flow rate as manipulated inputs, and a novel stochastic model to describe the time evolution of particle characteristics enables the design of model based controllers and off-line determination of optimal trajectories. DOI: 10.3303/CET1757181 Please cite this article as: Ghadipasha N., Romagnoli J., Tronci S., Baratti R., 2017, On-line model-based control of crystal size distribution in cooling-antisolvent crystallization processes, Chemical Engineering Transactions, 57, 1081-1086 DOI: 10.3303/CET1757181 1081 2. Crystallization model In a previous work (Baratti et al., 2017) the noise induced transition theory was applied to describe the dynamic behaviour of CSD. Starting from the stochastic equation (1) for the crystal size L 𝑑𝐿(𝑡) 𝑑𝑡 = ℎ(𝐿, 𝑡) + 𝑔(𝐿, 𝑡)𝜂(𝑡) (1) where h(L,t) is the deterministic growth term, g(L,t) is the random component which takes into account growth fluctuations and the unknown dynamics, (t) is a random term assumed as Gaussian additive white noise, the probability density distribution of L is given by the Fokker-Planck equation (2) ∂𝜓(𝐿,𝑡) 𝜕𝑡 = 𝜕 𝜕𝐿 {−[ℎ(𝐿) + 𝐷𝑔′(𝐿)𝑔(𝐿)]𝜓(𝐿, 𝑡) + 𝐷 𝜕 𝜕𝐿 𝑔2(𝐿)𝜓(𝐿, 𝑡)} (2) with the following initial (2a) and boundary conditions (2b,c): 𝜓(L, t0) = 𝜓0(𝐿), 𝑡 = 𝑡0 (2a) D {𝑔(𝐿) 𝜕 𝜕𝐿 𝑔(𝐿)𝜓(𝐿, 𝑡)} = ℎ(𝐿)𝜓(𝐿, 𝑡) at L=0, t > t0 (2b) ∂𝜓(𝐿,𝑡) 𝜕𝑡 = 0 at 𝐿 → ∞ and t > t0 (2c) where g’(L) is the derivative with respect to the state L. It is possible to demonstrate that the mean of the distribution can be approximated by (see Baratti et al., 2017) 𝑑�̂� 𝑑𝑡 = ℎ(�̂�) (3) According to the previous studies (Cogoni et al., 2014; Baratti et al., 2017), the following functions are used to describe the crystallization system ℎ(𝐿) = 𝑟𝐿 (1 − 𝐿 𝐾 ) , 𝑔(𝐿) = 𝐿 (4a,b) 𝑟(𝑞, 𝑇) = 𝛾0𝑟 + 𝛾1𝑟 𝑞 + 𝛾2𝑟 𝑇 (5) 𝐾(𝑞, 𝑇) = 𝛾0𝐾 + 𝛾1𝐾 𝑞 2 + 𝛾2𝐾 𝑇 2 𝐷(𝑞, 𝑇) = 𝛾0𝐷 + 𝛾1𝐷 𝑞 + 𝛾2𝐷 𝑇 2 with T and q indicating temperature and antisolvent flow rate, respectively, and the following values for the model parameters 𝛾0𝑟 = 1.69312; 𝛾1𝑟 = 0.47074 ; 𝛾2𝑟 = −0.03831 𝛾0𝐾 = 141.7756; 𝛾1𝐾 = −3.11423; 𝛾2𝐾 = 0.02796 𝛾0𝐷 = 0.28094; 𝛾1𝐷 = 0.06687; 𝛾2𝐷 = −0.0002136 3. Controllers Three different model based control strategies were applied to track the system to the desired CSD. The antisolvent flow rate was used ad manipulated variable to control the mean size of the distribution, while temperature followed a reference trajectory obtained off-line with an optimization procedure. An optimal mean trajectory was also calculated and used as input for the internal model control. 3.1 Internal model control A linear approximated model is obtained from Eq. (3) and (4a), using the relationships (5) calculating the deviation from the reference trajectory. The model in Laplace Transform domain is reported in Eq. (6a) �̅�(𝑠) = 𝐾𝑝 𝜏𝑠+1 �̅�(𝑠) (6a) where 1082 𝜏 = 𝛾1,𝐾 𝑞 ∗+𝛾0,𝐾 𝛾1,𝑟 𝑞 ∗+𝛾0,𝑟 , 𝐾𝑝 = 𝜏 ( 𝜕ℎ 𝜕𝑟 𝜕𝑟 𝜕𝑞 | ∗ + 𝜕ℎ 𝜕𝐾 𝜕𝐾 𝜕𝑞 | ∗ ) (6b) The asterisk indicates that the parameters are calculated at the reference trajectory. Eq. (6) can be used to obtain the IMC controller (Garcia et al., 1989), reported in Eq. (7) 𝐺𝑐 = 𝜏𝑠+1 𝐾𝑝 1 𝜆𝑠+1 (7) where is the tuning parameter and Kp and are adapted along the reference trajectory. 3.2 Linearizing control Let consider a stable linear tracking error reference trajectory (Bastin and Dochain, 1990) 𝑑 𝑑𝑡 [�̂�∗(𝑡) − �̂�(𝑡)] = 𝜆1(�̂� ∗ − �̂�) + 𝜆2 ∫(�̂� ∗ − �̂�)𝑑𝑡 (8) where the coefficients λiiare tuning coefficients which are to be chosen so that the differential equation (8) is stable. The reference trajectory is reported in (9) where q* and T* are the inputs values leading to the desired CSD in terms of mean and variance and they have been calculated solving the FPE (2) at steady state conditions (Cogoni et al., 2014) 𝑑 𝑑𝑡 �̂�∗(𝑡) = 𝑟(𝑞∗, T∗)�̂�∗(𝑡) (1 − �̂�∗(𝑡) 𝐾(𝑞∗,T∗) ) (9) Substituting (9) and (3) with 4a and 5 in (8), at given temperature, it is possible to obtain the q value which allows the system to follow the reference trajectory. Because the parameter dependence on q is nonlinear, the equation (8) was solved numerically. 3.3 Observer-based controller Let consider the linear model in deviation variables (10) 𝑑�̃� 𝑑𝑡 = aq̃ + b, a = ∂h 𝜕𝑞 | 0 (10) where a is a constant and it is obtained evaluating the h derivative at nominal condition, and b considers the modeling errors due to model linearization. Applying the reference trajectory (11) 𝑑�̃� ∗ 𝑑𝑡 = K(𝐿 − 𝐿∗) = −𝐾�̃� (11) where K is a positive tuning parameter, it is possible to calculate the value of �̃� from Eq. (10) satisfying (11) −𝐾�̃� = aq̃ + b, q̃ = −𝐾�̃�−b 𝑎 (12) The parameter b can be reconstructed through the first order observer in (13) as reported in Castellanos- Sahagún (2005) �̇̂� = 𝜔(𝑏 − �̂�) = 𝜔(�̇� − 𝑎�̃� − �̂�) with �̂�(0)=0 (13) where is the observer gain. The coordinate change in (14) is applied to avoid noise sensitiveness due to the derivative of 𝐿 with respct to time (�̇�). 𝜒 = (�̂� − 𝜔�̃�), �̇� = (�̇̂� − 𝜔�̇�) = −𝜔𝜒 − 𝜔(𝑎�̃� + 𝜔�̃�), 𝜒(0) = 0 (14) 4. Experimental set-up In order to validate the proposed optimization and control strategies, crystallization of sodium chloride in water using ethanol as antisolvent is considered as a case study. Sodium chloride (reagent plus 99%) (SIGMA- ALDRICH, United States), 190 proof ethanol (VWR, United States) and only deionized water are used. The reactor is made up of a 1 L glass, jacketed cylindrical crystallizer (Ace Glass Incorporated) which is submerged into a temperature control bath. Temperature is measured using an RTD probe which is wired up to a slave temperature control system (Thermo Fisher Scientefic) capable of heating and cooling. At the start up condition, the crystallizer is loaded with 34 g of NaCl in 100 g of water. Ethanol is added to the solution at different rates using a calibrated peristaltic pump (Masterflex Model 77200-60, Cole-Parmer). Mixing is 1083 provided by a propeller type agitator at the speed of 400 RPM. Along the experiment, particles are circulated throw a second pump (Masterflex Model 77201-60, Cole-Parmer) into a cell where they are lighted up by an illumination system. The cell provides a wide and thin layer of solution causing effective reflection from the crystals which makes it suitable for taking pictures. Images are captured continuously using a USB microscope camera (BASLER Model MD900) which fits into the side tube on the side of the microscope with one of the supplied adapters and connects to a computer. Using image-based texture analysis which is explained in more detail in Zhang et al. (2014), crystal size distribution at each sampling time is determined and the results are sent to the data acquisition and control computer which can communicate to the slave temperature and flow rate controllers using Labview (2009). In a parallel measurement, on-line monitoring of the solute concentration was also implemented. This additional measurement is not used specifically in the control algorithm but provide practical information regarding the rate of crystal mass evolution. The same approached applied by Ghadipasha et.al (2015) is used which is based on simultaneous measurement of conductivity, antisolvent mass fraction and temperature. This procedure states an inferential measurement of concentration whereby the conductivity, antisolvent mass fraction, and temperature are the primary measurements which are then translated into the secondary inferred measurement being the concentration. Conductivity is monitored on-line using an Orion 4 Star probe model 018020 MD which is applicable for solution of high concentration. Figure 1 shows a schematic representation of the experimental setup with the supervisory computer used to implement the CSD control. Figure 1: schematic representation of the experimental setup with the supervisory computer used to implement the CSD control 5. Results Initially the proposed mode-based controllers were tested through extensive simulation studies using the full FPE model as the plant. For realistic purposes uncertainties were introduced by adding an error to the antisolvent pump feeding the system. The final set-point was set equal to (µ,σ)=(132 µm,59.16 µm) and a specified trajectory (optimal) for the mean size was defined as the desired objective. An error of -10% on the initial flow rate was considered to insert some kind of realism to the simulation to fabricate the model-plant mismatch. Also a comparative analysis was performed between the behaviours of the proposed alternative controllers. Next, the proposed controllers were tested in the described experimental facilities using the same target as in simulation studies. For this purpose alternative controller blocks were developed and implemented within the experimental set-up already in place. Due to space limitation only the experimental results are shown in this work. The obtained closed-loop trajectories for the main targets and input variables are shown in Figures 2-4. Clearly all controllers achieve the target mean size with varying degree of performance. They are able to control the mean size, however the antisolvent flow rate trajectories to achieve the desired set point are different. Overall compared with the experimental results from Ghadipasha et.al (2015), the model-based controllers outperform the PI controller being the alternative linearizing control implementation the one showing the best performance. Smooth approach to target mean size and smooth control action can be observed in all three cases. Also as expected, the antisolvente flow rate for each of the controllers reach an asymptotic value very close to the one predicted from the asymptotic map (Ghadipasha et.al 2015). For all controllers, the standard deviation approaches values around 70-75% of the desired target with the alternative 1084 implementation of the linearizing control showing a smoother trajectory. The different control algorithms proposed will be also compared considering the CSD at the end of the batch. A number of images are taken and manually analyzed to produce the corresponding histogram. This representation of the experimental results requires that a very high number of crystals be considered to adequately describe the population of crystals, with a prohibitive effort for the experimentalists. According to previous studies (Grosso et al. 2011), a log-normal distribution is considered as best fit of the experimental data obtained at the end of the batch for the different runs. This analysis was applied to calculate the final CSD to compare with the target values. Figure 5 (left) provides a comparative analysis of the experimental CSD obtained at the end of the batch for each controller. There is quite a good agreement in all cases between the final CSD and the desired target with the linearizing controller having the best performance. The salt concentration data are also shown in Figure 5 (right) for the three control configurations. Results show similar trends for all cases which can be explained by the fact that all controllers attempt to produce a step change in the antisolvent flow rate toward the asymptotic value as indicated in the operating map. Figure 2: Results of the IMC controller Figure 3: Results of the linearizing controller Figure 4: Results of the observer-based controller 1085 Figure 5: End of the batch distribution and salt concentration for all the controller experiments 6. Conclusions Different control strategies which take into account the nonlinear and time varying nature of the system were applied to the non isothermal crystallization of sodium chloride in water with antisolvent. The proposed algorithms were based on a novel model, which allowed the obtainment of a deterministic nonlinear differential equation to describe the CSD mean time evolution as function of the model parameters. The proposed strategies were applied to an experimental plant, furnished with a sensor to measure mean and variance of the distribution. The model-based controllers outperformed the traditional PI controller reported in our previous study, evidencing the importance of adapting the controller parameter along the system trajectories and the efficiency of the proposed model. Reference Baratti R., Tronci S., Romagnoli J.A., 2017, A generalized stochastic modelling approach for crystal size distribution in antisolvent crystallization operations, AIChE J, 63, 551–559. Bastin, G., Dochain D., Eds. 1990, On-line estimation and adaptive control of bioreactors: Elsevier, Amsterdam, the Netherlands Castellanos-Sahagún E., Alvarez-Ramírez J., Alvarez J. , 2005, Two-point temperature control structure and algorithm design for binary distillation columns Ind. Eng. Chem. Res., 44(1), 142-152. Cogoni G., Tronci T., Mistretta G., Baratti R., Romagnoli J.A., 2013, Document Stochastic approach for the prediction of PSD in nonisothermal antisolvent crystallization processes, AIChE J, 59(8), 2843-2851. Cogoni, G., Tronci S., Baratti R., J.A. Romagnoli, 2014, Controllability of semibatch nonisothermal antisolvent crystallization processes, Ind. Eng. Chem. Res., 53(17), 7056-7065. Garcia C.E., Prett D.M., Morari M., 1989, Model predictive control: theory and practice—a survey, Automatica 25(3), 335-348. Ghadipasha N., Romagnoli J.A., Tronci S., Baratti R.,2015, On‐line control of crystal properties in nonisothermal antisolvent crystallization, AIChe J., 61(7), 2188-2201. Grosso M., Cogoni G., Baratti R., Romagnoli J.A, 2011, Stochastic approach for the prediction of PSD in crystallization processes: Formulation and comparative assessment of different stochastic models, Industrial and Engineering Chemistry Research, 50(4), 2133-2143. Nagy, Z.K., Braatz R.D., 2012, Advances and new directions in crystallization control, Annual review of chemical and biomolecular engineering, 3, 55-75. Zhang B., Willis R., Romagnoli J.A, Fois C., Tronci S., Baratti R, 2014, Image-Based Multiresolution-ANN Approach for Online Particle Size Characterization, Ind. Eng. Chem. Res., 53, 7008-7018. 0 100 200 300 400 500 600 0 0.002 0.004 0.006 0.008 0.01 0.012 L [m] P r o b a b il it y d e n s it y f u n c t io n IMC Linearizing Controller Observer-based controller Target 1086