application of nonlinear predictive control to a semibatch polycondensation reactor

9
Application of Nonlinear Predictive Control to a Semibatch Polycondensation Reactor Galo A. Carrillo Le Roux* and Reinaldo A. Teixeira Departamento de Engenharia Quı ´mica, Escola Polite ´ cnica da Universidade de Sa ˜ o Paulo, Avenida Prof. Luciano Gualberto Travessa 3, 380, CEP 05508-900 Sa ˜ o Paulo - SP, Brazil In this work, a model of a semibatch poly(ethylene terephthalate) reactor in which dimethyl therephthalate (DMT) and ethylene glycol (EG) react during the transesterification stage is developed and used for an application of nonlinear model predictive control (NMPC). The reactor is connected to a packed-bed column with a partial condenser. In the model, the hydrodynamic behavior of a column section is described by a correlation valid for hydrodynamic regimes under the loading point. The description of the heating of the reactor includes the division of the equipment into different compartments, each with a given thermal inertia and with a thermal resistance assumed between them. The column is considered dry at startup. NMPC is applied to the system model, and its performance is compared to that of an optimally tuned PID controller on three different temperature trajectories. The performance of NMPC is better than that of PID. The NMPC performance is studied for different modeling gaps, and it is not seriously degraded for the cases studied. This study does not intend to prove NMPC superiority over PID in the control of a semibatch polycondensation reactor. The application of NMPC illustrates the main difficulties involved in the control of the process, as the model presented here is able to describe the main features of its dynamics. 1. Introduction Polycondensation products are obtained by a revers- ible step growth polymerization. To obtain high-molec- ular-weight products, the conversion should be as high as possible. Given that the reaction is reversible, one way to favor the conversion is by removing volatile products (called the condensate) from the system. The necessity of drawing out the condensate while avoiding the entrainment of reactants implies the connection of a separation unit to the reactor. In this sense, semibatch polycondensation processes are essentially batch reac- tive distillation processes. In the 1980s, many works on the optimization of batch polycondensation reactors were produced. Many of these works were collected by Gupta and Kumar 1 in a refer- ence book. The interest in the field has decreased steadily since then, with rare exceptions such as the works by Sorensen and Skogestadt 2 and Robertson et al. 3 It is not necessary to say that experimental applica- tions are extremely rare and, in general, are related not to control theory but to process development and kinet- ics. The main reasons for the limited concern in polycon- densation are the relation between the added value and scale of the products, the control difficulties, and the variety of equipment designs that can be employed. Intensive commodity polycondensation products, such as poly(ethylene terephthalate) and nylon are currently mainly produced by continuous processes. Many poly- condensation products are obtained in medium/small scale, with sometimes-high added value. However, the productivity that can be obtained by optimizing the dynamic behavior of polycondensation reactors does not yield a significant financial return if the scale of production is small. If the accurate control and optimi- zation of a specific batch polycondensation system requires a complex model describing the kinetics, vapor- liquid equilibrium, separation, and hydraulics, the effort needed to obtain such a model would be considerable. The financial return would not justify this effort if the scale of production were small, even if the added value of the product were high. In addition, these processes are particularly difficult to operate because of their nonlinearity and high level of interaction among manipulated variables. As the growth of polymer is affected by the amounts of reac- tants and condensate in the system and by the temper- ature of the medium, the control of these variables is essential to reach objectives such as product quality. While performing experiments in this area, our research team has experienced control difficulties that were shown to be clearly reflected in the quality of the product. 4 Recently, Waschler et al. 5 performed an analysis of a simplified model to extract the main physical features of the dynamics of a continuous stirred tank reactor (CSTR) in which there is vapor-liquid equilibrium. They showed that, in many conditions, such systems exhibit multiple steady states. One of these conditions is that of a kinetically controlled process with consider- able differences in the boiling points of the pure components. The case studied here presents these characteristics. The analysis by Waschler et al. 5 does not exactly apply to this work, as a semibatch reactor is studied (and not a CSTR); nevertheless, it shows the degree of difficulty that can be found in controlling simultaneous reaction-equilibrium systems. Some authors have studied the control problem of polycondensation reactors assuming standard column designs (i.e., with plates and reflux drum). 2,6 In practice, * To whom correspondence should be addressed. Tel.: (5511) 30912246. Fax: (5511) 30912246. E-mail: [email protected]. 7303 Ind. Eng. Chem. Res. 2004, 43, 7303-7311 10.1021/ie0343317 CCC: $27.50 © 2004 American Chemical Society Published on Web 10/05/2004

Upload: reinaldo-a

Post on 04-Feb-2017

214 views

Category:

Documents


1 download

TRANSCRIPT

Application of Nonlinear Predictive Control to a SemibatchPolycondensation Reactor

Galo A. Carrillo Le Roux* and Reinaldo A. Teixeira

