Closed-Loop Composition and Molecular Weight Control of a

A control algorithm is designed and implemented experimentally for the simultaneous closed- loop control of the composition and number-average molecul...
1 downloads 0 Views 241KB Size
Ind. Eng. Chem. Res. 2002, 41, 2915-2930

2915

Closed-Loop Composition and Molecular Weight Control of a Copolymer Latex Using Near-Infrared Spectroscopy Raphael A. M. Vieira,† Claudia Sayer,‡ Enrique L. Lima,† and Jose´ Carlos Pinto*,† Programa de Engenharia Quı´mica/COPPE, Universidade Federal do Rio de Janeiro, Cidade Universita´ ria, CP 68502, CEP 21945-970, Rio de Janeiro-RJ, Brazil, and Departamento de Engenharia Quı´mica, Universidade de Sa˜ o Paulo, CEP 05508-900, Sa˜ o Paulo-SP, Brazil

A control algorithm is designed and implemented experimentally for the simultaneous closedloop control of the composition and number-average molecular weight of a copolymer latex. The developed control algorithm is based on a predictive control strategy and uses an iterative dynamic programming (IDP) algorithm for process optimization and design of the optimum dynamic trajectories at each sampling time. The control of semibatch methyl methacrylate (MMA) and butyl acrylate (BuA) emulsion copolymerizations is used to illustrate the approach. Monomer compositions and polymer holdup are measured in-line and in situ with the help of near-infrared spectroscopy (NIRS), while average molecular weights are inferred with the help of a process model. The manipulated variables are the flow rates of three distinct feed streams, which contain known concentrations of both monomer species and of a chain-transfer agent. The results obtained when different process disturbances are introduced, such as feed failure and addition of unknown amounts of inhibitor to the reactor charge, show unequivocally that NIRS can be used successfully for the in-line and in situ simultaneous control of copolymer composition and average molecular weights in emulsion copolymerizations. 1. Introduction It is well-known that profits and plant operation quality can be significantly increased through the wide implementation of plant automation and the adoption of advanced control strategies.1-3 This is particularly true in the polymer industry, as polymer materials are characterized as “product-by-process” materials, which means that the history of the reaction is of great importance in defining the final product properties and quality. In the polymer industry, it is generally very difficult to minimize specification drifts caused by process disturbances and uncertainties through the blending of different batch products and/or additional separation steps, as is usually done in other fields. Thus, the disposal of whole off-specification batches is not infrequent, with the consequent wasting of time, money, and raw materials. Two important microscale variables that strongly affect the final quality of polymer materials produced through copolymerization reactions are the copolymer composition and the average molecular weight. For example, drifts of copolymer composition can lead to significant modifications of the glass transition temperature (Tg) of copolymer materials, which can also lead to considerable alterations of the expected range of applicability. Similarly, drifts of the molecular weight distribution (MWD) and/or of the leading moments of the MWD can lead to significant changes of the mechanical and rheological properties of the polymer resin and, therefore, can exert a significant impact on the enduse applications of the polymer material.4,5 Despite the economical and technological relevance of closed-loop control solutions in the minimization of * Corresponding author: J. C. Pinto. E-mail: pinto@peq. coppe.ufrj.br. Tel.: 55-21-25628337. Fax: 55-21-25628300. † Universidade Federal do Rio de Janeiro. ‡ Universidade de Sa ˜ o Paulo.

undesired process drifts and despite the wide application of advanced control schemes in many other areas of the chemical industry, the use of advanced control techniques in the polymer industry is still incipient.6,7 This is usually attributed to difficulties in the performance of in-line and in situ measurements of process variables that can be easily related to chemical properties and macromolecular structure. This situation is even worse for emulsion polymerization processes, where the heterogeneity and complex nature of the reaction medium complicates the design and implementation of efficient closed-loop controllers. However, given the importance of polymer lattices for modern living, continuous efforts have been concentrated on the development of control alternatives for emulsion polymerization processes. To control the properties of polymer lattices produced through emulsion polymerizations, polymerization reactions are normally performed at plant sites under starved conditions and in semibatch mode. Comonomer feed rates in this case are close to the rates of polymerization, which usually ensures that the final desired composition is attained and that the risk of temperature runaways is circumvented. The unavoidable tradeoffs are longer batch times and lower polymer productivities. Alternatively, if some sort of process model is available, open-loop control policies can be designed and implemented. In this case, process models and numerical techniques can be used to calculate dynamic profiles for certain process variables, such as reactor temperature and monomer feed flow rate, to allow for the determination of optimum process operation conditions and guarantee the attainment of the desired final product specifications. If process feedback is not used and the computational effort is considerable, calculations are carried out before reaction startup and normally take the form of a reaction recipe. In this case, it is impossible

10.1021/ie0103557 CCC: $22.00 © 2002 American Chemical Society Published on Web 05/14/2002

2916

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

to remove undesired and unavoidable process disturbances, which means, in practice, that the final product specifications are subject to significant variations from batch to batch. Nevertheless, the development and implementation of open-loop control strategies is much more common than the implementation of closed-loop schemes, partially because of the poorly automated industrial setups and measurement problems discussed before. For additional details and a discussion of published material, the interested reader is encouraged to read some of the many surveys available in the open literature.7-9 Despite the usual operation procedures presented above, the continuous reduction of automation hardware and software costs, the development of breakthrough measuring technologies, the appearance of new datahandling and data-reduction techniques, and the inability of open-loop controllers to deal with model-plant mismatches and process disturbances/uncertainties point toward the development of closed-loop controllers. In recent years, process feedback has been taken into account in a number of process applications through the adaptation of off-line measurement techniques to allow for the in-line evaluation of some final polymer properties through auxiliary variables. In this group, one can cite works involving densimetry,10 chromatography,11-13 and viscometry,11,14 for example. However, some of the problems that are inherent to the ancestral off-line methods persist, such as complex sample withdrawal and pretreatment, long time delays, excessive noise levels, and the building of recirculation lines and clogging of recirculation pumps, among others. Furthermore, as secondary variables are usually measured, it is necessary to estimate the most important process states with the help of stochastic filters and/or deterministic observers. This is also the case for control schemes based on calorimetric data.15,16 A good opportunity for constructing reliable and truly real-time control schemes is the recent development and commercial availability of powerful spectroscopic equipment and statistical multivariate regression methods. In this respect, near-infrared spectroscopy (NIRS) and partial least squares (PLS) seem to be promising alternatives for the actual implementation of closed-loop control in emulsion polymerizations. An NIR spectrum consists of absorptions of radiation due to overtones and combination of overtones originating in the fundamental mid-infrared (MIR) region and is sensitive to concentration changes of different chemical species even in complex aqueous media. PLS is a data-reduction and regression method used to build reduced correlation models among the principal components of the variable space (observed absorptions as functions of a target property). Detailed presentations and explanations of NIRS17-20 and PLS21-23 theories can be found elsewhere. Gossen et al.24 developed an interesting study on the copolymerization of methyl methacrylate (MMA) and styrene, using NIRS to detect simultaneously the residual monomer concentrations, the polymer holdup, and the mean particle size with the aid of PLS. However, their results were based on synthetic latex samples and were not implemented for the actual monitoring and control of polymerization reactions. Wu et al.25,26 also reported that residual monomer concentrations could be tracked efficiently with NIRS during the emulsion homopolymerization of styrene. In this case, the monitoring capability was enhanced by the