Departamento de Engenharia Quımica, Escola Politecnica da Universidade de Sao Paulo,Avenida Prof. Luciano Gualberto Travessa 3, 380, CEP 05508-900 Sao Paulo - SP, Brazil

In this work, a model of a semibatch poly(ethylene terephthalate) reactor in which dimethyltherephthalate (DMT) and ethylene glycol (EG) react during the transesterification stage isdeveloped and used for an application of nonlinear model predictive control (NMPC). The reactoris connected to a packed-bed column with a partial condenser. In the model, the hydrodynamicbehavior of a column section is described by a correlation valid for hydrodynamic regimes underthe loading point. The description of the heating of the reactor includes the division of theequipment into different compartments, each with a given thermal inertia and with a thermalresistance assumed between them. The column is considered dry at startup. NMPC is appliedto the system model, and its performance is compared to that of an optimally tuned PID controlleron three different temperature trajectories. The performance of NMPC is better than that ofPID. The NMPC performance is studied for different modeling gaps, and it is not seriouslydegraded for the cases studied. This study does not intend to prove NMPC superiority over PIDin the control of a semibatch polycondensation reactor. The application of NMPC illustrates themain difficulties involved in the control of the process, as the model presented here is able todescribe the main features of its dynamics.

1. Introduction

Polycondensation products are obtained by a revers-ible step growth polymerization. To obtain high-molec-ular-weight products, the conversion should be as highas possible. Given that the reaction is reversible, oneway to favor the conversion is by removing volatileproducts (called the condensate) from the system. Thenecessity of drawing out the condensate while avoidingthe entrainment of reactants implies the connection ofa separation unit to the reactor. In this sense, semibatchpolycondensation processes are essentially batch reac-tive distillation processes.

In the 1980s, many works on the optimization of batchpolycondensation reactors were produced. Many of theseworks were collected by Gupta and Kumar1 in a refer-ence book. The interest in the field has decreasedsteadily since then, with rare exceptions such as theworks by Sorensen and Skogestadt2 and Robertson etal.3 It is not necessary to say that experimental applica-tions are extremely rare and, in general, are related notto control theory but to process development and kinet-ics.

The main reasons for the limited concern in polycon-densation are the relation between the added value andscale of the products, the control difficulties, and thevariety of equipment designs that can be employed.Intensive commodity polycondensation products, suchas poly(ethylene terephthalate) and nylon are currentlymainly produced by continuous processes. Many poly-condensation products are obtained in medium/smallscale, with sometimes-high added value. However, theproductivity that can be obtained by optimizing thedynamic behavior of polycondensation reactors does not

yield a significant financial return if the scale ofproduction is small. If the accurate control and optimi-zation of a specific batch polycondensation systemrequires a complex model describing the kinetics, vapor-liquid equilibrium, separation, and hydraulics, the effortneeded to obtain such a model would be considerable.The financial return would not justify this effort if thescale of production were small, even if the added valueof the product were high.

In addition, these processes are particularly difficultto operate because of their nonlinearity and high levelof interaction among manipulated variables. As thegrowth of polymer is affected by the amounts of reac-tants and condensate in the system and by the temper-ature of the medium, the control of these variables isessential to reach objectives such as product quality.While performing experiments in this area, our researchteam has experienced control difficulties that wereshown to be clearly reflected in the quality of theproduct.4

Recently, Waschler et al.5 performed an analysis of asimplified model to extract the main physical featuresof the dynamics of a continuous stirred tank reactor(CSTR) in which there is vapor-liquid equilibrium.They showed that, in many conditions, such systemsexhibit multiple steady states. One of these conditionsis that of a kinetically controlled process with consider-able differences in the boiling points of the purecomponents. The case studied here presents thesecharacteristics. The analysis by Waschler et al.5 doesnot exactly apply to this work, as a semibatch reactoris studied (and not a CSTR); nevertheless, it shows thedegree of difficulty that can be found in controllingsimultaneous reaction-equilibrium systems.

Some authors have studied the control problem ofpolycondensation reactors assuming standard columndesigns (i.e., with plates and reflux drum).2,6 In practice,

* To whom correspondence should be addressed. Tel.: (5511)30912246. Fax: (5511) 30912246. E-mail: [email protected].

7303Ind. Eng. Chem. Res. 2004, 43, 7303-7311

10.1021/ie0343317 CCC: $27.50 © 2004 American Chemical SocietyPublished on Web 10/05/2004

packed-bed columns and partial condensers are moretypical for polycondensation reactors because of theirflexibility and their small condensate inventory. Inaddition, the authors do not assume that the columnand reflux drum (if the latter exists) should start dry,which polycondensation reactors usually do becausethey are multiproduct. Because the compositions ofcondensate products between different batches aresufficiently dissimilar, it would be necessary to emptythe column (and reflux drum) between different prod-ucts.

Even if the problem does not present a short-termeconomic impact, it does present interesting challenges.If a general and flexible solution were obtained thatcould be applied to different equipment and easilytailored for different products, its economic potentialwould be considerable.

In this work, a model of a semibatch poly(ethyleneterephthalate) reactor in which dimethyl therephthalate(DMT) and ethylene glycol (EG) react during the so-called transesterification stage7 is developed and usedfor control studies. The model corresponds to an experi-mental device available in our laboratory and is suitedfor testing control strategies. The model is able todescribe the fact that the column starts dry, whichintroduces discrete switches between operating modesthat describe a single phase behavior or vapor-liquidequilibrium, that is, vapor withdrawal from the system.This characteristic introduces discontinuities into thebehavior of some variables such as the vapor flux. Thiscomplexity, in turn, introduces additional difficulties forthe controller, which should act as for disturbancerejection.

A nonlinear model predictive controller (NMPC) isapplied to the system model to evaluate its potentialuse. It is based on a very detailed model. The NMPCwould be expected to have very good performancebecause it is able to deal with nonlinearities and it issuited for predicting discontinuities in the processvariables, which are deterministic because they arisefrom operating conditions and not from unmeasureddisturbances. The NMPC implemented serves as abenchmark that is useful to quantify the performanceof any other control scheme in comparison.

The implementation of the NMPC on the modelprovides the opportunity of studying robustness issues,as it enables the intentional introduction of modelingerrors. This is important for linking the ability of theNMPC to deal with nonlinearities to robustness.

In this work, an optimally tuned PID controller iscompared to the NMPC in terms of performance. Thisstudy does not intend to prove superiority of the NMPCover the PID in the control of semibatch polycondensa-tion reactors. The application of the NMPC illustratesthe main difficulties involved in the control of theprocess, showing that the model presented here is ableto describe the main features of its dynamics.

The application of the NMPC to the available experi-mental device is not yet intended, as it would be of littlepractical use because the model is specific for the poly-(ethylene terephthalate) system and the experimentalreactor described herein. Too much effort would benecessary to implement the NMPC, and it is moreimportant to concentrate on the development of a moregeneral control solution.

2. System Studied

The model developed and studied in this work issuited to describe an experimental reactor available inour laboratory, which is represented in Figure 1. Thereactor is heated by means of an electric resistance,soldered in aluminum, at the bottom of the reactor. Theheating power is manipulated remotely through aprogrammable logical controller (Allen-Bradley, modelSLC/5). Electrical resistance is used, instead of a liquidtransfer medium, because the reactor is able to operateat temperatures up to 350 °C. The reactor is equippedwith a mixer with controlled speed, remote speed setpoint, and torque measurement (CAT, model R 100C).

A packed-bed column is attached to the vapor outlet.The top of the column is connected to a partial condensermade up of a jacket through which cooling water flowsand inside which vapor condenses in a bundle of verticaltubes. A pump (ISMATEC, model Reglo-Z) controls theflow of cooling water and is manipulated remotely. Atotal condenser is placed after the partial condenser tocondense the vapor that leaves the system. Platinumresistance thermometers (RTDs) are used to performtemperature measurement throughout the system. Thereis one RTD inside the reacting medium and another atthe partial condenser vapor outlet. The process issupervised by the Intellution FIX HMI software.

3. System Model

The kinetics of the system has been described by Shinet al.8 and corresponds to the prepolymerization step ofpoly(ethylene terephathalate) production. No secondaryreaction is assumed to take place, as our focus is on themacroscopic effects of process variables.

The reactants are dimethyl terephthalate (DMT) andethylene glycol (EG). The condensate product is metha-nol (M). We consider two kinds of terminal groups, Eg(glycol) and Em (methyl) and a glycol ester bridge, whichregroups an ethylene glycol molecule bonded throughtwo ester bonds to benzene rings (Z). The reaction

Figure 1. Schematic representation of the experimental device.

7304 Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004

mechanism is made up of three types of reactions

Assuming a reactor volume of V, material balanceswere carried out for each of the species EG and M, forthe terminal groups Eg and Em, for the bonds Z, and forthe volatile species considered EG and M

The factors 2 and 4 appearing in the preceding equa-tions are due to the number of distinct ways a compo-nent can react. The components that can react in twodistinct ways are EG, because it has two alcohol endgroups, and Z, because it regroups two ester bonds.8

The reaction (k1, k2, and k3) and equilibrium (K1, K2,and K3) constants were extracted from Shin et al.8 FVis the molar flow rate of vapor that leaves the reactor,and LN is the liquid flow rate from the final columnsection, just above the reactor, that flows back to it.

When there is no vapor-liquid equilibrium in thereactor, these flows are both set to zero.