strong correlation observed between the polymer holdup and the monomer concentration resulting from the reactor mass balance constraints. More recently, Vieira et al.27 showed that NIRS could, indeed, be used for the simultaneous and independent in-line and in situ monitoring of monomer concentrations and polymer holdup during the actual emulsion copolymerizations of MMA and butyl acrylate (BuA) and that NIRS was able to detect unknown process disturbances. In addition, Vieira et al.28 showed that NIRS could also be used to detect the formation of monomer droplets during semibatch reactions without any sort of model calibration, which is appealing for actual implementation of monomer feed policies under starved conditions. To the best of our knowledge, though, NIRS has not yet been used for the actual development and implementation of closed-loop strategies for emulsion polymerization reactors. The main objective of this paper is to design and implement a closed-loop strategy for the simultaneous in-line and in situ control of the copolymer composition and average molecular weights in an actual emulsion copolymerization reactor. According to the available material, this task has yet to be accomplished. The system selected for the experimental study is MMA/BuA copolymerization in semibatch reactors, given the importance of this system for the paint and adhesive industries. NIRS is selected as the adequate monitoring technique for providing feedback data, following Vieira et al.27,28 It is important to emphasize here that, despite the growing interest in NIR technology, very little is known about the actual performance of NIRS in the industrial environment. For this reason, there are some serious concerns about the reliability of NIRS performance at plant site. For instance, the use of on-line instruments in heterogeneous polymerization processes generally requires the simultaneous development of techniques to prevent the plugging of measuring devices. Furthermore, it is necessary to understand how real process fluctuations can interfere with instrument performance and measured data. To the best of our knowledge, the actual long-term performance of NIR technology in industrial polymerization processes has yet to be analyzed. However, it is also important to emphasize that NIRS performance in laboratory-scale processes is very robust and reliable. Our previous experience indicates that plugging can be prevented through proper agitation of the reaction medium and that NIR spectra can be reproduced from batch to batch with the usual experimental procedures. Santos29 investigated the influence of some important process variables on NIR spectra and observed that reactor temperature and solids content (holdup of the organic phase) can indeed interfere with NIR measurements, although both effects can be easily introduced into calibration models if necessary. Vieira et al.28 also showed that the presence of monomer droplets can modify NIR spectra through the scattering induced by the much larger size of monomer droplets when compared to the size of the polymer particles suspended in the polymer latex. In this case, Santos et al.30 showed that it might be necessary to include the agitation speed as an additional calibration variable, to take into account the effect of average particle size on the scattering of light. Therefore, depending on the particular objectives of the investigation, it might be necessary to include temperature, organic holdup, and

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002 2917

agitation speed, in addition to the composition of the organic phase, in the NIRS calibration model. In previous papers, Sayer et al.31-34 developed a process model for the semibatch emulsion copolymerization of MMA and BuA that allows for the computation of the dynamic trajectories of the copolymer composition and MWD. The model was then used for the development and implementation of optimum open-loop feed policies, aiming at the attainment of copolymer materials with a specified and homogeneous composition and a specified MWD along the batch. The design of the open-loop feed policies was based on an iterative dynamic programming (IDP) algorithm that transforms the original continuous optimization problem into a discrete optimization problem that can be solved iteratively at each sampling time for the computation of the optimum feed flow rates. Three distinct feed streams were used to operate the process and to allow for the independent manipulation of the monomer and chain-transfer agent concentrations. Experimental and simulation data obtained were shown to be in very good agreement. Given the simulation and experimental results presented by Sayer et al.31-34 and the discrete nature of the IDP algorithm, it sounds very natural to propose a closed-loop control strategy that is based somehow on the optimization scheme developed previously. In this case, the optimum open-loop feed policies can be corrected and implemented iteratively at specified sampling times if the compositions of certain key reaction components are measured in-line (with NIRS, for instance) and if the remaining unmeasured states are inferred with the help of the process model. As discussed before, alternative control strategies have also been proposed in the literature.6,7 Particularly, Kozub and MacGregor35,36 and Saldı´var and Ray37,38 used simulations to study the simultaneous control of several polymer properties in emulsion polymerization processes. In both cases, the studied control strategies were very similar to the one used by Sayer et al. Kozub and MacGregor designed an extended Kalman filter (EKF) to estimate the states of styrene/butadiene continuous emulsion polymerizations based on the availability of in-line measurements of monomer concentrations and polymer particle diameters. The EKF was then combined with a process model to allow for the iterative in-line computation and implementation of optimal control policies. However, only simulation results were presented. In addition, the authors reported that the EKF might present convergence problems and slow convergence because of the recursive nature of the algorithm. Saldı´var and Ray used simulation to study the simultaneous control of polymer composition and average molecular weights in vinyl acetate/MMA semibatch emulsion copolymerizations. During simulations, it was assumed that all states were available for iterative in-line computation and implementation of optimal control policies, which were designed to keep the controlled variables constant throughout the batch. However, as acknowledged by the authors, this control objective might be too restrictive, in the sense that it might be impossible in many practical situations to keep the controlled variables constant throughout the batch. For example, it is not possible to remove CTA from the reaction environment to compensate for a decreasing value of molecular weight. Although a fair comparison among the performances of the various control alternatives is not possible, as

none of them was implemented in-line, it can be said that the control strategy designed by Sayer et al. is advantageous in a number of respects. First, it is based on the optimization of a quadratic cost function that naturally takes process constraints into consideration, so that it can provide meaningful solutions to any practical problem. Second, it does not present convergence problems and can be tuned to provide solutions in the required amount of time through the manipulation of tolerances and numerical constants, which is very important for actual in-line implementation. Third, it was validated through experiments for optimum openloop MMA/BuA semibatch emulsion copolymerizations. To reduce the prohibitively high computation time of the off-line optimization scheme presented by Sayer et al., in the present work, the copolymer composition and the average molecular weights, instead of the complete MWD, were computed and controlled. This allowed for the in-line implementation of the strategy developed by Sayer et al. providing optimum open-loop feed flow rate profiles, which were updated at each sampling time on the basis of measurements performed by the NIR spectrophotometer. It is shown below that the results obtained with this model-based predictive control strategy can be regarded as very good, even when strong process disturbances, such as feed failure and the addition of unknown amounts of inhibitor to the reactor feed, are introduced into the process. This shows unequivocally that NIRS can be used successfully for the in-line and in situ simultaneous control of the copolymer composition and average molecular weights in emulsion copolymerizations. 2. Experimental Section 2.1. Reaction and Analytic Apparatuses. An automatic reaction unit, schematically shown in Figure 1, was mounted to perform the semibatch emulsion polymerizations. The reaction unit comprises a 1-L jacketed glass tank reactor (FGG Equipamentos Cientı´ficos), a thermostatic bath (Haake DC-3) to provide hot water to the reactor jacket, a second thermostatic bath (Polyscience KR-30A) to provide cold fluid (water/glycol ethylene, 50 wt %) to the condenser, a type J/ironconstantan thermocouple (Ecil), a mechanical stirrer (Fisaton 713-T) equipped with a six-blade turbine, a tachometer (Takotron TD2004-C) to monitor and control the agitation speed, two mixing plates (Corning PC-420) to homogenize the pre-emulsified feed streams, one digital balance (Helmac HM 1000) to register the amount fed by each stream along the batch, and three computer-controlled precision dosing pumps (Masterflex 7550-60/7550-90; Prominent Gamma Gala 1000 SST). In addition, three process computers were used: the first was dedicated to NIR data acquisition and handling, the second was dedicated to reactor monitoring and control of the feed pumps, and the third was used to run the advanced control algorithm. The second computer was equipped with a plug-in data-acquisition board (National Instruments Lab PC+), which contained the A/D and D/A converters. Before reaching the board, the thermocouple analog signal was filtered, amplified, and cold-junction-compensated by a previous conditioning module (National Instruments SCXI 1100). LabVIEW/NIDAQ (National Instruments) was used to develop data-acquisition and logging interfaces. The spectrophotometer used in the experiments was a NIRSystems 6500 in-line instrument (NIRSystems),

2918

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

Figure 1. Reactor setup: (1) reactor, (2) cold bath, (3) hot bath, (4, 5) pre-emulsified feed stream, (6) net monomer feed stream, (7, 8) precision dosing pumps, (9) NIRS and probe, (10) condenser, (11) agitator/turbine, (12) syringe for sample withdrawal, (13) N2 purge, (14) thermocouple, (15) NIRS computer, (16) data-acquisition and logging computer, (17) advanced control computer.