Raoult’s law is applied to predict partial vapor pres-sures. The onset of vapor-liquid equilibrium is detectedby examining the sum of the partial pressures of thevolatile species and comparing it to the total pressure.After this condition has been achieved, an equation thatstates that the sum of the partial pressures is equal tothe total pressure is incorporated into the system ofdifferential equations to describe the vapor-liquidequilibrium. This equation, together with the energybalance, allows for the evaluation of the molar flow rateof vapor that leaves the reactor, FV. When vapor-liquidequilibrium occurs, the temperature cannot changefreely, because the equilibrium condition must be re-spected at any time. For instance, if there were only onevolatile component when vapor-liquid equilibrium wasestablished, the temperature would be fixed at theboiling point of the volatile component. The onset ofvapor-liquid equilibrium introduces a switch in operat-ing behavior that could seem to be produced by anunmeasured disturbance, but that is, in fact, predict-able.

The description of the heating of the reactor consistsof dividing the equipment into different compartments,each with a given thermal inertia and with a thermalresistance assumed between them, as described inFigure 2. The energy balance for the reacting mediumtakes the form

where

Ester Interchange

Em + EG {\}k1

k1/K1Eg + M

Transesterification

Em + Eg {\}k2

k2/K2Z + M

Polycondensation

2Eg {\}k3

k3/K3Z + EG

dEm

dt) V[-k1(2[Em][EG] -

[Eg][M]K1

) -

k2([Em][Eg] -2[Z][M]

K2)] (1)

dEg

dt) V[k1(2[Em][EG] -

[Eg][M]K1

) -

k2([Em][Eg] -2[Z][M]

K2) - 2k3([Eg]

2 -4[Z][EG]

K3)] (2)

dZdt

) V[k2([Em][Eg] -2[Z][M]

K2) +

k3([Eg]2 -

4[Z][EG]K3

)] (3)

dEGdt

) -yEGFV + xEG,NLN +

V[-k1(2[Em][EG] -[Eg][M]

K1) +

2k3([Eg]2 -

4[Z][EG]K3

)] (4)

dMdt

) -yMFV + xM,NLN +

V[k1(2[Em][EG] -[Eg][M]

K1) +

k2([Em][Eg] -2[Z][M]

K2)] (5)

Figure 2. Compartments assumed to model the heating behaviorof the reactor.

dTr

dt)

1

mmrCp,mr

[(Q4 - Q5 - Q11) - (V∑i)1

nr

∆Hriri) -

FV(HRV - hR

V) + LN(HNL - hN

L)] (6)

HRV ) yEG[∆HEG

vap + Cp,EG(Tr - Tref)] + yM[∆HMvap +

Cp,M(Tr - Tref)] (7)

hRV ) yEGMWEGCp,mr(Tr - Tref) +

yMMWMCp,mr(Tr - Tref) (8)

HNL ) xEG,NMWEGCp,EG,N(TN - Tref) +

xM,NMWMCp,M,N(TN - Tref) (9)

hNL ) xEG,NMWEGCp,mr(Tr - Tref) +

xMMWMCp,mr(Tr - Tref) (10)

Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004 7305

∆Hivap, MWi, and Cp,i are the heat of vaporization, the

molecular weight, and the specific heat of component i,where i ) EG and M. ∆Hri represents the heat ofreaction ri. Q4, Q5, and Q11 represent the heat exchangedby the reacting medium with the bottom, the side, andthe cover of the reactor, respectively, following Figure2.

The modeling of the fixed-bed column assumes thatit is dry in the beginning and is based on the MESHequations. This is possible because the column is dividedinto a finite number of sections, with a given heightequivalent to a theoretical plate (HETP).9 The onset ofvapor-liquid equilibrium is detected in each stage. Thehydrodynamic behavior of a column section is describedby Billet’s correlation,10 valid for hydrodynamic regimesunder the loading point. This equation asserts a relationbetween the liquid holdup and the liquid flow rate

where â is evaluated through the expression

with ηjL, Fj

L, and MWm,j representing the viscosity,density, and molecular weight, respectively, of the liquidmixture in section j of the fixed-bed column. g is theacceleration of gravity, a is the specific surface area ofthe packing, ah is its hydraulic area, and Za the heightof section j. The ratio ah/a is assumed to be 1. A is thecross-sectional area.

The global and partial (for components EG and M)material balance equations, at each column section, aregiven by

where Vj and Lj are the rates of vapor and liquid flow

of EG and M leaving each column section j. xEG, xM andyEG, yM are the molar fractions of EG and M in the liquidand vapor phases, respectively. As in the reactor, theonset of vapor-liquid equilibrium is tested in each ofthe sections.

The energy balance for each column section j is givenby

and

where

In the energy balance for the partial condenser, theheat transfer with the cooling water is considered. Thepartial condenser is modeled as a column section, andan additional energy balance is performed in the coolingwater jacket, given by

where Fwater, Vcp, Cp,water, Tw, and qw are, respectively,the density, volume, specific heat, temperature, and flowof the cooling water.

The manipulated variables are Qr, the electrical powerintroduced to the resistance at the bottom of the reactor,called u1, and qw, the cooling water flow through thepartial condenser jacket, called u2. The controlledvariables are the reactor temperature (Tr) and thecondenser temperature (Tc). It is possible to infer thecomposition of the vapor leaving the system from thecondenser temperature. Thus, the condenser tempera-ture set point (in the transesterification stage) shouldbe close to the methanol boiling point, to avoid ethyleneglycol losses. Trajectories for Tr and Tc define portableoperating policies. Their application depends on ad-equate tracking control implementation.

Henceforth, the following parameters for the systemare assumed: the initial amount of DMT is 2 mol, theinitial amount of EG is 4 mol, the number of sectionsin the column is 5 (the partial condenser is numbered1), the initial temperature (all compartments) is 413 K,and the air temperature is 298 K.

The model was implemented in Matlab and solved bythe ode15s routine. In Figure 3, Tr and Tc trajectories

Lj ) âUj3 (11)

â )MWm,j

2g

12ηjLa2Za3A2Fj

L(ah/a)2(j ) 1, 2, ..., N) (12)

dUj

dt) Lj-1 + Vj+1 - Lj - Vj (j ) 1, 2, ..., N) (13)

dEGj

dt) xEG,j-1Lj-1 + yEG,j+1Vj+1 - xEG,jLj - yEG,jVj

(j ) 1, 2, ..., N) (14)

dMj

dt) xM,j-1Lj-1 + yM,j+1Vj+1 - xM,jLj - yM,jVj

(j ) 1, 2, ..., N) (15)

dTj

dt) 1

(Mr,jCp,r,j + EGjCp,EG,j + MjCp,M,j)(Vj+1Hj+1

1 +

Lj-1Hj-12 - VjHj

3 + Qc,j) (j ) 1, 2, ..., N) (16)

Qc,j {) 0 if j > 1* 0 if j ) 1

Figure 3. Tr and Tc as functions of time for fixed Qr and qw.

Qc,j ) UgA(Tj - Tcp) (17)

Hj+11 ) yEG,j+1[∆HEG

vap + Cp,EG(Tj+1 - Tj)] +

yM,j+1[∆HMvap + Cp,M(Tj+1 - Tj)] (18)

Hj-12 ) xEG,j-1Cp,EG(Tj-1 - Tj) +

xM,j-1Cp,M(Tj-1 - Tj) (19)

Hj3 ) yEG,j∆HEG

vap + yM,j∆HMvap (20)

dTcp

dt)

qw(Tw - Tcp)Vcp

+Qc,j

FwaterVcpCp,water(21)

7306 Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004

are presented for fixed Qr (330 W) and qw (40 mL/min).It can be seen that, because Tc equals the methanolboiling point (335.6 K), no EG leaves the system duringoperation for these conditions. In Figure 4, the temper-ature profile along the column as a function of time canbe seen. In Figure 5, the vapor flows from the differentsections of the column are presented as a function oftime.

Although there are apparent discontinuities in vaporflow (Figure 5), no unmeasured disturbances are takingplace in the system. V5 is the vapor flow from the firstcolumn section. It rises very fast as soon as the liquidin the section reaches the bubble-point temperature(Figure 4). In simple terms, this means that the liquidbegins to boil. When the vapor leaves section 5, itreaches section 4, which begins to be filled with thevapor that condenses there because of the low initialtemperature of the section. When the liquid in section4 reaches its bubble-point temperature (Figure 4), vaporrises from this section (V4) and begins filling section 3,and so on, until section 1 (the partial condenser) is filledby liquid. Because the bubble-point temperature de-pends on composition, Figure 4 illustrates the fact thatthe composition in the column becomes enriched inmethanol as we approach the partial condenser (section1).

Vapor does not leave the system as long as thetemperature in section 1 (partial condenser) does notreach the methanol boiling point. Because the rate ofreaction decreases in time because of the reactant

consumption, methanol withdrawal decreases and tendsasymptotically to zero.

The time behaviors of Tr and Tc are presented inFigures 6 and 7, respectively, for two different fixedvalues of Qr: 330 and 430 W. It can be seen that, asthe heating power increases, vapor leaves the systemsooner and its composition no longer corresponds puremethanol. This can be inferred because Tc is higher thanthe methanol boiling point.

The control of qw is critical because, if it were too low,the temperature of the partial condenser would rise,thus allowing ethylene glycol to leave the system. If theamount of EG in the system is not controlled, the qualityof the product cannot be known a priori, becauseethylene glycol is a reactant. The function of qw isregulation of the reflux ratio, because it sets the ratiobetween the vapor and liquid flows inside the column.