equipped with two concentric fiber optic bundles to illuminate and collect NIR radiation. An interactance immersion probe was connected to the end of the fiber bundles, and its tip was properly positioned to provide a total path length of 4 mm. The scanned wavelengths varied from 1100 to 2500 nm in transmittance mode. To enhance the signal-to-noise ratio, 32 spectra were collected for each sample. Calibration equations were developed with PLS to detect MMA, BuA, and polymer holdup in the reaction medium.27,28 Calibration models were allowed to run in-line with the help of NSAS (NearInfrared Spectral Analysis Software), a program provided by the manufacturer of the spectrophotometer.18 As reaction temperatures were kept constant and equal to 80 °C and polymerization runs were carried out under conditions that did not lead to the formation of monomer droplets, the temperature and agitation speed were not taken into consideration during calibration. The off-line methods used to verify the quality of the open- and closed-loop control schemes were gas chromatography (GC), for the evaluation of monomer compositions, and gel permeation chromatography (GPC), for the evaluation of average molecular weights. The gas chromatograph was equipped with a GS-Q PLOT column (J&W Scientific) and with a small glass liner, which was filled with silanized glass wool and positioned at the injection port to avoid clogging of the stationary phase with polymer. The injector temperature (180 °C) was carefully selected to allow for the fast vaporization of residual monomers and to circumvent eventual polymer degradation. Other important GC analysis parameters were the column temperature (200 °C), the detector temperature (230 °C), and the employed carrier gas (N2). No sample split was used to minimize experimental errors. Internal standardization with 2-butanone was used for the development of calibration curves and for sample analysis. Chromatographic calibration samples were synthesized to mimic real samples. For this reason, polymer latex free of residual monomers and containing 100 ppm of hydroquinone was added to calibration samples to homogenize the samples (avoid the generation of monomer droplets) and to prevent polymerization

at the injector port. GPC analyses were performed with a Waters 600E chromatograph equipped with Ultrastyragel columns (105, 104, 103, and 500 Å) and a refractometric detector (Waters 410). Polymer solutions were prepared in dimethyl formamide, and measurements were performed at 30 °C. All reagents were used as received. Methyl methacrylate (Metacril) and butyl acrylate (Rhodia do Brasil) were the monomers, sodium lauryl sulfate (SLS, Rhodia do Brasil) was the anionic emulsifier, potassium persulfate (Merck) was the initiator, sodium bicarbonate (Isofar) was the buffer, distilled water was the continuous medium, t-dodecil mercaptan (Rhodia do Brasil) was the chain-transfer agent (CTA), and hydroquinone (Vetec) was the polymerization quencher. 2.2. Reaction Planning and Procedures. One of the main reasons for measuring latex properties in-line is the possibility of rejecting unexpected process disturbances. To simulate this situation, three pairs of semibatch emulsion MMA/BuA copolymerizations are presented and used to illustrate the quality of a control strategy that uses NIR measurements as the feedback of the process. Each pair of reactions consisted of experiments submitted to similar process upsets. In one of the reactions, feed flow rate profiles were calculated off-line with the IDP algorithm of Sayer et al.,34 whereas in the other reaction, feed flow rate profiles were computed iteratively at each sampling time in accordance with the control strategy presented in section 4. The first disturbance introduced (reaction runs R1 and R2) was the momentary interruption of the net BuA feed flow rate. This simulates the occurrence of a problem with one of the feed pumps and the need to correct feed flow rates in-line and in a finite time to save the batch. The second disturbance introduced (reaction runs R3 and R4) was an error in the initial charge of MMA, 30% more MMA than required by the controller. This simulates a formulation error that must be detected and corrected in-line. The third process disturbance introduced (reaction runs R5 and R6) was the addition of 100 ppm of a polymerization inhibitor (hydroquinone) to the initial charge of the reactor. This

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002 2919 Table 1. Base Recipe of Reactions R1-R6

reagent

initial charge (g)

feed stream 1 (g)

feed stream 2 (g)

feed stream 3 (g)

MMA BuA H2O SLS K2S2O8 NaHCO3 CTA seed latexa

389.65 0.2554 0.9280 0.9403 80.7400

278.00 -

90.48 68.74 0.6741 -

127.26 98.05 1.2897 5.7000 -

a

Npseed ) 5.0 × 1015 particles/g of seed latex.

simulates the unexpected appearance of a contaminant that might cause a strong influence on the polymerization rate and, consequently, on the desired copolymer composition and molecular weight. This must be detected and corrected in-line. The base recipe of reaction runs R1-R6 is presented in Table 1. The procedure adopted to perform the reaction runs was standardized. The initial charge and all feed streams were purged with 99% pure nitrogen (AGA) for 30 min to avoid polymerization inhibition by dissolved oxygen. The nitrogen flow was maintained during the whole batch run. When the reactor temperature reached 80 °C, feed flows were started in accordance with the profiles calculated off-line or computed at each sampling time. The speed of the agitator was always kept at 200 rpm, and the final polymer content of the latex was limited to 30 wt % to avoid polymer sticking to the probe window of the spectrophotometer. The sampling time was constant and equal to 6 min. The sampling time was limited by the time required to solve the modelbased optimization problem in the process computer. As the polymerization reaction lasts for at least 60 min, the sampling time of 6 min allows a significant amount of information to be gathered along the batch. Latex samples were put into flasks containing known amounts of aqueous hydroquinone solutions, so that the final hydroquinone concentration was equal to 100 ppm. All samples were analyzed chromatographically to determine the concentrations of MMA and BuA and to allow for the independent evaluation of the polymer holdup and copolymer composition. 3. Process Model The mathematical model used was developed by Sayer et al.33,34 and is presented in detail in the original references with all parameters required for simulation. The model comprises a system of coupled differentialalgebraic equations that describe the time evolution of the concentrations of the different chemical species, the average molecular weights, and the MWD of the copolymer resin. As mentioned before, to improve the computation time, the MWD is not computed in the present work. Average molecular weights are computed with the well-known method of moments. The most important model assumptions are as follows: (1) Isothermal conditions are maintained. (2) Thermodynamic equilibrium is maintained among aqueous, monomer, and polymer phases. (3) Homogeneous nucleation and aqueous polymerization can be neglected. (4) Polymer particles are spherical and uniform. (5) Termination occurs mainly by disproportionation. (6) The quasi steady-state assumption is valid for radicals. (7) Kinetic constants are independent of chain length. (8) Radical desorption is

negligible. (9) The terminal model is valid for describing the copolymerization. (10) Radicals generated by initiation reactions and chain-transfer reactions to monomers, CTA, and dead polymer chains have equal reactivities. The concentrations of MMA (three states), BuA (three states), water (one state), initiator (one state), and CTA (one state) in each of the three phases are tracked with the overall mass balances and the thermodynamic equilibrium constraints. The leading moments of the MWD (18 states) used to compute the polymer composition and the molecular weight averages are tracked after manipulation of the overall mass balances for dead polymer chains and polymer radicals. In addition, the population balance for polymer particles allows the dynamic evolution of both particle concentration and particle size to be computed. Thermodynamic equilibrium among the various phases (particle-water interface, monomer-water interface, water, and micelles) is also assumed to allow for the computation of emulsifier concentrations and number of micelles. Therefore the process model comprises a total number of 33 states/ equations. To improve the experimental reproducibility and the control of the system, all reaction runs were seeded, as shown in Table 1. In this case, the particle number remained essentially constant throughout the batch in all cases analyzed. Nevertheless, model size was not reduced to allow for the continuous computation of emulsifier concentrations and possible secondary micellar nucleation. Polymer seeds were composed BuA/ MMA copolymers produced under starved conditions and with 50% BuA on a molar basis. The number- (Mn) and weight- (Mw) average molecular weights of the polymer seeds were equal to 80 000 and 1 000 000 g/gmol respectively, while the gel content of the seed was around 50%. The very large weight-average molecular weight, polydispersity, and gel content of the seed are due to significant rates of chain transfer to polymer.33,34 Because of the particular characteristics of the polymer seed used, both Mn and Mw experience large variations along the batch. Moreover, despite the addition of large amount of CTA, the polydispersity remains high until the end of the batch because of the very high rates of transfer to polymer and the influence of the initial seed charge. As the molecular weight of the dead polymer chains tends to increase along the reaction course on account of chain-transfer reactions to polymer even in the presence of CTA, a proper interpretation of the experimental results is not possible if chain transfer to polymer is neglected.33,34 As shown by Sayer et al.,33,34 very good agreement between experimental and simulated Mn values of the final polymer material could be observed in all batches, despite the gel content and polydispersity of the final polymer resin. Significant differences could be detected in the high-molecular-weight region of the MWD when low amounts of CTA were used, as the model does not differentiate between the soluble polymer and the gel fraction. However, the model predictions were shown to be very consistent for two main reasons. First, the experimental MWD of polymer samples that contained low gel contents could be reproduced with fair accuracy. Second, the polymer amounts obtained when the GPC data were subtracted from the simulated MWD were very close to the actual gel contents obtained experimentally (around 10% in the reactions with CTA).

2920

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

Therefore, it was concluded that differences between experimental and simulated values of Mw were mostly due to the large influence of the small amounts of gel on the Mw of the final polymer, because of the very large molecular weight of the gel fraction not detected by GPC. Judging from the previous discussion, if it is assumed as a first approach that one is interested in the MWD averages and not in the whole MWD distribution, it is recommended that Mn values be used for evaluation of the average molecular weight of the polymer. Moreover, the differences between experimental and simulated Mw values can be assumed to be a gross measure of the gel content as

xgel )

Mcw - Mew 2 × 106 - Mew

where xgel is the gel weight fraction and Mw of the gel fraction is assumed to be at least equal to 2 × 106 g/gmol, as observed experimentally. 4. Control Strategy 4.1. Control Problem Definition. Let us assume that a certain dynamical system described by eq 2, where manipulated and state variables are constrained as described by eqs 3 and 4, must be driven from a specified set of initial conditions to a defined target. It is then possible to define a performance index to determine whether the system matches some desired control objectives, as described in eqs 5 and 6 for the continuous and discontinuous cases, respectively. From a mathematical point of view, the optimal control problem is finding the proper control policy [u(t) or u(k)] that minimizes (maximizes) the performance index.

dx(t) ) f[x(t),u(t)] dt

(2)

Ru e u(t) e βu

(3)

Rx e x(t) e βx

(4)

I[x(t0),tf] ) ψ[x(tf)] + P

I[x(t0),P] ) ψ[x(tf)] +

∫tt φ[x(t),u(t)] dt 0

0

∑ ∫t k)1

tk

k-1

(5)

φ[x(t),u(k-1)] dt (6)

Instead of using a continuous function u(t), which is difficult to implement in a real production environment, discrete piecewise-constant control policies are used to describe variations of the manipulated variables. Therefore, the design of the control policy can be thought of as a multivariable nonlinear constrained optimization problem, where the discrete values u(k) must be computed to minimize (maximize) the performance index.34 To perform this task, the iterative dynamic programming (IDP) method with search region contraction, developed by Bojkov and Luus,39 is used as implemented by Sayer et al.34 A detailed description of the method and of the implemented procedures can be found in the original references. However, it is important to note that the method performs the optimization iteratively as a sequence of smaller optimization problems constrained to a single sampling period. The optimization procedure

is initiated by assuming that manipulated variables are kept constant throughout the reaction batch. After discretization, the optimization is performed sequentially from the last sampling period to the first and repeated until either convergence is achieved or the maximum number of allowed iterations is reached. At each sampling time, the optimization problem is solved with the help of Monte Carlo techniques. Sayer et al.34 studied the open-loop optimization of both the copolymer composition and the MWD. However, as discussed previously, it is not possible in the particular case analyzed to validate experimental results for the whole MWD because of the significant amounts of gel formed during the experiments through chain transfer to polymer. For this reason, control of the whole MWD is not considered here, and the control objective is focused on Mn of the final polymer material, which can be measured with fair precision in all cases, even when the gel content is high. One should note that, because of the high rates of transfer to polymer and the large average molecular weights of the seed, Mn values cannot be controlled simply by maintaining the monomer/ CTA ratio constant, as is usually done in simple linear polymerizations.33,34 Therefore, a more complex control scheme is required even for the control of the Mn value of the final polymer. This is especially true for the simultaneous control of both copolymer composition and Mn, as the copolymer composition and Mn are coupled because of the much higher rates of transfer to BuA. The performance index used to design the control policy includes properties of the polymer latex defined both at the end and along the batch, as shown in eq 7, used for off-line tuning of the optimization procedure

[

F ) p1

] [ [ ] [

(QfBuA - QfBuAd) QfBuAd

2

+ p2

(Mfn - Mfnd) Mfnd

]

(QfMMA - QfMMAd)

2

QfMMAd

]

2

P

∑ i)1

+ p4

(y(i) - y(i)d) y(i)d

+ p3

2

(7)

where p1 ) p2 ) 20, p3 ) 1, p4 ) 5, QfMMAd ) 110.9 g, f ) 142.0 g, y(i)d ) 0.5, and Mfnd ) 20 000 g/gmol. QBuAd In the first three terms of eq 7, one finds the properties that are used to describe the performance of the batch as a whole, such as the reactor productivity (total amounts of monomer fed into the reactor, QMMA and QBuA) and the number-average molecular weight of the polymer (Mn). In the last term, one finds the properties that must be kept constant and homogeneous throughout the batch, such as the cumulative copolymer composition [y(i)]. The set-point values were defined to allow for the production of commercial-grade copolymers. The weights were defined to guarantee proper balancing of all variables analyzed and are based on previous results.34 It is important to emphasize here that MMA/BuA emulsion copolymerizations can lead to the production of significant amounts of polymer gels and to very large polydispersion indexes.31-34 This is caused mostly by very high chain-transfer rates to dead polymer chains that contain BuA. As a consequence, the weight-average molecular weight of polymer chains is subject to la arge uncertainty when obtained by typical GPC methods. In addition, seeded reactions are performed to allow for improved control of the concentration of polymer par-

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002 2921 Table 2. Parameters Used for IDP Optimization parameter

value

number of random trials per iteration maximum number of iterations number of discretization intervals interval time length feeding time initial feeding profiles initial search region search region reduction factor