The behavior of Tr and Tc as a function of time ispresented in Figures 8 and 9, respectively, for twodifferent fixed values of qw: 2 and 40 mL/min. It can benoticed that the two manipulated variables have similareffects on both of the controlled variables. For thecontrol of the composition of the vapor leaving thesystem, the key variable is the ratio between the vaporand liquid flows along the column, which correspondsto the reflux ratio and defines the operating line of thecolumn.

Figure 4. Temperatures in the sections of the column as afunction of time for fixed Qr and qw.

Figure 5. Vapor flow in the sections of the column as a functionof time for fixed Qr and qw.

Figure 6. Tr as a function of time for Qr ) 330 and 430 W.

Figure 7. Tc as a function of time for Qr ) 330 and 430 W.

Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004 7307

4. Control

NMPC and PID controllers performance was com-pared on three different temperature trajectories. Thetrajectories are described in Table 1. As you move fromtrajectory 1 to trajectory 3, the slope of the temperatureramp and the final temperature become less severe. Theset point of Tc (340 K) is a little higher than the puremethanol boiling point (335.6 K). This is a typicaloperating practice used to avoid problems that wouldbe caused by a small temperature sensor bias.

The NMPC controller implemented follows that ofHenson.11 The NMPC objective function formulation hasthe form

where ysp(k) represents the set-point trajectories for the

output variables, y(k + j|k) represents the predictedoutput for time (k + j) of the process at instant k. Thecontrol horizon M is 2; the prediction horizon P is 4;and d(k) represents the estimated disturbances, calcu-lated as the difference between the output of the processand the predicted output obtained from the nonlinearreference model. The matrix Q equals equality matrix(the two variables have the same weight), and S isassumed null. The optimization problems generated bythe NMPC are solved at each control interval by thefmincon routine in Matlab. This routine implements theSQP (sequential quadratic programming) method. Con-straints for the manipulated variables are defined asfollows

To avoid numerical problems, the control of thecondenser temperature is not made effective as long asthe condenser temperature does not approach its setpoint. This is because vapor does not leave the systemas long as proper conditions in the reactor and thecolumn have not been met. As u2 (qw) would have noeffect on the two controlled variables thus far, theoptimization problem would be singular.

A digital PID algorithm was employed to compare thecontrol performance. The PID tuning was obtained byoptimizing its parameters to minimize the sum of theintegral of square errors (ISE) for both controlledvariables. The initial value of manipulated variable u1was set to zero. The control interval is 0.1 min, and thepairing of manipulated and controlled variables is Tr-u1 and Tc-u2.

The solution for the integral constant of loop 1 wouldbe zero if there were no constraint on the integral value.This solution leads to the minimum ISE value, but itmakes the system very sensitive to disturbances becausethere is no integral action, and control performancewould present an offset. Thus, a minimum value of 23was established for the integral constant, and thesolutions obtained for the tuning parameters of the loopsare

4.1. Base Case. In Figures 10-12, the performanceof the PID and NMPC for Tr trajectories 1-3, respec-tively, is presented. These figures are magnifications ofthe original trajectories with time spans of only 40 minwhereas the range of the original trajectories is 120 min.This is to emphasize four main events, where the systembehavior presents difficulties in tracking the Tr trajec-tory: (i) The first event is at the beginning of operation,when the system must leave its initial state and followthe initial ramp. The NMPC response is quite fast, the

Figure 8. Tr as a function of time for qw ) 2 and 40 mL/min.

Figure 9. Tc as a function of time for qw) 2 and 40 mL/min.

minu(k|k),u(k+1|k),...,u(k+M-1|k)

J )

[y(k + P|k) - ysp(k) + d(k)]TQ[y(k + P|k) -ysp(k) + d(k)] +

∑j)0

P-1

[y(k + j|k) - ysp(k) + d(k)]TQ[y(k + j|k) -

ysp(k) + d(k)]

+ ∆uT(k + j|k)S∆u(k + j|k) (22)

Table 1. Tr Trajectories Studied

trajectory 1 trajectory 2 trajectory 3

from 413 to 453 Kin 10 min

from 413 to 453 Kin 20 min

from 413 to 453 Kin 30 min

from 453 to 473 Kin 80 min

from 453 to 463 Kin 70 min

hold at 453 K untilt ) 120 min

hold at 473 K untilt ) 120 min

hold at 463 K untilt ) 120 min

-

0 e u1 e 1000

0 e u2 e 100

loop 1: Kp ) 100, Ki )23, Kd ) 100

loop 2: Kp ) 69.7, Ki ) 57.4, Kd ) 9.1

7308 Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004