450 3 10 6 min 60 min 2 mL/min 2 ( 3 mL/min 0.75

ticles and of the reaction rates. This means that the average molecular weights can experience large fluctuations from batch to batch, depending on the average molecular weights of the seed particles and of the desired polymer latex. This is why the number-average molecular weight is used to characterize the polymer latex only at the end of the reactor batch. This condition can certainly be relaxed if more tight control of the MWD is required, as discussed and analyzed by Sayer et al.34 To avoid runaway conditions and poor control of the reaction conditions, reactions must be performed under conditions that do not lead to the formation of monomer droplets. This means that hard constraints are imposed on the state variables and that the formation of monomer droplets is not allowed during model computations. From the point of view of the fundamental model used for predictions, monomer concentrations must be guaranteed to be smaller than saturation conditions. From the point of view of monitoring, NIRS continuously checks for the appearance of monomer droplets, as described by Vieira et al.28 If monomer droplets are detected, feed flows must be halted. (It must be clear that these hard constraints are not necessarily required by all industrial systems, especially when less-thansaturation conditions lead to gel contents that might render the product useless for some applications. As discussed previously, when monomer droplets are present, it might be necessary to augment the set of calibration variables to take into consideration the influence of scattering effects on the NIR spectra.) As the optimization problem must be solved in real time with the data provided by the in-line monitoring techniques at each sampling time, some numerical parameters were tuned off-line using a series of optimization tests. The main objective was to define an adequate set of numerical parameters that would allow for the accurate computation of optimum control policies as rapidly as possible. The numerical parameters analyzed where the number of sampling times (P), the maximum number of iterations to reach the optimum (), the initial search region (SR), the search region contraction factor (Cf), and the number of feed rate trials per interval (NRC). The batch time was set at 60 min,34 with monomer feeding allowed during the whole reaction period. The feed flow rates were constrained by the pump capacities (0-6 mL/min). The interval time length was set at 6 min. This value was selected because it allowed for the accurate optimization of the control problem34 and was compatible with the time required by the spectrophotometer to provide filtered data (1.45 min) and with the time required by the optimization algorithm to solve the problem in real time. Therefore, P was equal to 10 in all problems, unless stated otherwise. The maximum number of allowed iterations  was set at 3, as a significant decrease of the performance index could not be observed when more iterations were allowed. The number of trials used for each of the manipulated variables was set at 15, instead of the ideal

Figure 2. Numerical tests used to define (A) the number of trials per interval, (B) the initial search region, and (C) the search region contraction factor.

value of 27 proposed by Bojkov and Luus,39 as no relevant change of the performance index could be observed with an increase of NRC. The remaining numerical parameters were selected as defined by Sayer et al.34 and are shown in Table 2. Figure 2 illustrates the performance of the optimization algorithm when it is run off-line and when the numerical parameters are allowed to vary. Figure 2 shows that the parameter set presented in Table 2 is adequate for real-time implementation of the optimization technique.

2922

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

It is important to point out that some adaptations were necessary to allow the IDP method to be executed in a closed-loop real-time manner. First, only the control actions computed for the immediately subsequent time interval were actually implemented. The remaining control actions were ignored. To compute the optimal trajectories, the initial states were updated whenever composition data were provided by the spectrophotometer. As the NIRS provided the overall monomer concentrations in the latex, the monomer concentrations in each particular phase were computed with the model thermodynamic constraints. CTA, water, and emulsifier concentrations were obtained with the overall mass balances and thermodynamic equilibrium constraints, based on the known initial conditions and feed compositions and the measured feed flow rates. In this case, it was assumed that the number of polymer particles remained constant throughout the batches, as secondary nucleations were never detected with the model. This was confirmed experimentally in all cases. From the evaluation of the overall polymer concentration through NIRS, average reaction rates could also be estimated. The initial states of the MWD moments could then be updated using simple rules. To keep the overall polymer concentration as measured by NIRS, the rule was k k MWMMAλ1,0 + MWBuAλ0,1 ) Polk

(7)

where k is the sampling time, λi,j is the moment of order i,j of the MWD, and Pol is the measured polymer concentration by weight. To keep the polymer composition as measured by NIRS, the rule was k λ1,0 k k λ1,0 + λ0,1

) xk

k k MWMMAλ1,0 + MWBuAλ0,1

Mc,k n

For real experimental implementation of the control technique, the performance index is allowed to vary slightly to incorporate additional control objectives. For instance, reactions R1-R4 used the performance index described by

[

F ) p1

] [

(QfBuA - QfBuAd)

[

QfBuAd

]

(Mfn - Mfnd) Mfnd

2

2

+ p2



[

i)k+1

(9)

k k (MWMMAλ1,0 + MWBuAλ0,1 )Mc,k w c,k λ2,0 c,k c,k c,k MWMMA2λ2,0 + 2MWMMAMWBuAλ1,1 + MWBuA2λ0,2 (10) k λ1,1 ) k k (MWMMAλ1,0 + MWBuAλ0,1 )Mc,k w

c,k c,k c,k MWMMA2λ2,0 + 2MWMMAMWBuAλ1,1 + MWBuA2λ0,2 (11)

k λ0,2 ) k k (MWMMAλ1,0 + MWBuAλ0,1 )Mc,k w c,k λ0,2 c,k c,k c,k MWMMA2λ2,0 + 2MWMMAMWBuAλ1,1 + MWBuA2λ0,2 (12)

The control loop is closed when the NIRS measurements

p5

QfMMAd

]

(y(i) - y(i)d)

k+3

+ p4

]

2

(QfMMA - QfMMAd)

P

k ) λ2,0

c,k λ1,1

A second change regards the number of trials used to compute the optimum trajectories. As the interval time length was constant throughout the reaction and as the final batch time was set at 60 min, the number of intervals to be optimized decreased with the course of reaction, leading to the increasing underuse of computational resources. This allowed for an increase in the number of trials used for each manipulated variable, keeping constant the total number of random trials per iteration. Third, to minimize the effect of noise and improve the model predictions, experimental residual monomer concentrations and polymer holdups were reconciled in real time as described in the following paragraphs.

p3 (8)

where xk is the polymer molar composition measured with the NIRS compositions and the overall monomer mass balances. To keep the average molecular weights as computed with the process model, as in-line evaluation of average molecular weights were not available, the rules were k ) λ0,0

are used to update the initial conditions (states), which are then used to recompute the optimal trajectories inline. Therefore, the implemented control strategy can be regarded as a nonlinear model predictive controller.



i)k+4

[

y(i)d

2

+

]

(y(i) - y(i)d) y(i)d

+

2

(13)

where p1 ) p2 ) 20, p3 ) 1, p4 ) 10, p5 ) 5, QfMMAd ) f ) 142.0 g, y(i)d ) 0.5, and Mnd ) 20 000 110.9 g, QBuAd g/gmol. It can be seen that a greater importance was given to the first three intervals following the current interval, as just one control action is, in fact, implemented. Therefore, short-time model predictions are privileged. The objective function used in reactions R5 and R6 was also similar to eq 13, with the exception that the weights used as penalties to the total monomer amounts fed into the reactor were reduced to p1 ) p2 ) 2. In this case, the objective was to ensure the quality of the polymer latex obtained when strong disturbances are introduced into the process operation. 4.2. Data Reconciliation. Monitoring of material and energy balances can be an important task in ensuring safe and efficient plant operation. Data reconciliation usually involves the estimation of values to guarantee the consistency of material and energy balances and to improve the quality of experimental data used in control and monitoring applications. Estimated values can be either measured (available) or unmeasured (unavailable). In the first case, the data reconciliation procedure provides a sort of in-line correction of experimental measurements, which can then be used to detect failures. In the second case, the data reconcili-

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002 2923

ation procedure provides virtual (estimated) measurements of unavailable data. A detailed discussion of data reconciliation procedures and applications in polymer processes can be found elsewhere.40,41 Data reconciliation procedures were applied here to improve the quality of the composition data provided by the spectrophotometer. As residual monomer concentrations are usually small and within a few percent, experimental data can be subjected to significant fluctuations, which could exert a major impact upon the controller performance.42 The main idea implemented here was to force the residual MMA and BuA concentrations and the polymer holdup to satisfy the overall material balances, written as 3

Ali,k) + Mass0 ∑ i)1

Latexk ) (

PolNIRS k

Latexk 100

)

NIRS Polk-1

Latexk-1 100

(14)

3

(Ali,k)(xMMAi + ∑ i)1

+

Latexk

+ BuArNIRS ) xBuAi) - (MMArNIRS k k

100

(15)

where k is the present sampling time, Latexk is the mass of latex inside the reactor at instant k, Mass0 is the mass of the initial charge in the reactor, Ali,k is the total mass fed into the reactor through stream i up to the instant is the polymer holdup (wt %) measured by k, PolNIRS k NIRS at instant k, xMMAi and xBuAi are monomer and compositions of feed stream i, and MMArNIRS k are the residual monomer concentrations (wt BuArNIRS k %) measured by NIRS at instant k. It is assumed that all variables are known but that NIRS measurements are subject to fluctuations and should be reconciled. Therefore, a parameter estimation procedure is required , MMArNIRS , and BuArNIRS at each to evaluate PolNIRS k k k sampling time k. The parameter estimation procedure used to perform data reconciliation was a generalization of the wellknown maximum-likelihood procedure of Anderson and Grens,43 as implemented in the software ESTIMA.44 In short, the maximum-likelihood method provides a set of “corrected” measurements that lead to the maximum of a certain probability distribution function. Therefore, it is assumed implicitly that the error distributions of measurements are known, which most of the time is not true. However, by assuming that measurement errors follow a normal distribution and are independent of each other, it is possible to write45

LF ) -

[

nexp nivar(xe j

∑ ∑ i)1 j)1

- xcj )i2

(σxj2)i

+

novar(ye j

∑ j)1

]

- ycj )i2

(σyj2)i

Figure 3. Schematic of the manager program.

sents the model outputs. The experimental errors are known and are equal to 0.1, 0.1, and 1, respectively.42 Assuming that nexp samples have been taken, then 3nexp data points are available with 2nexp degrees of freedom, as there are nexp model constraints. Equation 15 shows that, unless independent experimental measurements of MMArk and BuArk are proand vided, it is not possible to estimate MMArNIRS k independently from the model. One can obBuArNIRS k NIRS or BuAr serve that similar variations in MMArNIRS k k exert the same impact on the model response. To allow and for the independent evaluation of MMArNIRS k with the model, a second set of independent BuArNIRS k experimental data obtained through GC was added to the data reconciliation problem. In this case, in addition to the NIRS composition data, sporadic GC composition data were inserted into the input data file to allow for independent corrections of NIRS measurements. Then

(16)

where LF is the function that must be maximized; nexp is the number of available experiments; nivar is the number of model inputs; novar is the number of model outputs; xej and yej are measured values for input and output variables, respectively; xcj and ycj are values calculated using the model (real values) for input and output variables, respectively; and σx2and σy2 are the experimental variances for inputs and outputs, respecand tively. In the particular case analyzed, MMArNIRS k NIRS are the model inputs, whereas Pol repreBuArNIRS k k

compGC ) j

MMArNIRS j BuArNIRS j

(17)

where compGC is the MMA/BuA ratio measured by gas j chromatography. For the reactor setup analyzed, GC data are available every four sampling intervals (about 24 min), which means that two or three GC values are used during each batch for data reconciliation. It is important to note that eq 17 does not change the number of degrees of freedom of the optimization problem, as one additional output is available for each additional constraint.

2924

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

Figure 4. (A, B) Feed rates, (C, D) cumulative copolymer composition, and (E, F) average molecular weights of open-loop (R1, first column) and closed-loop (R2, second column) reactions.

It must be emphasized that the GC data are not necessary for the implementation of the control strategy presented here and that they are used exclusively for data reconciliation. If NIRS measurements had not been available, it would have been impossible to implement the control scheme in-line and in real time for a number of reasons. First, GC measurements are often too slow for actual implementation of closed-loop control. Second, GC data do not provide independent measurements of monomer and polymer compositions. GC data describe

only the relative monomer concentrations, as presented in eq 17, so that additional model inferences would be necessary. Third, if NIRS measurements are discarded, no data reconciliation is possible. Nevertheless, sporadic GC data do improve the reliability of experimental data, as observed experimentally.42 If the NIR spectra are used to build models for polymer composition, as performed by Gossen et al.24 for styrene/MMA resins, then GC data can be discarded completely, and independent data reconciliation is still possible for both

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002 2925

monomer concentrations. As the main objective was to produce polymer resins with equimolar MMA/BuA compositions, these additional modeling efforts have not been carried out. 4.3. Manager Program. To implement the in-line control algorithm experimentally, all necessary tasks were organized in modules called from a manager program. These modules comprised a process simulator, whose model was described in section 3; a data reconciliation algorithm, described in section 4.2; and the iterative dynamic programming method, described in section 4.1. The manager program was also responsible for tasks such as reading the polymerization recipe set by the operator, sending the control action to the data-acquisition and actuation system, and registering the results of the in-line execution of the controller. The manager program can be seen schematically in Figure 3. 5. Results and Discussion 5.1. Case Study 1: Momentary Interruption of the BuA Feed Stream. Figure 4 presents the results obtained in reactions R1 (open-loop) and R2 (closedloop). (In Figures 4-6, the term “open-loop simulation” stands for simulation results obtained when the initial states were not updated in accordance with NIRS measurements during open-loop experiments. The term “open-loop simulation with NIRS data” stands for simulation results obtained when the initial states were updated in accordance with NIRS measurements during open-loop experiments. The term “closed-loop simulation” stands for simulation results obtained when the initial states were updated in accordance with NIRS measurements during closed-loop experiments.) The momentary interruption of the BuA feed stream (feed 1 for BuA; feed 2 + feed 3 for MMA) can be noted in the third and fourth intervals (12-24 min) of Figure 4A and B. As a response to this disturbance, the in-line controller considerably increased the feed flow rates of the aforementioned stream immediately after its reestablishment, to satisfy the specified amount of BuA to be fed to the end of the batch (Figure 4B). This effect cannot be observed in Figure 4A, where feedback data are unavailable. Simultaneously, as the MMA copolymer composition became too high, the feed rates of streams 2 and 3 were clearly reduced in the two intervals that followed the interruption period. When the composition and amount of BuA fed returned to normal, the feed rate profiles of streams 2 and 3 were altered in a smoother way. Figure 4C and D and Table 3 show that the cumulative copolymer composition is controlled tightly after the BuA feed pump is restarted when the controller is working, whereas a significant bias remains after restart of the BuA feed pump when the control policy is not updated. Although the analysis of the simulated open-loop composition curve (Figure 4C) initially suggests that this variable is perfectly maintained at the desired set point, the simulated composition curve calculated using the NIRS data shows the increase of the MMA content in the polymer chain during the BuA feed interruption. As shown in Figure 4D, the in-line NIRS monitoring of compositions leads to excellent model predictions and, consequently, allows in-line simulations to keep track of the real copolymer composition. It is interesting to observe, though, that model predictions are not very good immediately after monomer feed startup. This is believed to be due to the

Table 3. Deviations between the Obtained, y(i), and the Desired, y(i)d, Copolymer Composition Values along Reactions R1-R6 reaction time (min) 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96

R1 34 18 20 38 20 20 18 16 16 16

deviations between y(i) and y(i)d (%) R2 R3 R4 R5 R6 24 2 28 34 16 0 2 4 0 2

12 0 2 0 -2 -2 2 2 4 6

10 16 2 2 -2 0 0 -2 0 2

16 38 32 22 10 6 -6 16 20 18

-18 -14 -6 -8 -2 -6 -8 -4 -2 0 -2 -2 2 2 0 0

existence of mass-transfer resistance, which has not been accounted for during model formulation. As discussed in the literature,31-33 this effect can be reduced if the monomer feed is pre-emulsified, which was not been performed on purpose to make the control targets more difficult to attain. As a consequence of the poor initial predictive capacity of the model, the controller is not able to avoid composition drifts in the very beginning of the reaction batch. Panels E and F of Figure 4 show significant differences between the experimental and simulated values of Mw, although such differences are considerably smaller for Mn. As discussed before, this fact can be attributed to the large gel content of the polymer material produced under starved conditions with a copolymer composition of 50% of MMA and BuA (molar basis).31-34 Nevertheless, final agreement among the desired, experimental, and calculated number-average molecular weights can be regarded as excellent in both the open-loop and closed-loop cases. This is because the momentary interruption of the BuA feed flow did not cause a significant drift of the MWD of the polymer chains. Only at the very beginning of the reactions, because of the high molecular weight of the seed ≈ 80 000, is Mn much above the desired polymer, Mseed n final value (Mfnd ) 20 000). Comparing panels E and F of Figure 4, it can be observed that the chain-transfer feed rate policy was perturbed only slightly by the BuA feed interruption. 5.2. Case Study 2: Initial Formulation Error. Figure 5 shows results obtained for reactions R3 (openloop) and R4 (closed-loop), where the initial amount of MMA charged into the reactor was 30% higher than specified. Comparing panels A and B of Figure 5, it can be observed that the controller initially reduced the feed flow rates of both monomers (feed 1 for BuA; feed 2 + feed 3 for MMA) and afterward slowly increased these values. The initial flow rate reduction was due to the high MMA content of the copolymer resin, as observed with the help of NIRS. The increase of the BuA feed flow rate at this point would prejudice the control of the number-average molecular weight, given the relatively low concentration of chain-transfer agent inside the reactor. Figure 5C shows that the copolymer composition calculated with the open-loop model was always below the experimental curve, as the initial charge of MMA