whereas PID controller takes 5-10 min to track thetrajectory (Tr-I). (ii) At about 8 min for trajectory 1, 13min for trajectory 2, and 15 min for trajectory 3, thereactor reaches vapor-liquid equilibrium, and thebehavior is similar to what would be introduced by anunmeasured step disturbance (Tr-II). When the NMPCpredicts the discontinuity in operating behavior, it

promptly recovers from the situation, whereas it takeslonger for the PID controller. (iii) The third event (Tr-III) corresponds to the interaction of Tc stabilization andwill be better understood in the analysis of the Tctrajectories. In Figure 10, a small overshoot can beidentified at about 12 min, in Figure 12 at 23 min, andin Figure 11 at 20 min (in fact, in this figure the effectis not remarkable). (iv) Finally, the fourth event (Tr-IV) corresponds to the change in the slope of thetemperature ramp. Controllers manage the discontinu-ity on the derivative of the trajectory tracked, at time10 min for trajectory 1, 20 min for trajectory 2, and 30min for trajectory 3.

In Figures 13-15, the behavior of Tc when PID andNMPC controllers are employed to track trajectories1-3, respectively, is presented. The behavior of Tc ischaracterized by four different behaviors: (i) a regionof constant temperature, in which there is no vaporleaving the reactor (Tc-I); (ii) a region with a steep slope(Tc-II) that corresponds to the thermal transient of thecolumn, when the reactor enters vapor-liquid equilib-rium and the column begins to grow warmer untilcondensate begins to leave the partial condenser; (iii) aregion of constant temperature of 333 K (Tc-III), duringwhich vapor first leaves the system as it reaches thepartial condenser at the methanol boiling point; and (iv)

Figure 10. Tr trajectory 1 with PID and NMPC controllers.

Figure 11. Tr trajectory 2 with PID and NMPC controllers.

Figure 12. Tr trajectory 3 with PID and NMPC controllers.

Figure 13. Tc trajectory 1 with PID and NMPC controllers.

Figure 14. Tc trajectory 2 with PID and NMPC controllers.

Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004 7309

a region (Tc-IV) in which the condensate temperaturefollows its set point (340 K).

The flow of cooling water interacts with the controlof Tr. This corresponds to the event named Tr-III. Asvapor reaches the partial condenser, it first heats thewater contained in the jacket. This corresponds to thestage where condensate leaves the system at 335.6 K.Water flow to the jacket is null, as any positive flowwould have the effect of lowering the condensate tem-perature. When water begins to flow (just before Tc-IV,when the condensate leaves the system at 340 K), itseffect is to increase the flow of liquid back to the reactor.The NMPC overreacts, which is why there are smallovershoots at times 12 and 23 min in Figures 10 and12, respectively.

An important effect is that the time history interfereswith the amount of volatile species present in thereactor. This is the reason the onset of vapor-liquidequilibrium takes places at different times for PID andNMPC controllers, as can be observed in Figures 13-15.

In Table 2, the performances are compared quanti-tatively in terms of the ISEs for manipulated variables1 (Tr) and 2 (Tc). The NMPC performance is better thanthat of the PID.

4.2. Robustness. In this section, the NMPC perfor-mance is studied for different modeling gaps. Thesystem is unchanged, but the reference model is changed.The following parameters were varied with respect tothe system model: (i) the number of sections in thecolumn for the reference model was changed to 2; (ii)some initial temperature were perturbed, with theinitial temperature of the resistance compartment beingraised by 50 K, the temperature of the aluminum by 30K, and those of the base and the side by 10 K; (iii) themass of the copper resistance was changed by +30%;(iv) the heat transfer rate in the partial condenser, UA,was changed by +30%; and (v) the kinetic constant ofreaction 1 was changed by +20% and -20%.

The results are presented in Table 3, and Tr and Tctrajectories are presented in Figures 16 and 17 for thecase in which the kinetic constant of reaction 1 ischanged by +20% and -20%.

The NMPC performance is not seriously degraded forthe cases studied. A simple feedback introduced in theNMPC formulation was able to reject the modelinggaps.11 The worst performance was for the gap in thenumber of sections of the column.

4.3. Robustness and Trajectories. In Table 4,results for the three trajectories, for the cases wherethe number of sections in the column is changed to 2and the initial temperatures are perturbed, are pre-

Figure 15. Tc trajectory 3 with PID and NMPC controllers.

Table 2. Integral of the Square Error for Each of theControlled Variables for the NMPC and the PIDController

NMPC PID

ISE1 ISE2 ISE1 ISE2

trajectory 1 4.4 62.7 65.0 58.6trajectory 2 1.0 97.2 31.2 103.6trajectory 3 3.9 133.2 23.3 149.8

Figure 16. Tr trajectory for the cases in which the kineticconstant of reaction 1 of the reference model is changed by +20%and -20%.

Figure 17. Tc trajectory for the cases in which the kineticconstant of reaction 1 of the reference model is changed by +20%and -20%.