2926

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

Figure 5. (A, B) Feed rates, (C, D) cumulative copolymer composition, and (E, F) average molecular weights of open-loop (R3, first column) and closed-loop (R4, second column) reactions.

provided was incorrect. The persistent bias remained until the end of the batch. When the NIRS data were used for feedback, though, the model predictions became quite accurate, and no persistent offset could be detected. This reinforces the results presented in the previous example and unequivocally shows that the feedback information provided by the spectrophotometer improves the predictive ability of the process model. Figure 5C also shows that the perturbation caused a drift of the copolymer composition during the whole batch and final offset. Figure 5D and Table 3 show that, when the controller was turned on, despite the initial composition drift induced by mass-transfer resistance,

the copolymer composition was driven to the desired set point without any significant final offset. Panels E and F of Figure 5 are similar to the corresponding panels of Figure 4, showing that excellent final agreement was reached among the desired, experimental, and calculated number-average molecular weights in both the open-loop and closed-loop cases. Comparing panels E and F of Figure 5, though, it can be seen that the CTA feed flow rate had to be reduced significantly to take into account the additional amount of MMA present in the system, as the molecular weight of MMA is lower than that of BuA. Therefore, although the modification of the monomer feed policies tends to

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002 2927

Figure 6. (A, B) Feed rates, (C, D) cumulative copolymer composition, and (E, F) average molecular weights of open-loop (R5, first column) and closed-loop (R6, second column) reactions.

prejudice the control of the number-average molecular weight, in-line correction of the chain-transfer flow rate allows for the simultaneous control of Mn. 5.3. Case Study 3: Polymerization Inhibition. The addition of 100 ppm of hydroquinone to the initial monomer charge of the reactor made the residual concentrations of MMA and BuA reach much higher levels than those observed in the other reactions (feed 1 for BuA; feed 2 + feed 3 for MMA). Actually, as presented by Vieira et al.,28 after about three sampling intervals, the spectrophotometer indicated the formation of monomer droplets. This should be avoided, as discussed before. When the controller was turned on, this

additional NIRS piece of information indicated that something was going very wrong with the batch and that the feed flows had to be interrupted (Figure 6B). When the controller was turned off, no in-line correction was possible (Figure 6A). To guarantee the desired final polymer holdup without the risk of a sharp increase of the monomer feed rates, the control algorithm automatically extends the batch time when the formation of monomer droplets is detected and feed flows are interrupted. The intention is to avoid reaction runaways and guarantee the product quality. Unlike the previous examples, in reaction R5, the simulation of copolymer compositions with NIRS feed-

2928

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

Figure 6E shows that the formation of monomer droplets during the open-loop operation perturbed the average molecular weights considerably, leading to larger number-average molecular weights. However, when the controller was turned on, the flow rates of both monomers and of chain-transfer agent were manipulated accordingly to guarantee the proper control of Mn, despite the large changes of the monomer feed flow rates. Once more, the feed policies were corrected inline without any significant perturbation of the desired value of Mn. Whereas in the open-loop reaction R5 Mfn presented a deviation of 42% in relation to Mfnd, in the closed-loop reaction R6, this deviation was reduced to 12%. 6. Conclusion

Figure 7. NIRS and GC monitoring of (A) open-loop (R5A) and (B) closed-loop (R6) controlled reactions. Dashed and dotted lines mark interruption periods of all feedings along the batch. Continuous lines represent a smoothing of the NIRS measurements by the averaging of three adjacent points.

back was very poor (Figure 6C). This result can be easily explained if one realizes that the appearance of monomer droplets exerts a tremendous effect on the NIR spectra.28 This is confirmed independently by the extremely high monomer concentrations obtained with offline GC analysis, as illustrated in Figure 7. As the NIR model calibration was performed under conditions without monomer droplets, NIR composition data were not accurate under the reaction condition analyzed.27 This should not be considered a bad result, as the process is not supposed to operate under such conditions. As Figure 6C shows, control of the polymer composition was not possible in R5 without feedback, and the final composition offset was very high. Comparing panels C and D of Figure 6 and the deviations between the obtained [y(i)] and the desired [y(i)d] copolymer composition values along reactions R5 and R6 presented in Table 3, it can be observed that the difference between the process performances obtained with open-loop and closed-loop operation was remarkable. The identification of the appearance of monomer droplets allowed for tight control of the copolymer composition, despite the huge induction time caused by the initial charge of hydroquinone. In particular, no offset was observed in the final copolymer composition.

It was shown that in-line measurement of residual monomer concentrations and polymer holdup by nearinfrared spectroscopy (NIRS) can be used successfully to control the copolymer composition and numberaverage molecular weight in semibatch emulsion copolymerization reactions. A closed-loop control strategy based on the dynamic, real-time reoptimization of the monomer and chain-transfer agent feed rate policies along the batch was implemented both theoretically and experimentally using NIRS data as the feedback information. The spectrophotometer was trained with GC data and could advantageously substitute this slow and expensive off-line instrumental analysis. Using the MMA/BuA emulsion copolymerization as an example, it was shown that usual process disturbances could be rejected, leading to much better process operating conditions. It was also shown that the capacity to detect the appearance of monomer droplets during actual operation makes closed-loop operation with NIRS much more secure and reliable than open-loop operation. In particular, it was possible to keep the average molecular weights and copolymer composition under control simultaneously when significant amounts of inhibitor were added to the initial reactor charge. Therefore, NIRS technology could find interesting applications in emulsion polymerization processes because of its in situ characteristics, speed, and ability to perform multipurpose spectroscopic analysis in complex and aqueous media. Acknowledgment CNPq (Conselho Nacional de Desenvolvimento Cientı´fico e Tecnolo´gico) and FAPERJ (Fundac¸ a˜o de Amparo a` Pesquisa do Estado do Rio de Janeiro) are gratefully acknowledged for providing scholarships. The authors also thank Cia. Quı´mica Metacril and Rhodia do Brasil for supplying reagents and supporting our research activities. Nomenclature Ali,k ) mass of stream i fed up to the instant k (g) BuArNIRS ) residual concentration of BuA measured by k NIRS at instant k (wt %) Cf ) search region contraction factor compGC ) MMA/BuA ratio measured by GC at instant j j I[x(t0),tf] ) continuous performance index or objective function I[x(t0),P] ) discontinuous performance index or objective function

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002 2929 Latexk ) mass of latex in the reactor at instant k (g) LF ) likelihood function Mass0 ) mass of initial charge (g) MMArNIRS ) residual concentration of MMA measured by k NIRS at instant k (wt %) Mn ) number-average molecular weight Mfn ) number-average molecular weight at the end of the reaction Mfnd ) desired number-average molecular weight at the end of the reaction Mw ) weight-average molecular weight nexp ) number of experiments nivar ) number of model inputs novar ) number of model outputs NRC ) number of feed rate trials per interval P ) number of discrete time intervals p1-5 ) weights of the performance index ) polymer holdup measured by NIRS at instant k PolNIRS k (wt %) Qfi ) mass of monomer i fed up to the end of the reaction g f Qi,d ) desired mass of monomer i to be fed up to the end of the reaction g SA ) initial search region in IDP tf ) reaction end time u(t) ) manipulated variables xgel ) weight fraction of gel xBuAi ) BuA composition (mass basis) of feed stream i xcj ) computed input variables xej ) experimental input variables xMMAi ) MMA composition (mass basis) of feed stream i x(t) ) state variables of the model y(i) ) MMA cumulative copolymer composition at instant i y(i)d ) desired cumulative copolymer composition at instant i ycj ) computed output variables yej ) experimental output variables Greek Symbols Ru, βu ) constraints on manipulated variables Rx, βx ) constraints on state variables  ) maximum number of iterations of the IDP algorithm λ ) moments of the MWD σx2 ) experimental variance of measurement errors of input variables σy2 ) experimental variance of measurement errors of output variables

Literature Cited (1) Terwiesch, P.; Agarwal, M.; Rippin, D. W. T. J. Process Control 1994, 4, 238. (2) Bonvin, D. J. Process Control 1998, 8, 355. (3) Seborg, D. E. A Perspective on Advanced Strategies for Process Control (Revisited). In Proceedings of the 5th European Control Conference; Springer: New York, 1999; pp 1-32. (4) Dimitratos, J.; Elic¸ abe, G.; Georgakis, C. AIChE J. 1994, 40, 1993. (5) Latado, A.; Embiruc¸ u, M.; Mattos Neto, A. G.; Pinto, J. C. Polym. Test. 2001, 20 (4), 419-439. (6) Chien, D. C. H.; Penlidis, A. J. Macromol. Sci.-Rev. Macromol. Chem. Phys. 1990, C30 (1), 1. (7) Souza, M. E.; Lima, E. L.; Pinto, J. C. Polym. Eng. Sci. 1996, 36, 433-447. (8) Choi, K. Y.; Butala, D. N. Polym. Eng. Sci. 1991, 31, 353. (9) Clarke-Pringle, T. L.; MacGregor, J. F. Ind. Eng. Chem. Res. 1998, 37, 3660. (10) Canegallo, S.; Storti, G.; Morbidelli, M.; Carra´, S. J. Appl. Polym. Sci. 1993, 47, 961.

(11) Ponnuswamy, S. R.; Shah, S. L. J. Appl. Polym. Sci. 1986, 32, 3239. (12) Noe¨l, L. F. J.; Brouwer, E. C. P.; Van Herk, A. M.; German, A. L. J. Appl. Polym. Sci. 1995, 57, 245. (13) Echevarrı´a, A.; Leiza, J. R.; De La Cal, J. C.; Asua, J. M. AIChE J. 1998, 44, 1667. (14) Vega, M. P.; Lima, E. L.; Pinto, J. C. Polymer 2001, 42 (8), 3909-3914. (15) Gugliotta, L. M.; Leiza, J. R.; Arotc¸ arena, M.; Armitage, P. D.; Asua, J. M. Ind. Eng. Chem. Res. 1995, 34, 3899. (16) Rita, D. J.; Fevotte, G.; McKenna, T. F.; Othman, S.; Lima, E. L.; Pinto, J. C. In Proceedings of the International Symposium on Advanced Control of Chemical Processes; Elsevier Science Ltd.: Amsterdam, The Netherlands, 2000; pp 365-370. (17) Skoog, D. A.; Leary, J. J. In Principles of Instrumental Analysis; Skoog, D. A., Leary, J. J., Eds.; Saunders College Publishers: New York, 1992; Chapter 12. (18) NIRSystems Process Analytics Manual, version 1.0; NIRSystems Inc.: Silver Springs, MD, 1994. (19) Downey, G. In Computing Applications in Molecular Spectroscopy; George, W. O., Steele, D., Eds.; The Royal Society of Chemistry: London, 1995; Chapter 10. (20) Diffogio, R. Appl. Spectrosc. 1995, 49, 67. (21) Beebe, K. R.; Kowalski, B. R. Anal. Chem. 1987, 59, 1007. (22) Haaland, D. M. In Computer-Enhanced Analytical Spectroscopy; Jurs, P. C., Ed.; Plenum Press: New York, 1992; Chapter 1. (23) Thomas, E. V. Anal. Chem. 1994, 66, 795. (24) Gossen, P. D.; MacGregor, J. F.; Pelton, R. H. Appl. Spectrosc. 1993, 47, 1852. (25) Wu, C.; Danielson, J. D. S.; Callis, J. B.; Eaton, M.; Ricker, N. L. Process Control Qual. 1996, 8, 1. (26) Wu, C.; Danielson, J. D. S.; Callis, J. B.; Eaton, M.; Ricker, N. L. Process Control Qual. 1996, 8, 25. (27) Vieira, R. A. M.; Sayer, C.; Lima, E. L.; Pinto, J. C. J. Appl. Polym. Sci., 2002, 84 (14), 2670-2682. (28) Vieira, R. A. M.; Sayer, C.; Lima, E. L.; Pinto, J. C.; Vieira, R. A. M.; Sayer, C.; Lima, E. L.; Pinto, J. C. Polymer 2001, 42 (21), 8901-8906. (29) Santos, A. F. Internal Report PEQ/COPPE; Influeˆncia das Varia´veis de Operac¸a˜o Sobre os Espectros de Infravermelho Pro´ximo em um Reator de Polimerizac¸a˜o (in Portuguese), Universidade Federal do Rio de Janeiro, Rio de Janeiro, Brazil, 1999. (30) Santos, A. F.; Lima, E. L.; Pinto, J. C. J. Appl. Polym. Sci. 1998, 70 (9), 1737-1745. (31) Sayer, C.; Lima, E. L.; Pinto, J. C.; Arzamendi, G.; Asua, J. M. J. Polym. Sci. A: Polym. Chem. 2000, 38 (2), 367375. (32) Sayer, C.; Lima, E. L.; Pinto, J. C.; Arzamendi, G.; Asua, J. M. J. Polym. Sci. A: Polym. Chem. 2000, 38 (7), 11001109. (33) Sayer, C.; Arzamendi, G.; Asua, J. M.; Lima, E. L.; Pinto, J. C. J. Polym. Sci. A: Polym. Chem. 2001, 39 (20), 35133529. (34) Sayer, C.; Arzamendi, G.; Asua, J. M.; Lima, E. L.; Pinto, J. C. Comput. Chem. Eng. 2000, 25 (4-6), 839-849. (35) Kozub, D. J.; MacGregor, J. F. Chem. Eng. Sci. 1992, 47 (5), 929-942. (36) Kozub, D. J.; MacGregor, J. F. Chem. Eng. Sci. 1992, 47 (5), 1047-1062. (37) Saldı´var, E.; Ray, W. H. Ind. Eng. Chem. Res. 1997, 36, 1322-1336. (38) Saldı´var, E.; Ray, W. H. AIChE J. 1997, 43, 8, 20212033. (39) Bojkov, B.; Luus, R. Ind. Eng. Chem. Res. 1992, 31, 1308. (40) Soderstrom, T. A.; Himmelblau, D. M.; Edgar, T. F. In Proceedings of the International Symposium on Advanced Control of Chemical Processes; , 2000; pp 93-97. (41) Embiruc¸ u, M.; Lima, E. L.; Pinto, J. C., manuscript submitted. (42) Vieira, R. A. M. MSc. Thesis, PEQ/COPPE, Universidade Federal do Rio de Janeiro, Rio de Janeiro, Brazil, 2000 (in Portuguese).

2930

Ind. Eng. Chem. Res., Vol. 41, No. 12, 2002

(43) Anderson, T. F.; Abrams, D. S.; Grens E. A., II. AIChE J. 1978, 24, 20-29.

(45) Bard, Y. Nonlinear Parameter Estimation; Academic Press: New York, 1974.

(44) Noronha, F. B.; Pinto, J. C.; Monteiro, J. L.; Loba˜o, M. W.; Santos, T. J. Um Pacote Computacional para Estimac¸ a˜ o de Paraˆ metros e Projeto de Experimentos; Technical Report PEQ/ COPPE; Universidade Federal do Rio de Janeiro: Rio de Janeiro, Brazil, 1993.

Received for review April 20, 2001 Revised manuscript received December 4, 2001 Accepted March 13, 2002 IE0103557