Table 3. Integral of the Square Error for Each of theControlled Variables for Different NMPC RobustnessStudy

ISE1 ISE2

base case 4.4 62.7number of sections ) 2 7.9 285.4perturbation initial temperatures 8.8 52.6mass of copper resistance 12.3 64.2UA partial condenser 6.0 61.7kinetic constant (k1) +20% 8.7 69.8kinetic constant (k1) -20% 4.7 62.4

7310 Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004

sented. It can be concluded that, as trajectories go from1 to 3, the error in Tc increases. This is due to the factthat the production of methanol decreases and, as aconsequence, so does the rate of vapor from the partialcondenser. This makes the time required for the vaporleaving the system to go from the methanol boiling pointto 340 K longer, so that the contribution of region Tc-III (as in Figures 13-15)to the total ISE becomes moreimportant. In addition, as the rate of vapor withdrawalfrom the partial condenser decreases, qw also decreases,and the optimization problem becomes more sensitiveto small variations of this variable.

5. Conclusions

The results obtained showed that NMPC performanceis better than that of the PID. The NMPC implementedwas tested for robustness, and its performance was notseriously degraded. However, this study does not intendto prove NMPC superiority over PID in the control of asemibatch polycondensation reactor. The application ofthe NMPC illustrates the main difficulties involved inthe control of the process, as the model presented hereis able to describe the main features of its dynamics.

The NMPC implemented here is specific for theprepolymerization step of PET production and theexperimental reactor studied. Research should be fo-cused on the development of a simpler reference modelthat could be readily adapted for different equipment,products, and scales of production.

An important field of research is the study of thefeasibility of trajectories. Few works have been pub-lished on the conditions for a trajectory to be feasible,

on a specific equipment design, or on any theoreticalcondition. This would lead to the proposition of trajec-tories known a priori to be feasible, which would beeasier to track, even by simple controllers.

Acknowledgment

The authors acknowledge the Conselho Nacional deDesenvolvimento Cientıfico e Tecnologico, CNPq, andthe Fundacao de Amparo a Pesquisa do Estado de SaoPaulo, FAPESP, for their financial support.

Literature Cited

(1) Gupta, S. K.; Kumar, A. Reaction Engineering of StepGrowth Polymerization; Plenum Press, New York, 1987.

(2) Sorensen, E.; Skogestad, S. Control Strategies for ReactiveBatch Distillation. J. Process Control 1994, 4, 205-217.

(3) Robertson, D. G.; Russell, S. A.; Lee, J. H.; Ogunnaike, B.A. Modeling and control of a batch condensation reactor. InProceedings of the American Control Conference; IEEE Press:Piscataway, NJ, 1995; pp 1746-1750.

(4) Lopes Noriega, G. C. Otimizacao Experimental da Sıntesede um Oligomero EÄ ster. M.Sc. Thesis, Escola Politecnica da USP,Sao Paulo, Brazil, 2001.

(5) Waschler, R.; Pushpavanam, S.; Kienle, A. Multiple steadystates in two-phase reactors under boiling conditions. Chem. Eng.Sci. 2003, 58 (6), 2203-2214.

(6) Balasubramhaya, L. S.; Doyle, F. J., III. Nonlinear model-based control of a batch reactive distillation column. J. ProcessControl 2000, 10, 209-201.

(7) Ravindranath, K.; Mashelkar, R. A Polyethylene Tere-phthalatesI. Chemistry, thermodynamics and transport proper-ties. Chem. Eng. Sci. 1986, 41 (9), 2197-2214.

(8) Shin, J.; Lee, Y.; Park, S. Optimization of the pre-polym-erization step of the polyethylene terephthalate (PET) productionin a semibatch reactor. Chem. Eng. J. 1999, 75, 47-55.

(9) Salimi, F.; Depeyre, D. Comparison between dynamic be-haviour of a batch packed and plate column. Comput. Chem. Eng.1998, 22 (3), 343-349.

(10) Billet, R. Packed Towers in Processing and EnvironmentalTechnology; VCH Publishers: New York, 1995.

(11) Henson, M. A. Nonlinear model predictive control: Currentstatus and future directions. Comput. Chem. Eng. 1998, 23, 187-202.

Received for review December 19, 2003Revised manuscript received July 30, 2004

Accepted August 3, 2004

IE0343317

Table 4. ISE for the Three Trajectories for the Cases inWhich the Number of Sections in the Column Is Changedto 2 and the Initial Temperatures Are Perturbed

ISE1 ISE2

number of sections ) 2trajectory 1 7.9 285.4trajectory 2 11.9 370.9trajectory 3 6.4 458.5

initial temperatures perturbedtrajectory 1 8.8 52.6trajectory 2 29.8 153.0trajectory 3 197.8 191.3

Ind. Eng. Chem. Res., Vol. 43, No. 23, 2004 7311