nonlinear process model-based a thesis in chemical

192
NONLINEAR PROCESS MODEL-BASED CONSTRAINT CONTROL by MANDAR SHYAM MUDHOLKAR, B.CH.E. A THESIS IN CHEMICAL ENGINEERING Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of the Requirements for the Degree of MASTER OF SCIENCE IN CHEMICAL ENGINEERING Approved Accepted August, 1991

Upload: others

Post on 11-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

NONLINEAR PROCESS MODEL-BASED

CONSTRAINT CONTROL

by

MANDAR SHYAM MUDHOLKAR, B.CH.E.

A THESIS

IN

CHEMICAL ENGINEERING

Submitted to the Graduate Faculty of Texas Tech University in

Partial Fulfillment of the Requirements for

the Degree of

MASTER OF SCIENCE

IN

CHEMICAL ENGINEERING

Approved

Accepted

August, 1991

Page 2: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

ACKNOWLEDGMENTS

I wish to express my sincere appreciation to Prof. James

B. Riggs, chairman of my committee, for his guidance and

direction throughout this study. I owe him special thanks for

his constant encouragement and valuable advice towards my

future objectives. I also wish to express my gratitude to Dr.

R. Russell Rhinehart for his suggestions and criticism of this

work.

Appreciation is extended to Tammy Kent and Dawn Eastman

for their clerical assistance during the course of this work.

I wish to take this opportunity to thank all my family members

for their moral support throughout my graduate program.

ii

Page 3: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

TABLE OF CONTENTS

ACKNOWLEDGMENTS ii

LIST OF TABLES v

LIST OF FIGURES vi

CHAPTER 1

CHAPTER 2

CHAPTER 3

CHAPTER 4

INTRODUCTION 1

LITERATURE SURVEY 5

PROCESS SIMULATION 12

3.1 · Assumptions 14

3.2 Differential Mass Balance Equations 15

3.2.1 Equations for the Accumulator 18

3.2.2 Equations for the Reboiler 18

3.2.3 Equations for the Feed Tray 19

3.2.4 Equations for the sidestream Draw Tray 19

3.3 Simulator Development

3.4 Separation System Studied

3.5 Steady State Material Balance Equations

3.6 Inferential Control

3.6.1 Choice of Tray

NONLINEAR PROCESS MODEL BASED CONTROL

4.1 Linear PMBC Methods

4.2 Nonlinear PMBC Methods

4.3 Controller Models

4.3.1 Model Parameterization for

20

21

24

26

28

34

34

36

39

Smoker Equation Model 40

iii

Page 4: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 5

CHAPTER 6

CHAPTER 7

BIBLIOGRAPHY

APPENDIX A

APPENDIX B

APPENDIX C

4.3.2 Control Action Calculation for Smoker Equation Model 41

4.3.3 Tray-to-tray Model 41

4.3.4 Model Parameters for Tray-to-tray Model 44

4.3.5 Model Parameterization for Tray-to-tray Model 45

4.3.6 Control Action Calculation for Tray-to-tray Model 47

CONSTRAINT CONTROL 49

5.1 Types of Constraints 49

5.2 Square Approach 52

5.2.1 Control Action Calculation for Constrained Vapor Rate 52

5.2.2 Control Action Calculation for Operability Constraint 54

5.3 Weighted Least Squares Approach 55

5.3.1 Control Action Calculation for Constrained Vapor Rate 56

5.3.2 Control Action Calculation for Operability Constraint 59

RESULTS AND DISCUSSION

6.1 Unconstrained Responses

6.2 Constrained Responses

CONCLUSIONS AND RECOMMENDATIONS

PRODUCT COMPOSITION AND MANIPULATED VARIABLE RESPONSES

COMPUTER CODE

SINGLE TRAY DYNAMICS

iv

61

62

64

72

76

81

117

161

Page 5: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

LIST OF TABLES

Table 3.1: Use of Tray Temperatures to Infer Bottoms Compositions 30

Table 3.2: Percentage Changes in Tray Compositions for Setpoint Changes in Bottoms Composition 31

Table 3.3: Use of Tray Temperatures to Infer Top Composition 32

Table 3.4: Percentage Changes in Tray Compositions for Setpoint Changes in Top Composition 33

v

Page 6: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

LIST OF FIGURES

Figure 3.1: Sidestream Draw Distillation Column

Figure 3.2: Single Tray in a Sidestream Draw Distillation Column

Figure 3.3: Open-Loop Response for Bottoms Composition

13

16

With and Without Downcomer Deadtime 22

Figure 3.4: Base Case

Figure 4.1: Single Tray Modeling in Tray-to-tray Model

Figure C.1: Mathematical Model for Single Tray Dynamics

Figure C.2: Base Case - Low Relative Volatility System

Figure C.3: Base Case - High Relative Volatility System

vi

23

43

164

171

172

Page 7: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 1

INTRODUCTION

It is well recognized that one of the characteristics of

chemical processes that presents a challenging control problem

is the inherent nonlinearity of the process. In spite of this

knowledge, chemical processes have been traditionally

controlled using linear systems analysis and design tools. A

major reason that the use of linear systems theory has been so

pervasive is that there is an analytical solution, and hence

there are generally more rigorous stability and performance

proofs. Also computational requirements for linear systems

simulation (and implementation) are usually quite small when

compared to a nonlinear simulation. Obviously, the use of

linear system technique is quite limiting if a chemical

process is highly nonlinear. Modern advanced control system

software and hardware have made the practical implementation

of advanced control techniques a reality.

Recently, methods which use nonlinear process models

directly for chemical process control (Lee and Sullivan, 1988;

Economou et al., 1986; Parrish and Brosilow, 1988) have been

developed. Here methods that use a nonlinear model directly

for process control are referred to as nonlinear process model

based control (nonlinear PMBC) methods. Nonlinear PMBC

methods provide a means to directly use process knowledge and

process models to make control decisions. The use of

1

Page 8: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

nonlinear models directly for control provides a nonlinear

picture of the process, nonlinear feedforward action, and

nonlinear decoupling. In addition, by adaptively updating the

parameters of the model using on line data, the nonlinear PMBC

controller has self-tuning characteristics.

Riggs et al. (1990) have successfully demonstrated the

use of nonlinear PMBC on three low relative volatility

industrial distillation columns using a tray-to-tray binary

controller model. They have reported a factor of three to

five reduction in product variability over the previous PI

controllers. Pandit (1991) has demonstrated the use of

nonlinear PMBC on a lab scale two-product distillation column

for the methanol-water system. A number of simulation studies

using nonlinear PMBC have shown major control performance

improvement over conventional controls for the control of

wastewater pH (Williams et al., 1989), sidestream draw columns

(Riggs, 1990), supercritical fluid extraction process

(Ramachandran et al., 1990), and coal fired boilers (Riggs et

al., 1990).

The presence of constraints on the state, controlled and

output variables is a distinctive feature of many process

control problems. As a result, nonlinear PMBC must be able to

handle constraints effectively when they are encountered. In

general, constraints can be divided into four basic classes.

The first one is a constrained manipulated variable, and it

simply indicates the operation of the process with an upper or

2

Page 9: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

a lower bound on a manipulated variable. The second class of

constraints is a constrained value for the state or controlled

variable. The third is a general constraint that is nonlinear

function of input and output variables, and the last class is

the rate of change constraint on manipulated and state

variables. Constraints can also be derived according to their

properties. Hard constraints are those where no dynamic

violations of the bounds are allowed at any time, whereas for

soft constraints violation of bounds are temporarily permitted

in order to satisfy other heavily weighted criteria.

There are two general approaches for handling soft and

hard constraints involving manipulated and output variables

with significant amounts of processjmodel mismatch. One

approach, referred to as the square approach, is to sacrifice

one or more control objectives totally to satisfy the

constraints, and then to utilize the remaining degrees of

freedom to achieve the rest of the control objectives. ·This

simply means giving up control on one or more control

objectives.

Another approach, which is referred to as the weighted

least squares (WLS) approach, is a more general approach. It

uses a steady-state model to find an optimum approach to the

original control objectives based upon a weighted least

squares objective function. The objective function is

constructed to retain all the control objectives and the

weighted least squares function define the optimum departures

3

Page 10: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

of all the controlled variables from their original setpoint

values. The weighting factors simply decide the level of

importance that is given to each of the control objectives.

Hence, this approach can be used to handle both hard and soft

constraints separately or simultaneously by simply adjusting

the weighting factors in the objective function. Also, if a

weighting factor of zero is assigned to one or more control

objectives, then no importance is given to those control

objectives, and the formulation becomes that of the square

approach. Hence, square approach is one specific case of the

general optimization problem.

In this work, a specific case of sidestream draw

distillation column was chosen to study the nonlinear process

model based constraint control. Sidestream draw distillation

columns contain specific examples of each of the four general

classes of constraints discussed above, and hence constraint

control studies were performed for different types of·

constraints using the same base case. The development of the

process simulator, nonlinear process model based controller

design, and constraint control strategies are discussed in

detail in the forthcoming chapters.

4

Page 11: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 2

LITERATURE SURVEY

Nonlinear process model based control (nonlinear PMBC)

uses a nonlinear approximate model directly for control

purposes. The approximate model does not have to be a

rigorous simulator but should contain the major

characteristics of the process. One type of nonlinear PMBC

is generic model control (GMC) developed by Lee and Sullivan

(1988). GMC is a control framework for both 1 inear and

nonlinear systems in the time domain. The control law employs

a nonlinear process model directly within the controller.

Also, an integral feedback term is included such that the

closed-loop response exhibits zero offset. Similar approaches

have been proposed by Liu (1967), Balchen et al. (1988), and

Bartusiak et al. (1989). For each of the output variables,

there are two performance parameters which specify the shape

of the closed-loop system response as well as the speed of the

closed-loop system response. These parameters are selected by

considering the open-loop characteristics such as the process

time constant and the process dead time together with the

sampling time interval.

The major limitations associated with GMC are that it

assumes a perfect model, and there are no provisions to handle

significant amounts of process model mismatch.

Economou et al. ( 1986) extended internal model control so

that nonlinear models can be used. This approach is called 5

Page 12: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

nonlinear internal model control (NLIMC) and uses an iterative

integration of the approximate model for its control law.

Riggs and Rhinehart (1988) compared GMC and NLIMC for a wide

range of exothermic CSTR control problems and found that GMC

and NLIMC yielded essentially equivalent control performances.

They pointed out that the GMC control law is an explicit

numerical formulation while NLIMC is an implicit one,

therefore GMC is considerably easier to implement and requires

less computational effort.

Nonlinear model predictive control (NLPMC, Parrish and

Brosilow, 1988) uses the internal model structure but assigns

any processjmodel mismatch to unmeasured disturbances.

Recently, Bequett (1989) presented a version of NLPMC using a

single step ahead control law with continuous model parameter

updates. Patwardhan et al. (1988) applied NLPMC for the

startup of an open-loop, unstable exothermic CSTR. They

considered a maximum limit on the value for the rate of heat .

addition or the rate of heat removal. Riggs (1990) applied a

version of GMC to the same problem considered by Patwardhan et

al. and found that it and NLPMC gave equivalent performance.

These results indicate that there is an insignificant

difference between performance of various nonlinear PMBC

methods when the same approximate model is used. In fact, the

major difference between the various nonlinear PMBC methods is

the way in which offset is removed: GMC, integral term; NLIMC,

setpoint bias, or continuous parameter updates; NLPMC,

6

Page 13: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

adjustments to disturbances. These results further suggest

that using the approximate model is more important than the

way it is applied.

Henson and Seborg (1989) reviewed the field of

differential geometric control strategies. By studying a CSTR

and a pH control problem, they found that static methods, of

which nonlinear PMBC is a subset, provided the best control

performance and were relatively insensitive to process/model

mismatch. They state that GMC is only applicable to a very

restrictive class of control problems for which the

manipulated variable appears explicitly in the dynamic model

for the output variable. While the later statement is true in

a strict sense, it does not pose a practical limitation to GMC

since the manipulated variable can usually be expressed as an

explicit function of one or more variables that do appear in

the model equation.

Many practical process control problems possess

constraints on the input, state, ,and output variables. The

ability to handle constraints is essential for any control

algorithm to be implemented on real processes.

A lot of work on constraint control has been done using

linear process model based control (linear PMBC). Dynamic

matrix control, DMC (Cutler, 1979), internal model control,

IMC (Garcia and Morari, 1982), and IDCOM (Setpoint, 1979) are

prime examples of linear PMBC methods. The major limitations

associated with linear PMBC methods are that they consider

7

Page 14: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

only a linear picture of the process, the empirical models

used by these methods are only locally valid, extensive plant

testing is required to statistically identify the proper

linear model, and the models are not useful for optimization.

Seborg et al. (1983) have discussed a linear programming

based control strategy for problems which have constraints on

state, output or controlled variables. In their approach,

since the linear programming calculations are repeated at each

sampling instant, the control strategy has a feedback

structure which easily accommodates known variations in the

process model, constraints or performance index.

Ricker (1985) has illustrated the use of quadratic

programming for constrained internal model control. He

qualitatively specifies the control objectives as the

determination of present and future settings of the

manipulated variables such that the predicted future values of

the outputs track the corresponding future setpoints in an

optimal manner while obeying the inequality constraints. He

has also shown that this approach provides for the possibility

of an unconstrained optimum.

Taiwo (1980) has demonstrated the method of inequalities

for constrained multi variable control. He shows that the

problem is basically formulated in terms of inequalities of

the form,

i=1,2, •.. ,m, ( 2. 1)

where c1 is a real number, p denotes the real vector

8

Page 15: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

representing the parameters of the controller to be

determined. For each p, ,pi (p) is a real number which may

represent an aspect of the dynamic behavior of the system

under design.

bound on the

represented by

The real number i represents the numerical

particular aspect of the dynamic behavior

,Pi {p) . In formulating the problem, the

functions ,Pi, the bounds ci, and the form of the controller

have to be chosen, preference being given to the simplest

form. Once the problem is formulated, it only remains for the

computer to calculate the value of p, which is the numerical

solution to the problem.

With regard to constraint control using nonlinear model

based control, Brown et al.

handling strategy within GMC.

{ 1990) developed a constraint

They proposed a method where

slack variables defining the variable departures from the

chosen GMC specification curves are added to the GMC control

law for both the controlled variables and constrained

variables. Selecting the weighting factors on these slack

variables and defining a control objective function which was

dependent on the weighted slack variables allowed the

controller to achieve the desired compromise between

constraint violation and setpoint tracking. The solution of

the problem then becomes a nonlinear constrained optimization

that does not rely upon multi-time step model prediction. The

potential disadvantage of this method is it assumes a perfect

model and there is no provision for handling processjmodel

9

Page 16: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

mismatch, and hence it has severe limitations on applications

to problems having significant processjmodel mismatch.

Biegler et al. (1990) have discussed Newton-type

controllers for constrained nonlinear processes with

uncertainty. They have relaxed the assumption of a perfect

model for Newton-type controllers. They use a two-phase

approach to deal with the modeling error. In the first phase,

the updated model is used to predict system outputs and to

determine appropriate control variables to optimize the

control objectives. In the second phase, the discrepancy

between predicted and measured system outputs in the past time

horizon is used by a parameter estimator to determine optimal

values of the unknown process parameters.

Joseph et al. (1987) have discussed on-line optimization

of constrained multi variable chemical processes. They propose

a two-phase approach. The first phase is concerned with

identification of the process model and the estimation of the

disturbances entering the process. The second phase deals

with finding a suitable path over time for the manipulated

variables that will maximize the desired objective function.

Similar approaches are suggested by Bamberger and Isermann

(1978) and by Mukai et al. (1981). The differences lie in the

details of implementation. The constraints are accommodated

during the search for optimum. This reduces to an equality

constrained optimization problem that is solved using

nonlinear programming. There results indicate that

10

Page 17: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

constraints put limitations on the future time horizon

prediction and that increases the size of the optimization

problem to be solved.

11

Page 18: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 3

PROCESS SIMULATION

In order to study nonlinear process model based

constraint control, a specific case of sidestream draw

distillation columns was selected. Sidestream draw

distillation columns contain specific examples of each of the

four general classes of constraints mentioned in the previous

chapter. This system was specifically chosen, so that

constraint control studies can be performed for different

types of constraints using the same base case.

Distillation columns with a sidestream drawoff (Figure

3.1) are utilized to accomplish a separation in one column

which would otherwise require two or more columns and which

will usually require higher utility usage. As a result, the

application of these columns can provide significant economic

incentives. Sidestream draw columns are usually used when

there is a small amount of a very light or very heavy

component in the feed or when the feed contains a mixture of

components which have a close range of boiling points, e.g.,

crude petroleum. In the latter case the desired products are

"cuts" within a specified range.

Industrial applications usually involve multicomponent

separations, although sidestream draw columns are also used

for binary separations to get products of different purity.

An example of a binary sidestream draw column would be a

12

Page 19: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

~---....--- D

R I

------- s

II

F-_._ ______ _

Ill v

B

Figure 3.1: Sidestream Draw Distillation Column

13

Page 20: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

propylene column in which the propylene is separated from

propane into a higher purity polymer grade product (overhead

product) and a lower purity chemical grade product.

While sidestream draw columns offer the economic

incentives of reduced capital and operating expenses, they

also pose a more challenging control problem than ordinary

distillation columns. Columns with a liquid or vapor

sidestream draw have an extra degree of freedom and as a

result, have an extra dimension of coupling. Therefore, these

columns are, in general, more difficult to control than

typical distillation columns.

3.1 Assumptions

In this work, a tray-to-tray binary simulator is used to

represent the sidestream draw distillation column. A number

of assumptions were made in the simulator development.

1. Dynamics of heat transfer in the reboiler and

condenser were neglected.

2. 80% murphree tray efficiencies were assumed.

3. Liquid dynamics were considered while vapor

dynamics were neglected.

4. The Francis weir formula was used to calculate

the liquid holdup on each tray.

5. Actuator valve dynamics were neglected.

6. Constant molar overflow was assumed.

7. Saturated liquid feed was used.

14

Page 21: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

8. Perfect level control for the reboiler and

accumulator was assumed.

9. Perfect pressure control at the top was assumed.

10. Five-minute measurement delays were considered for

the feed and product compositions.

11. A downcomer deadtime of ten seconds was used.

12. A three-minute control interval was used.

3.2 Differential Mass Balance Equations

Consider a single tray in the sidestream draw

distillation column as shown in Figure 3. 2. Two dynamic

material balances are written for each tray. The differential

equation describing the variation of the molar holdup on the

tray is written as follows,

( 3. 1}

and,

(3.2}

where,

Mj = molar holdup on tray j,

Lj+1 = flow rate of liquid from tray j+1,

Lj = flow rate of liquid from tray j'

and the liquid flow rate leaving the tray is a function of the

molar holdup on the tray.

The equation describing the variation of composition on

the tray is given as,

15

Page 22: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

v, y. J Lj+1' X j+1

A~

1 Tray 'j'

r ~,

vI Yj-1 Lj I x. J

Figure 3.2: Single Tray in a Sidestream Draw Distillation Column

16

Page 23: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

d (Mjxj) = L· 1x- 1 - L·X· + Vy- 1 - Vy-, dt J + J + J J J- J

(3.3)

and,

(3.4)

Combining equations (3.3) and (3.4) and substituting the value

of dMj/dt from equation (3.2),

(3.5)

where,

xj = composition of liquid leaving tray j,

xj+1 = composition of liquid leaving tray j+1,

Yj-1 = composition of vapor leaving tray j-1,

Yj = composition of vapor leaving tray j,

v = vapor flow rate.

Equations (3.1), (3.2), and ( 3. 5) constitute a set of

differential equations for the molar holdup and liquid

composition on tray j. The vapor composition leaving tray j

is determined from the equilibrium relationship and the

murphree tray efficiency,

= ajxj 1+ (aj-1) xj'

( 3. 6)

and,

(3.7)

17

Page 24: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

where,

yeqj = equilibrium composition of the vapor leaving tray j,

aj =relative volatility on tray j,

ryM = murphree tray efficiency.

3.2.1 Equations for the Accumulator

Since we assume perfect level control

accumulator,

= Q I

and,

where,

MA = molar holdup in the accumulator,

~ = distillate composition,

for the

(3.8)

(3.9)

Yr = composition of the vapor leaving the top tray,

R = reflux rate,

D = distillate rate.

3.2.2 Equations for the Reboiler

Since perfect level control is assumed for the reboiler,

(3.10)

and,

18

Page 25: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

(3.11)

where,

MR = molar holdup in the reboiler,

x8 = bottoms composition,

x 1 = composition of the liquid leaving the bottom stage,

L1 = flow rate of liquid leaving the bottom stage.

3.2.3 Equations for the Feed Tray

and,

where,

MF = molar holdup on the feed tray,

xF = composition on the feed tray,

z = feed composition,

F = feed rate.

3.2.4 Equations for the Sidestream Draw Tray

= Lc.+1 - Leo - G,

where,

MG = molar holdup on the sidestream draw tray,

and,

19

(3.12)

(3.13)

( 3. 14)

Page 26: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

( 3. 15)

where,

xG = composition of the sidestream draw,

G = sidestream draw rate.

3.3 Simulator Development

This entire set of ordinary differential equations

constitutes an initial value problem. This set of ordinary

differential equations is stiff and hence to obtain the

desired accuracy, it is integrated using a Gear type

integration package (LSODE; Hindmarsh, 1980), which takes into

account the banded nature of the Jacobian of the set of

differential equations.

A typical simulation run required about 10.33 minutes of

CPU time on a model OCTEK Hippo 486 with Intel 80486 processor

for the simulation of 600 minutes of operation.

To make the simulator more realistic, noise and drift

were added to the simulator. Drift was added to the feed

rate, feed composition, reflux rate, sidestream draw rate,

vapor rate, relative volatility, and the plate efficiency, and

noise was added to the top, bottom and sidestream

compositions.

The deadtime of the liquid in the downcomer delays the

composition disturbance on one tray being transferred to the

next tray, and that makes the simulator response more sluggish.

20

Page 27: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

sluggish. A downcomer deadtime of ten seconds was added. To

test the effect of downcomer deadtime on the simulator

performance, a step change in the manipulated variables was

given and the open-loop response of the simulator with and

without downcomer deadtime was compared. It is to be noted

that this is the comparison of the open-loop responses, and

hence it does not involve any controller effects. Figure 3.3

shows this comparison for the bottoms composition. It is

easily seen that the effective time constant was approximately

doubled with the consideration of downcomer deadtime.

3.4 Separation System Studied

A propane-butane column that produces a high purity

polymer grade overhead and bottoms products (99.5% purity),

and a low purity chemical grade sidestream draw product (90%

propane) was considered in this work. The details of the base

case considered are presented in Figure 3.4.

Based on the relative volatility and the vapor liquid

equilibrium, the minimum reflux ratio required to affect the

desired separation was determined (McCabe, Smith and Harriott,

1985). The optimum reflux ratio was then set to 1. 3 times the

minimum value. The temperatures and pressures at the top and

bottom and the feed rate were calculated, and the vapor

boilup, sidestream draw rate, and the bottoms product rate

were determined using the overall and component material

balance.

21

Page 28: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

1.6

I: Without

0 1.5 ...... .j.J Ill ~

.j.J I: 1.4 Q)

0 I: 0 u >< 1.3 .j.J ...... ~

=' p.

"' 1.2 H

'0 Q) N ...... .-I 1.1 Ill

"' ~ 0 z

0 .9 ~--------.--------.--------.-------~~------~--------.-------~

0 200 400 600

Time (min.)

Figure 3.3: Open-Loop Response for Bottoms Composition With and Without Downcomer Deadtime

22

Page 29: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

------------------------------------------------------------System

feed rate, F

reflux rate, R

boil up rate, v

bottom rate, B

distillate rate, D

draw rate, G

feed composition, z

impurity in the bottoms, x

impurity in sidestream draw, 1-w

impurity in overhead, 1-y

number of trays

feed tray location

draw tray location

murphree tray efficiency

relative volatility at the top

relative volatility at the bottom

column diameter

weir height

weir length

molar holdup in the accumulator

molar holdup in the reboiler

Figure 3.4: Base Case

23

C3"C4

86.535 gmoljsec

64.135 gmoljsec

94.135 gmoljsec

41.862 gmoljsec

30.0 gmoljsec

14.673 gmoljsec

c;, 50 mol%; c4, 50 mol%

0.5 %

10.0%

0.5 %

50

25

45

80.0%

2.48

2.67

1.22 m

0.0508 m

0.97 m

25.424 kmol

16.244 kmol

Page 30: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

The sidestream draw distillation column was then designed

based on the calculated flow rates and compositions (Treybal,

1986). After all the physical parameters of the column such

as the column diameter, feed tray and the sidestream draw tray

location, weir length and weir height, etc., were determined,

the base case was lined out. In other words, the steady state

compositions and the steady state molar holdups on each tray

were determined. This essentially formed the steady state

starting condition of the column, and hence all the simulation

runs were performed starting with this steady state condition.

3.5 Steady State Material Balance Equations

For a sidestream draw distillation column, the overall

material balance equation is written as follows,

F = B + G + D, (3.16)

where,

F = feed rate,

B = bottoms product rate,

G = sidestream draw rate.

Since constant molar overflow is assumed, we have,

V = L + D, (3.17)

where,

v = vapor rate,

L = reflux rate.

Combining equations (3.16) and (3.17) and dividing by V,

24

Page 31: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

F B G + 1 - L (3.18) v = v + v v·

Now,

L L L/D RF (3.19) = = = v L+D L/0+1 RF+1'

where RF is the reflux ratio.

Substituting equation (3.19) in (3.18)' we get the

overall material balance equation in terms of the manipulated

variables,

FV = 1 + GV + 1 VB RF+1'

(3.20)

where,

FV = feed to vapor ratio,

GV = sidestream draw to vapor ratio,

VB = vapor to bottoms ratio.

Consider the overall component balance for the column,

F z = B X + G w + D y. (3.21)

Substituting equation ( 3. 17) and converting flow rates to

ratios as done for the overall material balance case, we get,

FV. z 1 1 = VB . x + GV. w + RF + 1 . y' (3.22)

where x, w, and y are the bottom, sidestream, and top

composition. Equations (3.20) and (3.22) form the two

material balance equations for the sidestream draw columns.

It is convenient to eliminate the ratio FV from equation

(3.22), and get the component balance equations in terms of

25

Page 32: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

the product compositions and the manipulated variables.

Solving these two equations,

1 VB (z-x) y-z = GV (w-z) +

RF+1

3.6 Inferential Control

(3.23)

When developing a dynamic column simulator (Riggs, 1990),

the first factor considered is whether the separation system

is a high relative volatility system or a low relative

volatility system. If the relative volatility of the keys is

less than 1.3, it is a low relative volatility system and the

column is typically characterized by having a relatively high

reflux ratio and a large number of stages is required. When

the column involves a high relative volatility separation, the

relative volatility of the keys is greater than 1.8, it is a

faster responding system. Composition analyzer dead times

commonly found in industry (3 to 10 minutes) cause major

control problems for high relative volatility columns. As a

result, tray temperatures are used to infer product

compositions. A realistic dynamic simulator of a high

relative volatility column must include inferential

temperature control since it has a dominant effect upon the

process dynamics.

The sidestream draw distillation column considered here

is a high relative volatility system, and tray temperatures

are used to infer product compositions. A composition

26

Page 33: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

analyzer deadtime of five minutes is considered for the

column. Since the product composition changes are small, the

temperature change on those stages is also small, and hence

the use of top-tray temperature for inferring top composition

is not recommended. In inferential control, for a given

change in the product composition, that tray which shows the

largest change in tray temperature is used to infer the

product composition. The main idea here is that even for

small changes in product composition, there will be a

measurable change in temperature of that tray, and hence it

allows even minute changes in the product compositions to be

inferred using the tray temperatures.

A linear correlation is used to infer the product

compositions. It is assumed that the slope of the linear

correlation remains fairly constant over the range of

operation; however, the value of the intercept does change.

The technique used was to update the value of the intercept

using the value of the composition given by the analyzer.

In this simulation work, the temperatures on the tray are

not available as would be in a practical column, but the

actual values of the compositions are available. Hence, the

actual composition value at a particular time instant is used

to infer the value of the product composition at that instant.

Suppose the temperature on tray 't' is used to infer the

product composition. The linear correlation used is as

follows,

27

Page 34: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

(3.24)

where,

xP = product composition,

xt = actual composition, analogous to temperature, on the

tray t,

S = slope of the linear correlation,

I = intercept value of the linear correlation.

The value of the intercept is updated as follows,

Ii = f. !CALi + (1-f). Ii_1 ,

(3.25)

(3. 26)

where f is the filter constant used to update the intercept.

3.6.1 Choice of Tray

As discussed before, it is important to use that tray

which exhibits largest change in tray temperature for a given

change in the product composition. The procedure to determine

which tray is used to infer the product composition is

described below.

The sidestream draw column base case was designed for

0.5% bottoms impurity. To determine the tray temperature to

be used, setpoint changes were given to bottoms composition

and the steady state composition distribution for the column

was determined for bottoms impurity of 0.3%, 0.4%, 0.5%, 0.6%

and 0.7%. Then a graph of bottoms product composition versus

steady state composition on the tray is plotted. Each of

28

Page 35: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

these graphs had five points and a linear correlation was

fitted using these five points. The linear regression

performed gave the slope of the line and the correlation

coefficient. It is necessary to choose the tray which has the

minimum value of slope for the linear correlation. The

results of this analysis for bottoms and top product

compositions are shown in Tables 3.1 and 3.3, respectively.

It can be seen that tray 9 has the minimum value of the

slope and it is used to infer the bottoms product composition,

and similarly tray 47 has the minimum value of slope which is

used to infer the top product composition. Tables 3. 2 and 3. 4

show the percentage deviations of the compositions on each

tray, from the base case, on each tray, and the choice of

trays used is confirmed from these values, as trays 9 and 47

show the maximum percentage deviations from the base case

values.

It is important to note here that the sidestream draw

composition changes are of a greater magnitude, and it shows

measurable changes in tray temperature. Hence, the

temperature of the sidestream draw tray itself is used to

infer the sidestream draw composition.

29

Page 36: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Table 3.1: Use of Tray Temperatures to Infer Bottoms Composition

Tray Slope Correlation Standard Error Location Coefficient of Regression

1 1.00000 1.00000 O.OOOOE+OO

2 0.46841 1.00000 0.4467E-05

3 0.26927 0.99998 0.1012E-04

4 0.16319 0.99993 0.2097E-04

5 0.10423 0.99977 0.3890E-04

6 0.07088 0.99935 0.6607E-04

7 0.05217 0.99839 0.1037E-03

8 0.04231 0.99658 0.1510E-03

9 0.03833 0.99376 0.2038E-03

10 0.03893 0.99012 0.2561E-03

11 0.04402 0.98622 0.3022E-03

12 0.05455 0.982630 0.3389E-03

13 0.07262 0.97969 0.3663E-03

14 0.10194 0.97746 0.3856-03

15 0.14854 0.97586 0.3990E-03

16 0.22197 0.97472 0.4082E-03

17 0.33814 0.97389 0.4147E-03

18 0.51957 0.97324 0.4198E-03

19 0.80239 0.97263 0.4245E-03

20 1.30130 0.97173 0.4312E-03

21 2.23011 0.96580 0.4736E-03

22 3.79297 0.95661 0.5322E-03

23 4.57031 0.95691 0.5305E-03

24 5.26563 0.86937 0.9027E-03

30

Page 37: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Table 3.2: Percentage Changes in Tray Compositions for Setpoint Changes in Bottoms Composition

Tray Case 1 Case 2 Case 3 Case 4 Location

1 0.19980 0.10033 0.10044 0.20008

2 0.42846 0.21554 0.21233 0.42559

3 0.75015 0.37636 0.36777 0.73559

4 1.25052 0.62411 0.60341 1.20077

5 1.98951 0.98426 0.93624 1.84752

6 2.99510 1.46173 1.35649 2.64464

7 4.19768 2.00886 1.80066 3.45611

8 5.36880 2.50278 2.14794 4.04819

9 6.15670 2.78101 2.27332 4.20540

10 6.27493 2.74074 2.13568 3.88431

11 5.70696 2.41492 1.80467 3.23689

12 4.70222 1.93723 1.40035 2.48539

13 3.58322 1.44610 1.01957 1.79631

14 2.57788 1.02497 0.70962 1.24421

15 1.78108 0.70098 0.47884 0.83712

16 1.19708 0.46802 0.31632 0.55220

17 0.78966 0.30748 0.20582 0.35922

18 0.51413 0.19977 0.13232 0.23118

19 0.33143 0.12873 0.08409 0.14732

20 0.21175 0.08235 0.05271 0.09284

21 0.13396 0.05227 0.03242 0.05763

22 0.08362 0.03284 0.01934 0.03493

23 0.05114 0.02033 0.01093 0.02035

24 0.03023 0.01228 0.00554 0.01100

31

Page 38: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Table 3.3: Use of Tray Temperatures to Infer Top Composition

Tray Slope Correlation Standard Error Location Coefficient of Regression

51 1.00000 1.00000 O.OOOOE+OO

50 0.48387 0.99901 0.4053E-04

49 0.30137 0.99988 0.1430E-04

48 0.23810 0.99884 0.4394E-04

47 0.21622 0.99887 0.4329E-04

46 0.29348 0.99383 O.lOllE-03

32

Page 39: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Table 3.4: Percentage Changes in Tray Compositions for Setpoint Changes in Top Composition

Tray Case 1 Case 2 Case 3 Case 4 Location

51 0.09837 0.05152 0.05022 0.10014

50 0.21328 0.11035 0.10806 0.21366

49 0.32726 0.17006 0.16956 0.34256

48 0.41675 0.21849 0.22290 0.45627

47 0.44005 0.23348 0.24442 0.50880

46 0.33118 0.17883 0.19268 0.41089

33

Page 40: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 4

NONLINEAR PROCESS MODEL BASED CONTROL

Chemical engineers rely heavily upon phenomenal modeling

of physico-chemical systems for design, optimization, and

troubleshooting analysis. These models are developed using

the fundamentals of mass transfer, heat transfer, fluid flow,

kinetics and thermodynamics to mathematically describe

chemical engineering processes.

Chemical processes are usually nonstationary and

nonlinear which greatly limits the effectiveness based upon

linear control theory. Moreover, over the past ten to fifteen

years, industry has by and large made the necessary investment

of modernization of their process instrumentation and the

addition of process computers. Furthermore, many companies

have recently installed or are currently installing the

distributed control systems (DCS). The availability of these

powerful tools, and an increased emphasis upon product quality

as well as operating efficiency, is causing the industry to

reexamine the effectiveness of single-loop controllers.

4.1 Linear PMBC Methods

Linear PMBC methods are based upon linear, empirical

process models. Dynamic Matrix Control, DMC (Cutler, 1979),

Internal Model Control, IMC (Garcia and Morari, 1982), and

IDCOM (Setpoint, 1979) are examples of linear PMBC methods.

34

Page 41: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

DMC has been used in a number of industrial applications.

DMC uses a step response linear model with deadtime for each

input; output pair. DMC is a time-horizon controller that

chooses the disturbance level at each step to remove any

process/model mismatch and uses the calculated disturbance

level for the prediction horizon. The user tunes this

controller by selecting the prediction horizon, the control

horizon, and the weighting factors for the different input

moves.

IMC typically uses first-order plus deadtime models in a

state space configuration. The controller calculates the

control action necessary to return the process to the desired

setpoint in one control interval. A filter is applied to the

feedback signal in order to improve robustness. The internal

model control structure feeds back the process/model mismatch

to make adjustments to the setpoint in order to remove offset.

IDCOM uses a weighted time series model of the process

which is basically a convolution model of the process. It

assumes that the prediction horizon is equal to the control

horizon. It is similar to DMC except that it uses an impulse

response model instead of a step response model.

A major advantage of linear PMBC methods over single-loop

PID controllers is that the linear PMBC methods use a multi­

variable picture of the process, and as a result, directly

consider coupling effects. They also have the advantage of

being generic in nature. The major limitations associated

35

Page 42: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

with linear PMBC methods are that they consider only a linear

picture of the process, the empirical models used by these

methods are only locally valid, extensive plant testing is

required to statistically identify the proper linear models,

and the methods are not useful for optimization. As operating

conditions change, linear PMBC methods must be de-tuned for

the worse case in order to satisfy normal operational

reliability which can, in certain cases, seriously undermine

the overall controller performance. Also, process operating

changes can occur requiring periodic re-identification of the

model parameters.

4.2 Nonlinear PMBC Methods

Nonlinear process model based control (nonlinear PMBC)

uses a nonlinear process model directly for control purposes,

and as a result, is able to overcome many of the

aforementioned limitations of linear PMBC methods. The

control model does not have to be rigorous simulation, but

should contain the major characteristics of the process. One

type of nonlinear PMBC is generic model control (GMC),

developed by Lee and Sullivan (1988). To understand GMC,

consider an SISO system described by the following model,

~i = f(y,u,d,k), ( 4 .1)

where y is the output variable, u is the manipulated variable,

d is a vector of measured disturbances, and k is a vector of

36

Page 43: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

parameters. Assuming that y has a value of y0

, and it is

desired to move the process from y0

to Ysp in some time

interval 1, then equation (4.1) can be approximated using the

forward difference approximation of the derivative,

(4.2)

and equation (4.2) can be solved directly to determine u, the

control action, if we know~ and k. The time interval, 1, is

a tuning parameter. If 1 is small, rapid response is

required; if 1 is large, a more sluggish response is required.

Since the control model used in equation (4.2) is not exact,

use of this control law will result in steady-state offset.

To eliminate this offset, Lee and Sullivan added an integral

term (analogous to a PI controller) , resulting in the GMC

control law given by equation (4.3),

t

f(y0 ,u,d0 ,k) + k,Cy0 -Ysp) + k2[(Y-Ysp)dt = 0. (4.3)

Note that k 1 is equal to 1/1 in equation (4.2).

As discussed in the next sections, both the controller

models used for control of sidestream draw distillation column

are steady-state models. Since the implementation of GMC

requires a dynamic model, the steady-state controller model is

converted to dynamic model assuming first-order dynamics.

This assumption is justified due to the fact that the time

constant for distillation columns is quite large compared to

the control interval. For a sidestream draw distillation

37

Page 44: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

column, the resulting equations are as follows,

dx 1 - X)' dt = - (Xss fp (4.4)

dw 1 - w), dt = - (wss fp (4.5)

dy 1 - y), dt = 1 (Yss p ( 4. 6)

where X88 , W88 , Yss are solutions of the steady-state controller

model using the current values of manipulated variables and

measured disturbances. Incorporating these equations in the

GMC control law yields,

t

X88 =X+ k1,1rp(X8p-x) + k2, 1rpJ(X8p-x)dt, (4.7)

t

W88 = w + k1, 2rp(w8p-w) + k2, 2rpJ(w8p-w)dt, (4.8)

t

Yss = Y + k1,3fp(Ysp-Y) + kz,3fpJ(Ysp-y)dt. ( 4. 9)

These equations can be directly evaluated to determine X88

, W88

and Yss' which set the target impurity levels to drive the

process faster towards the setpoints. These equations can

also be viewed as a PI controller being used to select the

target impurity levels. These target impurity levels are

then used in the steady-state model to compute the values of

manipulated variables. Hence, this formulation is also

equivalent to output linearization (Kravaris and Chung, 1987;

38

Page 45: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Calvet and Arkun,1988). Note that equations (4.7) to (4.9)

apply a PI control law to choose target setpoints, and the

approximate model is used to provide the model inverse that

results in a linearization of the process response.

4.3 Controller Models

Two steady-state nonlinear models, Smoker equation model

and tray-to-tray model, were tested for the nonlinear process

model based control of the sidestream draw column.

The Smoker equation model is based on Smoker equations

(Smoker, 1938). Consider the section of the column above the

sidestream draw tray (section I, Figure 3.1). Applying the

Smoker equation with the assumption of top light component

purity approaching 1.0 yields the equation,

y 1-w ak K = log(-.-) I log-k,

1-y w (4.10)

where ak is the effective relative volatility of tray section

I, and k is given as,

k = RF + 1 RF '

(4.11)

and RF is the reflux ratio. In a similar way, consider the

section of the column between the feed and the sidestream draw

tray. Applying the Smoker equation to this section,

w 1-z an N =log(-.-) I log-, 1-w z n

( 4. 12)

39

Page 46: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

where an is the effective relative volatility of tray

section II, and n is given as,

n = ( RF - GV) -1 RF + 1

and GV is the sidestream draw rate to vapor ratio.

(4.13)

In addition, the steady-state component material balance

yields the equation,

1 ( ) ( (y - z) - • Z - X = GV. W - z) + VB RF + 1

(4.14)

and VB is the vapor to bottoms product ratio.

Thus, the two model equations combined with the steady­

state component material balance yields a system with two

model parameters (N, K) , three input variables (VB, GV, RF) and

three output variables (x, w, y).

4.3.1 Model Parameterization for Smoker Equation Model

As discussed in the previous chapter, the process

simulation and design was carried out to generate steady-state

data of compositions and molar holdups on each tray. Hence,

all the simulation runs begin with the steady-state condition.

So the model is parameterized directly using the explicit

equations for model parameters.

It was observed that the gain of the process for the top

portion (section I, Figure 3.1), given by (AyjARF), was

significantly different than that calculated using the

controller model. To overcome this difference in the process

40

Page 47: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

gain, the approach used (Riggs, 1990) was to adjust the value

of the effective relative volatility, until the controller

model yields a gain approaching that observed from the

simulator. In other words, the steady-state conditions for

the simulator at y=99.5%, 99.6%, and 99.4% were compared with

those calculated by the controller model. In this way, the

controller model was tuned to the process.

4.3.2 Control Action Calculation for Smoker Equation Model

Once the target impurity levels are set using the

nonlinear PMBC control law, the control actions are calculated

using the explicit Smoker equation model. It can be easily

seen that when the model equations are inverted to use the

parameter values and to calculate the values of manipulated

variables, the resulting equations are explicit. The major

advantage of the explicit nature of equations is that they are

computationally very efficient. This factor becomes

particularly important when we consider the constraint

control, where the model equations are evaluated at each step

of optimization.

4.3.3 Tray-to-tray Model

The main advantage of tray-to-tray model over the Smoker

equation model is it recognizes the fact that the feed

composition is different than the composition on the feed

tray. In a real column, feed composition rarely matches the

41

Page 48: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

feed tray composition, and as a result, feed flow rate changes

and/or feed composition changes cause changes to the column

that are poorly represented by other approximate models. For

example, a feed flow rate change will cause a new composition

distribution to be established in the column which directly

affects product purity, while the Smoker equation model would

predict no change in product composition.

Tray-to-tray model overcomes these limitations by

calculating steady-state compositions at each tray. It thus

results in a system of model equations, which is solved using

an appropriate numerical technique. Due to the step-by-step

construction of tray-to-tray model, it also provides much

improved decoupling. For hydrocarbon systems typically

encountered in the industry, equimolar overflow is an

acceptable assumption, and it enhances the computational

efficiency of the model.

To illustrate the detailed construction of the tray-to­

tray model, consider a single tray in the section of the

column above the sidestream draw tray. Figure 4.1 shows the

flow rates and compositions of the streams entering and

leaving the tray. Taking a component material balance on the

tray,

( 4. 15)

where V is the vapor rate and R is the reflux rate.

Accounting for the equimolar overflow, the rearrangement

of this equation yields,

42

Page 49: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

V' Yn R, xn+,

4~

1 Tray 'n'

4~

,,.

Figure 4.i: Single Tray Modeling in Tray-to-tray Model

43

Page 50: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

RF Yn-1 = Yn - ( RF+ 1 ) • (Xn+1-Xn) • ( 4. 16)

In this general equation for section of the column above the

sidestream draw tray, values of x~1 and Yn are known from the

model equation for stage (n+1). The equilibrium composition

leaving the stage n is determined using Yn and the relative

volatility as,

xeq, = Yn (4.17) a- (a-1) Yn'

and the value of xn is calculated using the equilibrium

composition xe~ and the liquid stagewise efficiency. In a

similar way the general model equation based on the component

material balance for a single stage between the sidestream

draw tray and the feed tray is given as,

- ( RF -GV) ( ) Yn-1 = Yn • Xn+1-Xn ' RF+1 (4.18)

and the general model equation for a stage below the feed tray

is,

4.3.4 Model Parameters for Tray-to-tray Model

( 4. 19)

The model has two parameters, which are the stagewise

efficiencies in the section of the column above the sidestream

draw tray and the section below the sidestream draw tray.

44

Page 51: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Consider the section of the column above the sidestream

draw tray. At each tray, the equilibrium composition of the

liquid is determined using the relative volatility and the

vapor liquid equilibrium relationship. The actual composition

of the liquid is determined from this equilibrium composition

using the liquid stagewise efficiency, defined as,

Xn = Yn + 'h (xect, - Yn) • (4.20)

Similarly, consider the section of the column below the

sidestream draw tray. At each tray, the equilibrium

composition of vapor is determined using the relative

volatility and the vapor liquid equilibrium relationship. The

actual vapor composition leaving the tray is determined using

the vapor stagewise efficiency, which is defined as,

4.3.5 Model Parameterization for Tray-to-tray Model

(4.21)

As discussed in the model parameterization for Smoker

equation model, the column is lined out to determine the

steady-state composition and molar holdup on each stage, and

hence each simulation run starts with steady-state conditions.

Consider the parameter evaluation in section of the

column above the sidestream draw tray. The procedure starts

at the top stage. A guess value for the liquid stagewise

efficiency is supplied. The steady-state top and sidestream

compositions are known. Starting at the top stage, the

45

Page 52: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

component material balance steady-state model equations are

solved for each stage sequentially until the sidestream draw

tray is reached. This sequential evaluation of model

equations finally yields a value of the sidestream draw

composition. The value of the nonlinear function is simply

the error between the value of sidestream draw composition

predicted by the model and the actual steady-state sidestream

draw composition. This error or the function value is then

used to update the guess value for the parameter, and the

procedure is repeated until convergence is obtained.

For the section of the column below the sidestream draw

tray, stagewise vapor efficiency is used as the parameter.

The procedure starts with the sidestream draw tray and model

equations are solved until one stage below the feed is

reached. The major difficulty in this procedure is that when

the model equations are evaluated, the solution procedure

propagates in the direction of the liquid flow, but the

parameter used is vapor stagewise efficiency. This results in

a quadratic equation for the liquid composition on each stage.

Then the model equations are evaluated starting from the

reboiler with the steady-state value of the bottoms

composition, up to one stage below the feed, and the

difference between the compositions at that stage is the value

of the nonlinear function. This value is used to update the

guess value for the parameter and the procedure is repeated

until convergence is obtained.

46

Page 53: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

It was observed that due to large number of stages

between the sidestream draw tray and bottom the function,

which is generated by the tray-to-tray model, becomes

extremely nonlinear and standard iterative procedures like

secant method either require a large number of iterations or

they even exhibit divergence. Hence, the use of Illinois

method (Ralston and Rabinowitz, 1979) is recommended.

4.3.6 Control Action Calculation for Tray-to-tray Model

Control action calculation proceeds in exactly similar

fashion as the parameterization except that the values of the

top, sidestream and bottom compositions are the steady-state

target values set by the nonlinear PMBC control law, and the

search is carried out for the values of the manipulated

variables using the values of parameters determined by the

parameterization procedure.

The control action calculation begins with the

determination of the reflux ratio. Consider the section of

the column above the sidestream draw tray. The procedure

starts with the top stage. A guess value for the reflux ratio

is given, and the component material balance equations are

sequentially evaluated until the sidestream draw tray is

reached. That yields a value of the sidestream composition,

and the error between the model predicted value and the

steady-state target value of sidestream draw composition is

used to update the guess value of reflux ratio. The procedure

47

Page 54: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

is repeated until convergence is obtained, and that determines

the value of the reflux ratio.

Now consider the evaluation of ratios VB and GV. A guess

value for ratio VB is given to begin with, and since the value

of RF is known, the overall component material balance for the

column yields the value of GV for that guess value of VB.

Once the values of VB and GV are known, the model equations

are solved from sidestream down to one stage below the feed,

and from reboiler up to one stage below the feed. The error

between the two compositions predicted by the model at the

stage below the feed is used to update the value of the VB

ratio, and this procedure is repeated until convergence is

obtained.

It is to be noted that the steady-state material balance

equations are incorporated in the tray-to-tray model itself,

which ensures that the material balance is satisfied for each

control action calculation.

48

Page 55: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 5

CONSTRAINT CONTROL

Many practical problems possess constraints on input,

state, and output variables. Although model based process

control has drawn considerable attention in process control

because of its good performance characteristics, none of the

techniques were originally designed with explicit constraint

handling methods. The ability to handle constraints is

essential for any control algorithm to be implemented in real

processes. The strategies for constraint handling within

model based algorithms has become one of the more popular

research topics. As a result, nonlinear PMBC must be able to

handle constraints effectively when they are encountered.

Thus, constrain control is important from both practical and

theoretical points of view.

5.1 Types of Constraints

In general, constraints can be divided into four basic

classes: a constrained manipulated variable, a constrained

state or controlled variable, third is a general constraint

that is a nonlinear function of the input and output

variables, and the last class is the rate of change constraint

on manipulated or state variables. For the sidestream draw

column, the first three classes of constraints are considered

and different constraint handling approaches incorporating

49

Page 56: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

nonliear process model based control are tested for control

purposes.

For the first type of constraint, simply a constant

limiting value of a manipulated variable is encountered, and

hence a degree of freedom is lost, and the control actions are

calculated using the remaining degrees of freedom. The first

type of constraint considered was the reboiler duty

constraint. When this constraint is hit, it directly limits

the vapor rate from the reboiler.

For the second class of constraints, which involve

constrained state variables, a manipulated variable that has

the greatest effect on the constrained state variable is

found, and a nonlinear PMBC controller that decides that

decides the limiting value of the manipulated variable to

satisfy the state variable constraint is employed, which

decides the control action. The second type of constraint

considered was the flooding constraint. Flooding in the

column is identified by a rapid increase in the pressure drop

across the column. Now the manipulated variable that has the

greatest effect on the pressure drop across the column is the

vapor rate. So at a threshold value of the pressure drop,

above which the column would be flooded, the vapor rate from

the reboiler was controlled to keep the pressure drop from

exceeding the limiting value for flooding. Hence, this type

of constraint finally transforms itself into a constrained

vapor rate case.

50

Page 57: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

The operability constraint is an example of the third

type of constraint. In a sidestream draw column, for

particular values of overhead or bottoms product compositions

there is a limited range of possible sidestream compositions,

and that represents an operability constraint on the column.

This range of possible sidestream draw compositions is

determined by setting G, the sidestream draw rate, equal to

zero and that equal to the reflux rate. Since the controller

uses ratios as the manipulated variables, this constraint puts

limitations on the GV ratio. The possible operating range for

GV then becomes a minimum of zero and a maximum of GV equal to

(RF/(RF+l)).

As discussed in Chapter 3, the column was designed so as

to keep a large operating range for the sidestream draw.

Hence, in order to encounter the minimum or maximum limits on

the value of GV, very large step changes in the feed

composition would have to be given. Furthermore, in a

practical column, it is unlikely that the sidestream draw

would be totally cut off (GV=O), as there may be downstream

operations dependent on the draw product. Also the maximum of

GV = (RF/(RF+l)) would never be allowed, as that would make

the section of the column between the feed tray and the

sidestream draw tray dry on liquid. Hence, in order to

simulate the responses of the column under the operability

constraint, a lower limit of GV=0.12 and an upper limit of

GV=0.18 was set, and constraint control was studied.

51

Page 58: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

5.2 Square Approach

In the square approach, one control objective is totally

sacrificed to meet the constraint. Consider the constrained

vapor rate case. Here, since we are hitting a constraint on

the bottom, the bottoms composition is totally sacrificed to

meet the constraint. In other words, when determining the

control actions, the bottoms composition target value is not

considered at all, and the manipulated variable values

required for the top and sidestream composition targets are

determined. As a result, the top and the sidestream

compositions remain at the setpoints, governed by the robust

nonlinear PMBC controller, and the bottoms composition simply

governed by the constraint, varies as in an open-loop response

and settles at a higher impurity level.

5.2.1 Control Action Calculation for Constrained Vapor Rate

When constrained vapor rate case is encountered, the

vapor rate remains at the limiting value, but as shown in

Chapter 3, the manipulated variables are ratios and not

absolute flow rates. Hence, constrained vapor rate sets the

value of ratio FV. Since the top and the sidestream values

are maintained at their setpoints, the determination of reflux

ratio using the section of the column above the sidestream

draw tray remains the same as in unconstrained controller.

The procedure starts with target value of the top composition,

and the component material balance equations are solved at

52

Page 59: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

each stage sequentially until the sidestream draw tray is

reached. The error between the sidestream draw tray

composition target value set by the nonlinear PMBC controller

and that obtained from the model is used to update the guess

value for reflux ratio until convergence is obtained.

In the square approach, since bottoms composition is

totally sacrificed, the section of the column below the

sidestream draw tray is used to determine values of VB and GV

ratios that will keep the sidestream composition at its

setpoint value satisfying the constraint. The procedure

starts with a guess value for VB. For that guess value of VB,

since RF is known from the section of the column above the

sidestream draw tray and FV is set by the constraint, the

value of ratio GV is determined from the overall material

balance equation.

Using these values of the manipulated variables, the

overall component balance for the column is solved to

determine the steady-state value of the bottoms composition.

The iterative procedure then starts with the target sidestream

draw composition and the component material balance equations

are solved for each tray until one stage below the feed is

reached. Then the same method is used from bottom up to one

stage below the feed, except that the starting value at the

bottom is the steady-state bottoms composition set by the

overall component balance equation. This procedure is

repeated until convergence is obtained. It is to be noted

53

Page 60: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

here that the value of bottoms composition is set by the

material balance equation, and hence it is used to satisfy the

constraint.

5.2.2 Control Action Calculation for Operability Constraint

The main difference between the constrained vapor rate

case and the operability constraint, when control action

calculation is considered, is that in operability constraint

using square approach, the sidestream composition is totally

sacrificed to meet the constraint, and hence the control

action calculation does not proceed in the two-loop fashion,

as it does in the constrained vapor rate case.

The procedure starts with the target value of top

composition, and the component material balance equations are

solved sequentially for each stage until the sidestream draw

tray is reached. This procedure yields a value of the

sidestream draw composition. Since there is no target value

of the sidestream composition, the value obtained by the

solution of the model equations is the steady-state value of

the sidestream draw composition for that guess value of RF.

The solution procedure then becomes very simple. The

only two unknowns are the VB and FV ratios, and the two

steady-state material balance equations are solved explicitly

to determine the values of these two ratios. The model

equations are then solved sequentially starting from the

sidestream draw tray until one stage below the feed is

54

Page 61: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

reached. Similarly, starting from the bottom and using the

value of VB determined from material balance, the model

equations are solved sequentially until the stage below the

feed is reached. The difference between the two compositions

is used to update the guess value of reflux ratio.

procedure is repeated until convergence is obtained.

This

It is clear that the complete control action calculation

is performed in a single loop, with a single guess value,

which is the reflux ratio. The material balance equations and

determination of steady-state sidestream draw composition are

incorporated within the same loop.

5.3 Weighted Least Squares Approach

The weighted least squares (WLS) approach is a more

general approach, and it uses the steady-state model to find

the optimum approach to the original control objectives. The

method employs determination of optimum setpoints for the

product compositions using NMEAD optimizer (Nelder and Mead,

1964). The objective function that is minimized to achieve

these new setpoints is as follows,

( 5 .1)

where t 1 , t 2 and t 3 are the weighting factors.

It is very easily seen, that by simply adjusting the

weighting factors in the objective function, the optimizer can

be made to give an order of priority to different control

55

Page 62: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

objectives. Generally, if the top product is more important,

then a higher weighting factor is assigned for the top

composition error term. It is interesting to note that if we

set t 1 equal to zero and t 2 equal to t 3 , the WLS approach will

essentially give an equivalent performance as the square

approach, and hence square approach is one specific case of

the general optimization problem.

5.3.1 Control Action Calculation for Constrained Vapor Rate

As discussed in section 5. 2. 1, the constrained vapor rate

sets the value of the ratio FV. For the square approach, the

target setpoints for the top and the sidestream compositions

are known, and the control actions are determined based on

those values. But for the WLS approach, a set of new optimum

setpoints is determined based on the minimization of the

objective function defined by equation 5.1. This results in

a two-dimensional search, the dimensions of search being the

top and sidestream setpoints. In the optimization procedure,

for each set of guess values for the top and sidestream

setpoints, the value of the objective function is determined.

This evaluation is exactly same as evaluation of manipulated

variables in square approach.

The reflux ratio is determined by starting at the top

stage and solving the model equations down to the sidestream

draw tray. At this point, a guess value for the ratio VB is

given, which sets the value of ratio GV and the value of

56

Page 63: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

bottoms composition based on steady-state material balances.

Then the model equations are solved from the sidestream draw

tray down to one stage below the feed, and from bottom up to

one stage below the feed. The error between the compositions

obtained at the stage below the feed is used to update the

guess of VB until convergence is obtained. This whole

procedure, which is exactly same as determination of one

control action for square approach, is just one evaluation of

the value of the objective function, for one set of guess

values of top and sidestream optimum setpoint values in the

constraint region. The Nelder-Mead optimizer calls the

objective function evaluation subroutine a large number of

times, and hence the control action calculation using the WLS

approach is computationally much more intensive as compared to

square approach.

Once the optimum setpoints for the top, sidestream and

bottom are determined, the control action can be calculated in

two ways. The first way is to treat the optimum setpoint

values determined by the optimizer as the target values, and

the control actions are directly evaluated for these target

values. When optimization is complete, in determining the

optimum setpoints, the model equations are evaluated, and

hence the values of manipulated variables are already

determined in the optimization routine. So when the

optimization is complete, the optimum setpoints and the values

of manipulated variables are both evaluated in the

57

Page 64: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

optimization, and these control actions can be directly

implemented.

The other approach makes use of the nonlinear PMBC

control law with the optimum setpoints. It is clear from the

previous discussion that the WLS optimizer simply determines

the optimum setpoints, i.e., optimum impurity levels for top,

bottom and sidestream in the constraint region. The way these

optimum setpoints can be approached is a totally independent

subject, and is not related to the optimization procedure.

Hence, instead of using these optimum setpoints as targets,

they are coupled with the nonlinear PMBC control law to find

the optimum target values, and manipulated variables can be

determined based on the optimum target values. The main

difference between calculation of control action in

unconstrained mode, and that using the optimum target values

is that the constraint has to be accounted for when the

control actions are calculated using the optimum target

values. In other words, one degree of freedom is lost due to

the constraint, when the control actions are determined. So

once the optimum setpoints are determined by the optimizer,

they are approached using square method. Hence, one of the

optimum targets is sacrificed to meet the constraint, and

control actions are calculated based on the remaining optimum

target values.

It is clear here that square method is used for the

optimum setpoints determined by the optimization procedure,

58

Page 65: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

and it is not used for the original process setpoints. Hence,

this approach is a combination of weighted least squares

approach and square approach.

5.3.2 Control Action Calculation for Operability Constraint

As discussed in section 5. 2. 2, the operability constraint

sets the value of the ratio GV. In the square approach, the

control actions are determined using the target values of top

and bottom compositions. The main difference in control

action calculation between square approach and WLS approach is

that the setpoint values for top and bottom composition are

known in the square approach, whereas those values are

determined using optimization procedure in WLS approach, and

hence they essentially become the dimensions of search for the

optimization.

So for each set of guess values for the optimum top and

bottom setpoints, the resulting steady-state sidestream

composition and the manipulated variables are determined.

This evaluation is exactly same as the control action

calculation for the square approach. Since the operability

constraint sets the value of GV, the determination of steady-

state sidestream draw composition and the manipulated

variables is done in a single loop.

The procedure starts with a set of guess values for the

top composition and the bottoms composition supplied by the

optimizer. To obtain the value of the objective function for

59

Page 66: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

this set of guess values, a guess value for the reflux ratio

is given, and the model equations are solved down to the

sidestream draw tray. That basically yields the steady-state

sidestream draw composition for that guess of reflux ratio.

The other manipulated variables are then evaluated using

material balance equations, and the model equations are then

solved from sidestream down to a stage below feed and from

bottom up to a stage below the feed. The difference between

compositions at that stage is used to update the guess value

of reflux ratio till convergence is obtained.

It is clear that this whole iterative procedure is

repeated for each set of guess values of top and bottom

setpoints in the constraint region supplied by the optimizer,

and hence the determination of control actions using WLS

approach is computationally much more intensive than the

square method.

As discussed in the previous section, once the optimum

setpoints in the constraint region are determined, nonlinear

PMBC control law is applied to these setpoints to determine

optimum target setpoints, and the control actions are

determined using square approach.

60

Page 67: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 6

RESULTS AND DISCUSSION

In this chapter, the performance of the nonlinear model

based controller for unconstrained and constrained cases is

discussed. Both the steady-state controller models, Smoker

equation model and tray-to-tray model, were tested for control

purposes in unconstrained and constrained modes for the

sidestream draw distillation column. Various types of

disturbances such as increase and decrease in the feed rate

and feed composition were given and the performance of the

column was tested. Similarly the first three types of

constraints were studied by giving feed rate and feed

composition disturbances and setting up maximum reboiler duty,

maximum allowable pressure drop across the column and an

operating range for the sidestream draw rate.

All the product composition responses plot the normalized

impurity concentration versus time. The normalized impurity

concentrations are defined as,

x* = x I xsp' (6.1)

w* = ( 1 - w) I ( 1 - W5p) , (6.2)

y * = ( 1 - Y) I ( 1 - Y sp) • (6.3)

section 6. 1 discusses the performance of the nonlinear process

61

Page 68: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

model based controller for unconstrained cases, for feed rate

and feed composition disturbances. Section 6.2 discusses the

controller performance for constrained cases for the reboiler

duty constraint, flooding constraint, and operability

constraint.

6.1 Unconstrained Responses

Appendix A, pages 81 to 84, show the unconstrained

responses of the product compositions and manipulated

variables for a 10% relative increase in the feed composition.

It can be seen that the sidestream draw composition is the

fastest in response and it takes about 90 minutes to return

within 2% of its normalized setpoint. This is mainly because

sidestream draw tray has a much smaller molar holdup as

compared to reboiler and there are a relatively few number of

stages between the feed and the sidestream as compared to the

top or the bottom. It is seen that the bottoms composition

shows sluggish response, and this is because there are a large

number of stages between the sidestream draw and the bottom,

and the liquid dynamics and the deadtime of the liquid in the

downcomer have a significant effect on the response.

Consider the responses of the manipulated variables. It

can be seen that the reflux ratio remains at almost the same

value. The shift in steady-state value of the ratio VB to

account for the new composition distribution across the column

is almost exclusively taken up by the ratio GV, leaving the

62

Page 69: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

reflux ratio almost unaltered. It is to be noted here that

the feed composition is dynamically compensated before it is

passed on to the controller, and that prevents the controller

from excessive prediction of the new steady-state composition

distribution across the column.

Appendix A, page 85, shows the comparison of sidestream

draw composition response using the tray-to-tray model and

Smoker equation model for this 10% relative increase in the

feed composition. It can be seen that the tray-to-tray model

gives a much better control performance. This is because of

the inherent ability of the tray-to-tray model to understand

that the composition on the feed tray is different than the

feed composition, and the tray-to-tray model provides a better

decoupling as compared to the Smoker equation model.

The tray-to-tray model takes about 90 minutes to bring

the sidestream draw composition within 2% of the normalized

setpoint as compared to the response time of 140 minutes for

the Smoker equation model.

Appendix A, pages 86 to 89, show the unconstrained

responses for the product compositions and manipulated

variables for a 20% relative increase in the feed flow rate.

It is seen that the product compositions hardly show any

deviation. Hence, the controller responds very robustly for

changes in the feed flow rate. The main reason for this type

of response is that the controller uses ratios as the

manipulated variables, and not the absolute flow rates, and

63

Page 70: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

this ratio control gives a lot of stability to the column for

changes in the feed flow rate. It can be seen that the ratio

values remain unaltered for the new steady-state of the

column, and the manipulated variable response is only the

initial peak in its value, which returns to the original value

in a very short period of time. Even though the variations in

product compositions are small, they show the usual trend as

observed in the previous case, with the bottoms composition

showing the most sluggish response.

6.2 Constrained Responses

It was shown in Chapter 5 that a variety of constraints

finally reduce to a constraint on the reboiler duty. Hence,

major emphasis was given to constrained vapor rate cases in

this work.

Appendix A, pages 90 to 93, show the responses of product

compositions and manipulated variables for constrained vapor

rate case using square approach. Since the control on the

bottoms composition is given up to meet the constraint, the

impurity in the bottoms composition increases from 0.5% to

2.5%. It is easily seen that this approach can be used if it

is absolutely essential to keep the top or sidestream

composition at setpoint, and control on bottoms composition is

not very important. This is because the top and the

sidestream compositions hardly deviate and the bottoms

composition shows an extremely high increase in the impurity

64

Page 71: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

level. It can be seen that the reflux ratio and the GV ratio

show no deviation in their value for the new steady-state of

the column and the VB ratio is decided by the material

balance. The variation of RF and GV ratios is similar to the

unconstrained response for the feed rate increase.

Consider the application of the weighted least squares

approach to constrained vapor rate cases. As discussed in

section 5. 3. 1, the weighted least squares method can be

applied in two ways. After the optimum setpoints are

determined using the WLS method, these can be directly used as

targets and control actions can be calculated accordingly, or

these setpoints can be used to find optimum targets using

nonlinear PMBC control law.

Appendix A, pages 94 and 95, show the comparison of these

two approaches for the WLS method. A 30% relative increase in

the feed rate was given to take the column in the constrained

region, and the top composition was maintained at its

setpoint, whereas the sidestream and the bottoms compositions

were made to settle at a higher impurity level.

It is clearly seen that using PMBC with the optimum

setpoints to find the optimum target values, which decide the

control actions, definitely gives a better control

performance. The top composition takes about 140 minutes to

return to its setpoint for the case of optimization combined

with PMBC, whereas it takes about 220 minutes to return to its

setpoint for the case of optimization only. Similarly for the

65

Page 72: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

sidestream draw composition, for the case of optimization

combined with PMBC, the sidestream composition took about 90

minutes to reach its new impurity setpoint, whereas for the

case of optimization only, it took about 150 minutes for the

same effect.

It is clearly seen from these results that optimization

with PMBC gives a better control performance, and hence that

approach was used for the WLS constraint control studies.

Appendix A, pages 96 to 99, show the product composition

and manipulated variable responses for constrained vapor rate

case using the Smoker equation model for the weighted least

squares method. A 30% relative increase in the feed rate was

given to take the column in the constrained region. The top

composition was maintained at its setpoint and the sidestream

and bottoms compositions move to an optimum higher impurity

level. It is seen that unlike the unconstrained responses,

the manipulated variables go to a different value for the new

steady-state of the column. All the product compositions come

within 2% of their respective normalized setpoints in about

120 minutes. These results show that the weighted least

squares approach gives a good control performance for tray-ta­l

tray as well as the Smoker equation model.

Appendix A, pages 100 to 103, show the effect of using

equal weighting factors for all the product compositions in

the weighted least squares objective function for the WLS

approach. The weighted least squares objective function is

66

Page 73: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

given by equation (5.1), Chapter 5. This is an interesting

case as the optimum steady-state impurity for the top product

actually goes down, giving a more pure top product. This is

a very unique response observed for the sidestream draw

column.

As discussed in Chapter 5, for specific values of top and

bottoms compositions, there is only a limited range of

possible sidestream draw compositions. It is to be noted here

that there are very few stages between the top and the

sidestream and there are a large number stages between the

sidestream draw and the bottoms. As a result, top composition

has a very dominant effect on the resulting sidestream

composition. It was observed in the cases discussed before

that if the top composition is maintained at its setpoint, the

bottoms composition goes to a higher impurity level as

compared to the sidestream draw product. But in that case a

high weighting factor was assigned for the top product to keep

it at its setpoint. In this case, since all the terms have

equal weighting factors, the Nelder-Mead optimizer seeks the

minimum for the overall impurity levels, for all the product

compositions.

If the top composition remains at its setpoint, the

sidestream impurity goes up, and it goes up so high, that the

deviation in the sidestream composition value does not

minimize the weighted least squares objective function.

Obviously, the top composition cannot go towards a higher

67

Page 74: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

impurity level as that would make the sidestream draw even

more impure. So the best combination of the overall impurity

levels results in a more pure top product. This case clearly

illustrates the complications involved in the control of

sidestream draw columns, and indicates how the presence of the

sidestream draw puts limitations on the possible product

purity.

Appendix A, page 104, shows the product composition

response for a case designed to test the performance of the

column with the optimization approach. Initially, a 30%

relative increase in the feed rate is given to take the column

in the constrained region, then a 40% relative increase in the

feed rate takes the column deep in the constrained region, and

a third step change in the feed rate brings the column back to

the original conditions. In this case, the column switches in

and out of the constraint.

The bottoms composition exhibits sluggish response,

whereas sidestream composition exhibits the fastest response.

It is seen that the top composition essentially remains at its

setpoint, the bottom and the sidestream impurities go up to a

higher level for the first step change, go further up with the

second step change, and they come back to their respective

setpoints with the third step change. It can be seen that the

transitions in the impurity levels are quick and the impurity

levels approach the modified setpoints in a very steady

manner.

68

Page 75: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Appendix A, pages 105 to 107, show the variations in the

manipulated variables. It can be seen that the manipulated

variables make transitions to a new value for the constrained

steady-state of the column, and these transitions occur faster

than the product compositions. Appendix A, page 108, shows

the variation of the pressure drop across the column. It is

seen that in the constrained region the pressure drop across

the column remains at its safe limiting value. With the third

step change, the pressure drop comes back to its original

unconstrained level, and the pressure drop variation is much

faster as compared to the compositions.

As discussed in Chapter 5, operability constraint puts

limits on the sidestream draw rate to vapor ratio. A lower

limit of GV = 0.12 and an upper limit of GV = 0.18 was set, as

discussed in section 5.1, and the constraint control studies

were performed. It is to be noted here that for specified

values of the top and bottom compositions, there is only a

limited range of possible sidestream draw compositions, and

that range of operation represents the operability constraint

on the column.

Appendix A, pages 109 to 112, show the product

composition and manipulated variable responses for the

operability constraint with a lower limit on GV using the

weighted least squares approach. A 25% relative decrease in

feed composition was given to study the behavior of the column

under the constraint. The top composition was maintained at

69

Page 76: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

its setpoint. It is seen that the sidestream and the bottoms

composition are deviated to an equivalent higher impurity

level. The sidestream draw composition goes within 2% of its

modified normalized setpoint in about 110 minutes, but the top

composition takes about 160 minutes return to its setpoint.

The bottoms shows a sluggish behavior and takes about four

hours to reach within 2% of its modified normalized impurity

level. It is seen that one product is maintained at its

setpoint and the remaining two products go to an equivalent

higher impurity level, and the WLS optimizer thus tries to

keep the product compositions within operational limits.

It is to be noted that a 25% relative decrease in feed

composition is a large upset for the sidestream draw column,

and the tray-to-tray model with the weighted least squares

optimizer is able to handle it very well.

The square approach was tested for a 15% relative

increase in feed composition, where the upper bound on the

operability constraint is encountered. Appendix A, pages 113

to 116, show the product composition and manipulated variables

responses for this case. The product compositions show

similar response time values, but here in the square approach,

the top and the bottom compositions are maintained at their

respective setpoints, and the sidestream composition deviates

from its setpoint value, as the operability constraint is

encountered. It is seen that the column results in a higher

purity draw product, because it is essential to draw more

70

Page 77: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

sidestream product to prevent the over-rectification of the

vapor (i.e., to increase the GV ratio), but as the constraint

is operative, more sidestream draw product cannot be drawn,

resulting in the excessive purification of the draw product.

71

Page 78: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CHAPTER 7

CONCLUSIONS AND RECOMMENDATIONS

A nonlinear process model based controller which provides

composition control for unconstrained and constrained cases

for all the product streams was developed for a binary

sidestream draw column.

Two different steady-state controller models, tray-to­

tray model and Smoker equation model, were tested for control

purposes. Tray-to-tray model yielded a better performance due

to its inherent ability to recognize that the composition on

the feed tray is different than the feed composition. Tray­

to-tray model also provided a better decoupling as compared to

the Smoker equation model.

Three different classes of constraints were studied in

this work: a constrained manipulated variable, a constrained

state or output variable, and a general constraint that is a

nonlinear function of the input and output variables.

Two different approaches were tested for handling

constraint control. In the first approach, referred to as the

square approach, one control objective is totally sacrificed

to meet the constraint, and the control actions are calculated

to achieve rest of the control objectives. In the other

approach, referred to as the weighted least squares (WLS)

approach, a weighting factor is assigned to each product

composition, and a two-dimensional optimization is performed

72

Page 79: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

using Nelder-Mead optimizer to decide the optimum setpoints

for the product compositions in the constrained region.

Once the optimum setpoints in the constrained region are

determined in the WLS approach, the control action can be

calculated either by using those setpoints as the target

values, or they can be calculated by applying the nonlinear

PMBC control law to the optimum setpo1nts to evaluate the

optimum target values.

In the latter case, the control actions for the optimum

targets have to be calculated using the square method, and

hence that represents a combination of WLS and square

approaches. It was observed that the optimization combined

with the nonlinear PMBC gave a much better performance as

compared to the use of optimization only.

Simulations were performed to test the performance of

both the controller models using the square and the weighted

least squares approaches. It was observed that the WLS

approach can be used to handle both the hard and soft

constraints simply by adjusting the weighting factors in the

objective function, but it is computationally more intensive

than the square approach.

Column performance on the test case of going into the

constrained region, going further deep and then coming back to

the unconstrained region clearly demonstrated the validity of

the constraint control approach over a large range of

operation.

73

Page 80: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

The constraint control studies performed in this work,

using both the square approach and the weighted least squares

approach, dealt with a single constraint. In real systems,

many times more than one constraints can be encountered

simultaneously, and these algorithms can be extended to

account for such multiple constraints.

In many industrial separations, e.g., petroleum refining

operations, multicomponent mixtures are separated into

products of different specifications, and there may be more

than one sidestream draw. In those cases, the available

degrees of freedom increase, and there is a greater chance of

encountering multiple constraints. An interesting extension

of this work would be to use a multicomponent sidestream draw

column simulator, modify the tray-to-tray model, and perform

constraint control studies for industrial multicomponent

separations.

The operability constraint represents the general

constraint which is a nonlinear function of the input and

output variables. In practical systems, to enhance the range

of operation, there may be more than one sidestream draw

locations. When this general constraint is operative, it is

possible to vary the location of the sidestream draw, and that

will push the system back to unconstrained region. This

approach is very useful for complicated practical systems, and

can be studied for effective handling of the operability

constraint.

74

Page 81: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

The constraint handling approaches developed in this work

are very general, and they are demonstrated on the

distillation process. These approaches can also be tested on

fast acting systems like CSTRs and that will provide more

rigorous performance proof for the use of these methods.

The last and possibly the most important development for

this project would be the experimental demonstration of this

work on a real system. A real system generally has a lot of

unknown disturbances and process characteristics, and that

causes a more challenging control problem, which would clearly

illustrate the importance of constraint control approaches

developed in this work.

75

Page 82: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

BIBLIOGRAPHY

Alatiqi, I. M., and w. L. Luyben. 1985. Alternative Distillation Configuration for Separating Ternary Mixtures with Small Concentrations of Intermediate in the Feed. Ind. Eng. Chern. Process Des. Dev. 24(2):500.

Balchen, J. G., B. Lie, and I. Solberg. 1988. Internal Decoupling in Nonlinear Process Control. Model. !dent. Control. 9:137.

Bamberger, W., and R. Isermann. Optimization of Slow Dynamic 14:223.

1978. Adaptive On-Line Processes. Automatica.

Bartusiak, R. D., C. Georgakis and M. J. Reilly. 1989. Nonlinear Feedforward/Feedback Control Structures Designed by Reference System Synthesis. Chern. Eng. Sci. 44(9):1837.

Bequette, B. W. 1989. A One-Step-Ahead Approach to Nonlinear Process Control. Proceedings of the 1989 National ISA Meeting. Philadelphia, PA.

Bequette, B. W., and P. B. Sistu. 1989. Disturbance and Parameter Estimation for Nonlinear Dynamic Systems in a Predictive Control Framework. Paper Presented at the 1989 AIChE Annual Meeting. San Francisco, CA.

Bequette, B. w. 1990. Nonlinear Control of Chemical Processes-A Review. Submitted to Ind. Eng. Chem. Res.

Biddulph, M. w. 1975. Multicomponent Distillation Simulation, Distillation of Air. AIChE J. 21(2):327.

Biddulph, M. W., and N. Ashton. 1977. Deducing Multicomponent Distillation Efficiencies from Industrial Data. Chern. Eng. J . 14 : 7 •

Biegler, L. T., and w. c. Li. 1990. Newton-Type Controllers for Constrained Nonlinear Processes with Uncertainty. Ind. Chern. Eng. Res. 29:1647.

Brown, M. w., P. L. Lee, G. R. Sullivan and W. Zhou. 1990. A Constrained Nonlinear Multivariable Control Algorithm. Trans !ChernE. 68:464.

Bruin, s., and A. D. Freije. 1974. A Simple Liquid Mixing Model in Distillation Plates with Stagnant Zones. Trans. Inst. Chern. Engrs. 52:75.

76

Page 83: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Calvet, J. P., andY. Arkun. 1987. Feedforward and Feedback Linearization of Nonlinear Systems and Its Implementation Using Internal Model Control (IMC). Ind. Eng. Chern. Res. 27:1822.

Cutler, C. R., and B. L. Ramaker. 1979. Dynamic Matrix Control-A Computer Control Algorithm. Paper presented at the AIChE National Meeting. San Francisco, CA.

Doukas, N. P., and W. L. Luyben. 1978. Control of Sidestream Columns Separating Ternary Mixtures. Instrumentation Technology. June, 43.

Doukas, N. P., and W. L. Luyben. 1981. Control of Conserving Prefractionator/Sidestream Distillation System. Ind. Eng. Chern. Process 20(1) :147.

an Energy Column

Des. Dev.

Dribika, M. M., and M. w. Biddulph. 1986. Scaling-up Distillation Efficiencies. AIChE J. 32(11):1864.

Economou, c. G., M. Morari and B. 0. Palsson. 1986. Internal Model Control. 5. Extension to Nonlinear Systems. Ind. Eng. Chern. Process Des. Dev. 25:403.

Garcia, c. E., and M. Morari. 1982. Internal Model Control. 1. A Unifying Review and some New Results. Ind. Eng. Chern. Process Des. Dev. 21:308.

Gautreaux, M. F., and H. E. O'Connell. 1955. Effect of Length of Liquid Path on Plate Efficiency. Chern. Eng. Prog. 51(5) :232.

Henson, A. M., and D. E. Seborg. 1989. Extension of Include Feedback the AIChE Annual

Nonlinear Coupling Methods to Linearization. Paper Presented at Meeting, San Francisco, CA.

Hindmarsh, A. C. 1980. LSODE and LSODI, Two New Initial Value Ordinary Differential Equation Solvers. ACM­SIGNUM Newsletter. 15:10.

Joseph, B., s. Jang and H. Mukai. 1987. On-Line Optimization of Constrained Multivariable Chemical Processes. AIChE ~ 33(1) :26.

Kister, H. z. 1990. Distillation Operation. McGraw-Hill:New York.

Kravaris, c., and c. B. Chung. Feedback Synthesis by Linearization. AIChE J. 33:582.

77

1987. Nonlinear State Global Input/Output

Page 84: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Lee, P. L., and G. R. Sullivan. 1988a. Generic Model Control. Comp. Chern. Eng. 12:573.

Lee, P. L., and G. R. Control--Theory and the IFAC Workshop Atlanta, GA.

Sullivan. 1988b. Generic Model Applications. Paper Presented at

on Model Based Process Control.

Lim, C. T., K. E. Porter and M. J. Lockette. 1974. The Effect of Liquid Channeling on Two Pass Distillation Plate Efficiency. Trans. Inst. Chern. Engrs. 52:193.

Liu, S. L. 1967. Noninteractive Process Control. Ind. Eng. Chern. Process Des. Dev. 6(4):460.

Luyben, W. L. 1966. Columns with 13(7):37.

Ten Schemes to Control Distillation Sidestream Drawoffs. ISA Journal.

Luyben, W. L. 1973. Process Modelling, Simulation and ~ for Chemical Engineers. McGraw-Hill:New York.

McCabe , W. L. , Operations York.

J. c. Smith and P. Harriott. 1985. Unit of Chemical Engineering. McGraw-Hill:New

Mukai, H., J. Singh and J. Zaborszky. 1981. A Revaluation of the Normal Operating State Control of the Power System Using Computer Control and System Theory. IEEE Trans. Power Syst. Apparatus. 309.

Nelder, J. A., and R. Mead. 1964. A Simplified Method for Function Minimization. Computers J. 7:308.

Pandit, H. G. 1991. Ph. D. Dissertation. Texas Tech University. Lubbock, TX.

Parrish, J. R., and c. B. Brosilow. 1988. Nonlinear Inferential Control. AIChE J. 34:663.

Patwardhan, A. A., J. B. Rawlings and T. F. Edgar. 1988. Nonlinear Predictive Control Using Solution and Optimization. Presented at the 1988 AIChE National Meeting. Washington, D. c.

Patwardhan, A. A., G. T. Wright and T. F. Edgar. 1990. Nonlinear Model Predictive Control of Distributed Parameter Systems. Paper Presented at the 1990 Annual AIChE Meeting. Chicago, IL.

Ralston, A., and P. Rabinowitz. 1978. A First Course in Numerical Analysis. McGraw Hill:New York.

78

Page 85: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Ramachand:an, B., J. B. Riggs and H. R. Heichelheim. 1990. Nonl1near Plant-Wide Control-Application to a Supercritical Fluid Extraction Process. Paper Presented at the 1990 Annual AIChE Meeting. Chicago, IL.

Rhinehart, R. R., and J. B. Riggs. 1990. Process Control Through Nonlinear Modeling. Control. 3:86.

Rhinehart, R .. R., and J. B. Riggs. 1991. Two Simple Methods for On-L1ne Incremental Model Parameterization. Comp. Chem. Eng. 15(3):181.

Ricker, N. L. 1985. Use of Quadratic Constrained Internal Model Control. Process Des. Dev. 24(4):925.

Programming for Ind. Eng. Chern.

Riggs, J. B. 1988. An Introduction to Numerical Methods for Chemical Engineers. Texas Tech University Press : Lubbock, TX.

Riggs, J. B. 1990a. Nonlinear Process Model Based Control of a Propylene Sidestream Draw Column. Ind. Eng. Chem. Res. 29:2221.

Riggs, J. B. 1990b. Dynamic Modeling of Distillation Columns for Process Control Analysis. Paper Presented at the 1990 annual AIChE Meeting. Chicago, IL.

Riggs, J. B., K. L. Curtner, w. K. Foslien and A. K. Mathur. 1990a. Algorithms for Steam Temperature Control. EPRI Research Project RP-2710-13. Final Report.

Riggs, J. B., J. Watts and M. Beaford. 1990b. Advanced Model Based Control for Distillation. Proc. of HPRA Computer Conf. Seattle, WA.

Seborg, D. E., and T. s. Chang. 1983. A Linear Programming Approach for Multi variable Feedback Control with Inequality Constraints. Int. J. Control. 37(3):583.

Setpoint, Inc. 1987. Advanced Control Optimization Short Course. Houston, TX.

and On-Line

Smoker, E. J. 1938. Analytic Determination of Plates in Fractionating Columns. Trans AIChE. 34:165.

Taiwo, o. 1980. Application of the Method of Inequalities to the Multivariable Control of Binary Distillation Columns. Chern. Eng. Science. 35:847.

Treybal, R. E. 1986. Mass-Transfer Operations. McGraw-Hill: New York.

79

Page 86: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Tyreus, B., and w. L. Luyben. 1978. Control of a Binary Distillation Column with Sidestream Drawoff. Ind. Eng. Chern. Process Des. Dev. 14(4):391.

Van Winkle, M. 1967. Distillation. McGraw-Hill:New York.

Williams, G. L., R. R. Rhinehart and J. B. Riggs. 1990. Inline Process Model Based Control of Wastewater pH using Dual Base Injection. Ind. Eng. Chern. Res. 29:1254.

80

Page 87: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

z 0

~ tr f­z w u z 0 u

~ u: :J !l. :::!

0 w N :J

2

1.9

1.8

1 7

1.6

1.5

1 4

1.3

1.2

1.1

~ 0.9 c:: 0 0 .8 z

0.7

0.6

APPENDIX A

PRODUCT COMPOSITION AND MANIPULATED

VARIABLE RESPONSES

PRODUCT COMPOSITION RESPONSE 10% INCREASE IN XF-TRAY TO TRAY MODEL

BOTTOM

SIDESTREAM

0.5 ~----~~----,------.------r-----,,-----,-------,-----~ 0 100 200

TIME (MIN.)

81

300 400

Page 88: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

REFLUX RATIO 10% INCREASE IN FEED COMPOSITION

82

Page 89: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

GV RATIO 1 07. INCREASE IN FEED COMPOSITION

0 .25

0 .24 -

0 .23-

0.22 -

0 .21 -

0 .2 -

0 .19 -

> 0 .18 -

0 0 17 -

0 .16 -

0 . 15 -

0 .14 -

0 .13-

0 .12 -

0 .11 -

0 . 1 I I I T I

0 100 200 300 400

TIME (MIN.)

83

Page 90: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

VB RATIO 1 0% INCREASE IN FEED COMPOSITION

.3

2 .9 -

2 .8 -

2 .7 -

2.6 -

m 2 .5 ->

2 .4 -

2 . .3 -

2 .2 -

2.1 -

2 I I I I

0 100 200 .300 400

TIME (MIN.)

84

Page 91: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

1.2

z 0 1. 1 i= <( n:: 1-z w 0 z 0 0

~ n:: :::> n. ~ 0 .9 0 w N ::::i <( ~ n:: 0 0 .8 z

0

SIDESTREAM COMPOSITION COMPARISON OF SMOKER AND TRAY TO TRAY

TRAY TO TRAY

100 200

TIME (MIN.)

85

"

300 400

Page 92: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

PRODUCT COMPOSITION RESPONSE 20% INCREASE IN FEED RATE

1.15

1. 14

1.13

1.12 z 0 1.11 i= <{ 1.1 It: 1- 1.09 z w

1.08 0 z

1.07 0 0

~ 1.06

1 05 It: ::J 1.04 Q.

~ 1.03 0 1.02 w N :J 1.01 <{ ~ It: 0 0 .99 z

0.98 SIDESTREAM

0 .97

0 .96

0 .95

0 100 200 300 400

TIME (MIN .)

86

Page 93: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

lL. a::

2.16

2 15

2.14

2. 13

2.12

2 11

0 100

REFLUX RATIO 20% INCREASE IN FEED RATE

200

TIME (MIN.)

87

300 400

Page 94: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

rn >

0 100

VB RATIO 207. INCREASE IN FEED RATE

200

TIME (MIN .)

88

300 400

\

Page 95: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

GV RATIO 20% INCREASE IN FEED RATE

0 . 159

0 .158

0 157

0 .156

> 0 155 <.:>

0 154

0 .153

0 .152

0 .151

0 100 200 300 400

TIME (MIN .)

89

Page 96: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

PRODUCT COMPOSITION RESPONSE FLOODING CONSTRAINT-SQUARE PROBLEM

NO R MALIZED IMPURITY (TOP ANO SIOESTREAM)

1.1 6

BOTIOM N

1.08 5 0 R

SIDESTREAM M

I A L I

1.06 4 z E 0

B 0

1.04 3 T T 0 M s

1.02 2 I M p u R

1 1 I T y

0 .98 0 0 100 200 300 400

TIME (MIN.)

90

Page 97: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

REFLUX RATIO 2. 18

FLOODING CONSTRAINT -SQUARE PROBLEM

2. 17

2. 16

2 .15

2. 14

L.. 2. 13 lr

2. 12

2.11

2 .1

2 .09

2 08

0 100 200 .300 400

TIME (MIN .)

91

Page 98: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

2.3

2.29 -

2 .28 -

2.27 -

2.26 -

2 .25 - r--2.24 -

2 .23 -

2 .22 -

2 .21 -m 2.2 ->

2.19 -

2 .18-

2.17 -

2 .16 -

2.15 -

2.14 -

2. 13 -

2 .12 -

2.11 -

2.1

0

v

I

VB RATIO FLOODING CONSTRAINT -SQUARE PROBLEM

I

100 200

TIME (MIN .)

92

I T

300 400

Page 99: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

GV RATIO FLOODING CONSTRAINT -SQUARE PROBLEM

0 .16

0.159

0 158

0 .157

0 .156

> 0 . 155 0

0 .154

0 .153

0.152

0 .151

0 .15

0 100 200 300 LQ0

TIME (MIN.)

93

Page 100: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

TOP COMPOSITION 1.1

OPTIMIZATION WITH AND WITHOUT PMBC

1 09

z 1 08 0 i=

1.07 ~ Lr r-z w 1.06 u ...,. ~

0 1.05 OPTIMIZATION ONLY u

~ 1.04 Lr

:::l n. ~ 1.03

0 w 1.02 N ::::i ~ ~ 1.01 Lr 0 z

0 .99

0 .98

0 100 200 300 400

TIME (MIN.)

94

Page 101: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

SIDESTREAM COMPOSITION 1 17

OPTIMIZATION WITH AND WITHOUT PMBC

1.1 6

1.15

z 1.1 4 0 f= 1 13 <{ a:: 1.12 I-z w 1. 11 0 z 1. 1 0 0

1.09 ~

1.08 a:: :J

1.07 n. ~

1.06 0 w 1.05 ~ _J

1.04 <{ ~ a:: 1.03 0 z 1.02

1.01

0 .99

0 100 200 300 400

TIME (MIN .)

95

Page 102: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

PRODUCT COMPOSITION RESPONSE FLOODING CONSTRAINT -SMOKER EO. MODEL

1.6

1.5

z 0 1.4 i= BOTIOM <{ 0:: 1-z

1.3 w u z 0 u 1.2 ~ SIDESTREAM 0:: ::J 1.1 Q.

:::!'

0 TOP w N :::i <{ :::!' 0:: 0 .9 0 z

0 .8

0 .7

0 100 200 300 400

TIME (MIN .)

96

Page 103: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

REFLUX RATIO 3.2

FLOODING CONSTRAINT -SMOKER EO. MODEL

31

3

2 .9

2.8

2 7

2 6

2.5 LL. 2.4 0::

2.3

2.2

2.1

2

1.9

1.8

1.7

1.6

0 100 200 300 400

TIME (MIN .)

97

Page 104: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

2.28

2.27 -

2.26 -

2.25 - r; m 2.24 ->

2.23-

2.22 -

2.21 -

2.2

0

v

VB RATIO FLOODING CONSTRAINT -SMOKER EO. MODEL

~

100 I

200

TIME (MIN .)

98

I

300

I

400

Page 105: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

GV RATIO FLOODING CONSTRAINT -SMOKER EO . MODEL

0 .28

0 .27

0 .26

0 .25

0 .24

0 .23

0 .22

0 .21

0 .2

> 0.19 0

0 .18

0 .17

0 .16

0.15

0 .14

0 .13

0.12

0 .1 1

0 .1

0 100 200 300 400

TIME (MIN .

99

Page 106: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

PRODUCT COMPOSITION RESPONSE OPTIMIZATION-EQUAL WEIGHTING FACTORS

1.25 -,-------------------------------,

z 0

~ 0:: 1-­z w u z 0 u

~ 0:: :::> n. ~

0 w N :J 4: ~

1.2

1.15

1.1

1.05

0 .95

0:: 0 .9 0 z

0 .85

BOTTOM

TOP

0 100 200 300 400

TIME (MIN.)

100

Page 107: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

REFLUX RATIO 3

OPTIMIZATION-EQUAL WEIGHTING FACTORS

2 .9 1-

2.8 1-

2 .7 ~ -

~ ..../ ~

2 .6 ~

2 .5 ~

u. 2 .4 1-a:

2 .3 ~

2.2 ~

1------2 . 1 ~

2 1-

1.9 ~

1.8 I

0 100 200 300 400

TIME (MIN .)

101

Page 108: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

VB RATIO 2.26

OPTIMIZATION-EQUAL WEIGHTING FACTORS

2 .259

2 .258

2 .257

2.256

2.255

2 254

2.253

2.252

2 .251 (Il 2.25 >

2 .249

2.248

2 247

2.246

2.245

2.244

2.243

2 242

2.241

2.24

0 100 200 300 400

TIME MIN .

102

Page 109: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

> 0

GV RATIO OPTIMIZATION -EQUAL WEIGHTING FACTORS

0 .26 -.-----------------------------------,

0 .25-

0 .24 -

0 .23 -

0 .22 -

0 .21 -

0 .2 -

0 19 -

0. 18 -

0 .17 -

0 .15 -

0 .14 -

0 .13 -

0.12 ~-------r-1 ------,-,------T,-------,-------,,-------,,-------,------~

0 100 200 300 400

TIME (MIN .)

103

Page 110: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

z 0 i= ~ ~ f­z w u z 0 u

2

1.9

1 .8

1.7

1 6

1.5

1.4

1.3

1.2

1.1

0 .9

0 .8

0 .7

0 .6

0.5

0

PRODUCT COMPOSITION RESPONSE FLOODING CONSTRAINT - OPTIMIZATION

SIDESTREAM

TOP

2 4 6 8 10 12 14 16 18

TIME (hrs.)

104

Page 111: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

REFLUX RATIO FLOODING CONSTRAINT - OPTIMIZATION

0 2 4 6 8 10 12 14 16 18

TIME (hrs.)

105

Page 112: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

VB RATIO FLOODING CONSTRAINT - OPTIMIZATION

2.28

2.2 7

2.26

2.25

CD 2.24 >

2.23

2.22

2.21

2.2

0 2 4 6 8 10 12 14 16 18

TIME (hrs .)

106

Page 113: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

GV RATIO 0.42

FLOODING CONSTRAINT - OPTIMIZATION

0 .4

0 .38

0 .36

0 .34

0 .32

0 .3

> 0 .28 0

0 .26

0 .24

0 .22

0 .2

0.18

0 . 16

0 .14

0 2 4 6 8 10 12 14 16 18

TIME (hrs .)

107

Page 114: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

a.. 0 0:: 0

w 0:: ::> Vl Vl w 0:: a..

20

19 -

18 -

17 -

16 -

15 -

14 -

13 -

12 -

1 1 -

10-

9 -

8 -

7 -

6 -

5 -

4 I

0

PRESSURE DROP FLOODING CONSTRAINT - OPTIMIZATION

I I I I 1 I I I I T 1 I

2 4 6 8 10 12 14 16 18

TIME (hrs .)

108

Page 115: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

2 .2

2.1

2

1.9 z 0 1.8 f=

1.7 <i 0:: 1- 1.6 z w 1.5 u z 0 1.4 u

~ 1.3

0:: 1.2 ::J 1 . 1 Cl. ::2:

0 0 .9 w N ::::i 0 .8 <i ::2: 0.7 0:: 0 0 .6 z

0 .5

0 .4

0 .3

0 .2

0

PRODUCT COMPOSITION RESPONSE OPERABILITY CONSTRAINT -OPTIMIZATION

:oo

SIDESTREAM

200

TIME (MIN .)

109

TOP

300 400

Page 116: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

REFLUX RATIO 3

OPERABILITY CONSTRAINT -OPTIMIZATION

2 .9

2.8

2.7

2.6

2.5

lJ.. 2.4 oc

2.3

2 2

2.1

2

1.9

1.8

0 100 200 300 400

TIME (MIN.)

110

Page 117: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

GV RATIO 0 .18

OPERABILITY CONSTRAINT -OPTIMIZATION

0 .17-

0.16 - w 0.15-

> 0 .14 -0

0 .13 -

0 . 12 - \

0.11 -

0 . 1 r I I I I I

0 100 200 300 400

TIME (MIN.)

111

Page 118: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

2 .5

24-

2.3 -

2 .2 -n 2 .1 -

2 -

(D 1.9 ->

1 .B-

1.7 -

1.6 -

1.5 -

1.4 -

1.3

0

I

VB RATIO OPERABILITY CONSTRAINT -OPTIMIZATION

I

100

I

200

TIME (MIN .)

112

I T

300 400

Page 119: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

2.2

2.1

2

z 1.9 0 i= <l: 1 8 n: t-z 1.7 w u

1.6 ~ ... 0 u 1.5

~ 1 4 n: ::J 0.. 1 3 ~

0 1 2 w N 1 1 :J <l: ~ n: 0 09 z

08

0 7

0 6

0

PRODUCT COMPOSITION RESPONSE OPERABILITY CONSTRAINT -SQUARE PROBLEM

BOTTOM

100 200

TIME (MIN .)

113

SIDESTREAM

300 400

Page 120: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

u. a::

REFLUX RATIO OPERABILITY CONSTRAINT -SQUARE PROBLEM

2.3 ~----------------------------------------------------------~

2 2 -

2 -

1.9 -

1.8 ~------~------.------.-------,------,,-------,-,-----,,------~ 0 100 200 300 400

TIME (MIN .)

114

Page 121: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

GV RATIO 0 .21

OPERABILITY CONSTRAINT -SQUARE PROBLEM

0 .2 -

0 .19 -

0 .18 - !

> 0 .17 -~

0.16 -

f---)

0. 15 -

0 .14 -

0 .13

0 100 200 300 400

TIME (MIN.)

115

Page 122: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

VB RATIO OPERABILITY CONSTRAINT -SQUARE PROBLEM

.3 .2

.3 . 1 ~

.3 -

2.9 -

2 .8 -

2 .7 -

rn 2 .6 ->

2 .5 -

2.4 -

2 . .3 -

2.2 -

2 .1 -

2 I I 1

0 100 200 300 400

TIME (MIN .)

116

Page 123: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

APPENDIX B

COMPUTER CODE

c C********************* c

ABSTRACT ****************************

c c c c c c c c c

THIS PROGRAM SIMULATES A BINARY DISTILLATION COLUMN WITH A SIDESTREAM DRAW. THE FEED TO THIS COLUMN IS AN EQUIMOLAR MIXTURE OF PROPANE AND BUTANE. THE DESIRED TOP PURITY IS 99.5 % PROPANE AND THE DESIRED BOTTOM PURITY IS 99.5 % BUTANE. THE SIDESTREAM DRAW SHOULD HAVE 90 % PROPANE. THE DIFFERNTIAL MASS BALANCE EQUATIONS ARE SOLVED USING LSODE INTEGRATOR.

C******************** NOMENCLATURE ************************ c C NTRAYS=NUMBER OF TRAYS EXCLUDING REBOILER AND CONDENSER C NF=LOCATION OF FEED TRAY (CONSIDERING REBOILER AS #1 TRAY) C NG=LOCATION OF SIDESTREAM DRAW TRAY C AT=RELATIVE VOLATILITY AT THE TOP C AB=RELATIVE VOLATILITY AT THE BOTTOM C ALFA(I)=RELATIVE VOLATILITY AT TRAY I C R=REFLUX RATE ( LBMOLES/SEC ) C V=VAPOR BOILUP RATE ( LBMOLES/SEC ) C G=SIDESTREAM DRAW RATE ( LBMOLES/SEC ) C FO,FN,F=FEED RATE ( LBMOLES/SEC ) C XO,XN=FEED MOLE FRACTION C DEN=RELATIVE VOLATILITY C VR,VA=VOLUME OF REBOILER,ACCUMULATOR C HWS,HWR=HEIGHT OF THE WEIR IN STRIPPING,RECTIFICATION (FT) C XLWS,XLWR=LENGTH OF WEIR ( FT ) C VB=VAPOR TO BOTTOMS RATIO ( V/B ) C GV=SIDESTREAM TO VAPOR RATIO ( G/V ) C RF=REFLUX RATIO ( R/D ) C Y(I)=COMPOSITION ON TRAY I , FOR ODD I c ---------c Y(I)=MOLAR HOLDUP ON TRAY I, FOR EVEN I c ----------C*********************************************************** c

IMPLICIT REAL*8(A-H,O-Z) EXTERNAL FX,JAC DIMENSION RWORK(7000),IWORK(500),ATOL(400),DY(400),

$ VX(200) DIMENSION XM(200),X(200),Y(400),DYDX(400),TAU(2) DIMENSION Y1(400),YFLT(3),YINF(400),YOUT(400) DIMENSION CMIN(3),CMOUT(3),CIN(3),CSET(3),

$ COLD1(3) ,COLD2(3) DIMENSION TIME(250),BOT(250),SS(250),TOP(250)

117

Page 124: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c c

COMMON /ON9/ALFA(200),NT,NF,NG COMMON /DIM/DEN,HWS,HWR,XLWS,XLWR,DTS,DTR COMMON /ON8/R,V,F,XF COMMON /TW9/ XLL(200),XB,YD,VR,VA,YC1(200) COMMON /TW8/G,DY COMMON /CONR/VB,GV,RF COMMON /CON2/XSS,WSS,YSS COMMON /CON6/FV COMMON /CON7/VMAX COMMON /RAN/SEED COMMON /PLT/EF COMMON /DEAD/DOWN1(200),DOWN2(200),DEAD(200),XFOUT,XFMOD COMMON /TIME/TIN,TOUT,TDOWN COMMON /CTRL/KCTRL,CK11,CK12,CK21,CK22,CK31,CK32 COMMON /TW7/ALFA1,ALFA2,ALFA3 COMMON /PAR/P1,P2,P3 COMMON /PAR1/ETA1,ETA2 COMMON /PAR2/YTOP,YSIDE,XBOT COMMON /CNT/ICTRL,IREBL COMMON /OPT/SI1,SI2,SI3 COMMON /PR1/KPRES,DPSET,DPOUT COMMON /FEED/FNEW

OPEN(UNIT=9,FILE='DATA.DAT',STATUS='OLD') OPEN(UNIT=2,FILE='TUNE.DAT',STATUS='NEW')

c C SET THE DESIRED BOTTOM AND TOP CONPOSITION c

c

XB=0.005 YD=0.995 YG=0.9

C SET NUMBER OF TRAYS c

c

NTRAYS=49 NT=NTRAYS+2

C SET LOCATION OF FEED AND SIDESTREAM DRAW TRAY C NOTE THAT REBOILER IS #1 TRAY c

c

NF=25 NG=45

C SET RELATIVE VOLATILITY AT THE TOP AND BOTTOM c

c

AT=2.48 AB=2.67

C SET THE FLOW RATES ( LBMOLES/SEC ), SP. GRAVITY, AND THE C REBOILER AND ACCUMULATOR VOLUME

118

Page 125: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

R=(64.1355/454.) V=(94.1355/454.) G=(14.6737/454.) F=(86.5350/454.) XF = 0.5 DEN=0.468 VR=120. VA=VR

C SET THE WEIR HEIGHT, THE WEIR LENGTH, AND TOWER DIAMETER C S = STRIPPING SECTION C R = RECTIFYING SECTION c

c

HWS=l./6. HWR=HWS XLWS=3.2 XLWR=3.2 DTS=4.0 DTR=4.0 T=O.O

C SET THE COUNT FOR # OF CONTROL ACTIONS c

c

ICTRL=O IREBL=O

C READ THE DATA FOR V/B, G/V ETC. RATIOS AND COMPOSITIONS AND C HOLD UPS ON EACH TRAY c

c

READ(9,*)NTSPS,VB,GV,RF READ(9,*) (Y(I),I=1,2*NT)

C SET THE TIME INTERVAL c

c

TMAX0=60. NE=NT+NT SEED=0.31

C SET THE DOWNCOMER DEAD TIME IN SECONDS c

TDOWN=10.0 c C INITIATE THE DEAD TIME ARRAYS FOR COMPOSITION ANALYZERS c

IDEAD=O DO 191 I=1,2*NT-1,2 YOUT(I)=Y(I)

191 DEAD(I)=Y(I) XFOLD=XF XFOUT=XF XFMOD=XF

119

Page 126: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

FSTART=F FNEW=F

C ASSUMING LINEAR VARIATION , CALCULATE RELATIVE VOLATILITY C ON EACH TRAY c

DA=(AT-AB)/FLOAT(NT-1) DO 77 I=1,NT

77 ALFA(I)=AB+DA*FLOAT(I-1) c C PARAMETERIZE THE CONTROLLER MODEL c

105

c

YTOP=Y ( 2 *NT-1) YSIDE=Y(2*NG-1) XBOT=Y(1) CALL PARMTR(ETA1,ETA2) WRITE(5,105) FORMAT(/) WRITE(S,*) 1 PARAMETER VALUES WRITE(5,105) WRITE(S,*) I ETA1 = ',ETA1 WRITE(S,*) I ETA2 = ',ETA2

C SET PARAMETERS FOR THE CONTROLLER c

c

KPRES=O DPSET=16.0 DPOUT=15.0 KCTRL=O CSET(1)=0.005 CSET(2)=0.9 CSET(3)=0.995 CMIN(1)=VB CMIN(2)=GV CMIN(3)=RF TDEAD=5.0*60.0

. .

C WRITE(S,*) 'GIVE KC11,KC12,KC21,KC22,KC31,KC32 1

READ(9,*)CK11,CK12,CK21,CK22,CK31,CK32 C WRITE(S,*) 'GIVE TIME IN MIN. OF INTEGRATION '

READ(9,*)NTSPS C WRITE(S,*) 'GIVE COEFF.FOR OBJECTIVE FUNCTION (SI1,SI2,

$ SI3 ) ' READ(9,*)SI1,SI2,SI3

C WRITE(S,*) 'GIVE VALUE OF VMAX 1

READ(9,*)VMAX c C SET PARAMETERS FOR USING LSODE c

TOUT=O.O ITOL=1 RTOL=O.O

120

Page 127: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

DO 2299 I=1,NT ATOL(2*I-1)=1.D-5

2299 ATOL(2*I)=1.D-2 ITASK=1 ISTATE=1 IOPT=O MF=25 MU=2 ML=2 NEQ=NE LRW=22+10*NEQ+NEQ*(2*ML+MU) LIW=20+NEQ IWORK(1)=ML IWORK(2)=MU TOUT=O.O ICTR=O IWORK(11)=0.0 IWORK(12)=0.0 IWORK(13)=0.0

C NTSPS=240 WRITE(5,1100)

1100 FORMAT(/7X,' TIME',11X,'BOTTOM 1 ,8X,'SIDESTREAM',9X, $ 'TOP',6X/)

c WRITE(2,1101)TOUT,Y(1),Y(2*NG-1),Y(2*NT-1),VB,GV,RF

c KREAD=1

c C START THE ITERATIONS c

DO 1000 II=10,NTSPS*60,10 TIN=FLOAT(II-10) TOUT= FLOAT (II)

c

c

IF(TIN.LT.15.*60.)GO TO 1345 IF(TIN.EQ.360.*60.)GO TO 1344 IF(TIN.EQ.720.*60.)GO TO 1343 IF(KREAD.NE.1)GO TO 1345 WRITE(5,105) WRITE(5,*) 'STEP CHANGES ARE GIVEN AT THIS POINT ' WRITE(5,105) PAUSE READ(9,*)PCTXF XF=XF*(1.+(PCTXF/100.)) READ(9,*)PCTF F=F*(1.+(PCTF/100.0)) READ(9,*)CSET(1),CSET(2),CSET(3) KREAD=5555555 GO TO 1345

1344 WRITE(5,*) 'SECOND STEP CHANGE GIVEN AT THIS POINT 1

READ(9,*)PCTF2

121

Page 128: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c c c c

FOLD=F/(1.+(PCTF/100.0)) F=FOLD*(1.+(PCTF2/100.0)) GO TO 1345

1343 WRITE(5,*) 'BACK TO ORIGINAL CONDITIONS !! 1

F=F/(1.+(PCTF2/100.0)) GO TO 1345

SAVE THE COMPOSITIONS TO ACCOUNT FOR THE DOWNCOMER DEADTIME

1345

131 c

DO 131 I=1,2*NT-1,2 DOWN2(I)=DOWN1(I) DOWN1(I)=Y(I)

C ACCOUNT FOR THE DEAD TIME c

IF(IDEAD.LT.30)GO TO 447 IDEAD=O XFOUT=XFOLD XFOLD=XF DO 147 I=1,2*NT-1,2 YOUT(I)=DEAD(I)

147 DEAD(I)=Y(I) c

447 IDEAD=IDEAD+1 c C INFER COMPOSITIONS FROM TEMPERATURE c

c

c

c

c c c

IF(TOUT.LT.5.0*60.0)GO TO 132 CALL INFER(Y,YOUT,YINF)

FNEW=0.3*FNEW+0.7*F IF(FNEW.GT.1.05*FSTART)GO TO 129 KPRES=O GO TO 132

129 IF(KPRES.NE.O)GO TO 130 IF(DELP.LT.DPSET)GO TO 132

130 CALL PRCTRL(DELP,DPOLD)

132 IF(KCTRL.EQ.O)GO TO 1889 IF(KCTRL.EQ.1)GO TO 1886 IF(KCTRL.EQ.2)GO TO 1887 IF(KCTRL.EQ.3)GO TO 1888

1886 COLD1(1)=YINF(1) COLD1(2)=YINF(2*NG-1) COLD1(3)=YINF(2*NT-1) GO TO 1889

122

Page 129: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c c

c

1887 COLD2(1)=YINF(1) COLD2(2)=YINF(2*NG-1) COLD2(3)=YINF(2*NT-1) GO TO 1889

1888 CIN(1)=YINF(1) CIN(2)=YINF(2*NG-1) CIN(J)=YINF(2*NT-1)

C UPDATE THE PARAMETER VALUES c

c

AFP1=0.008 AFP2=0.01 YTOP=YINF(2*NT-1) YSIDE=YINF(2*NG-1) XBOT=YINF(1) OLD1=ETA1 OLD2=ETA2 CALL PARMTR(ETA1,ETA2) ETA1=AFP1*ETA1+(1.-AFP1)*0LD1 ETA2=AFP2*ETA2+(1.-AFP2)*0LD2

C TAKE THE CONTROL ACTION c

CALL CONTRL(CMIN,CMOUT,CIN,CSET,COLD1,COLD2,V,R,G) c C SAVE OUTLET COMPOSITIONS FOR FILTER ACTION c

c

c

1889 YFLT(l)=Y(1) YFLT(2)=Y(2*NG-1) YFLT(J)=Y(2*NT-1)

CALL LSODE(FX,NEQ,Y,TIN,TOUT,ITOL,RTOL,ATOL,ITASK, $ ISTATE,IOPT,RWORK,LRW,IWORK,LIW,JAC,MF)

C CALCULATE THE PRESSURE DROP ACROSS THE COLUMN c

DPOLD=DELP CALL PRDROP(DELP,Y)

c C ACCOUNT FOR THE DRIFT AND NOISE c

CALL SDRIFT(7,XF,F,V,R,AT,AB,EF) CALL SNOISE(J,Y(1),Y(2*NG-1),Y(2*NT-1))

c C FILTER THE NOISE ON OUTPUT COMPOSITIONS c

AF=0.7 Y(1)=AF*Y(1)+(1.-AF)*YFLT(1) Y(2*NG-1)=AF*Y(2*NG-1)+(1.-AF)*YFLT(2)

123

Page 130: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c Y(2*NT-1)=AF*Y(2*NT-1)+(1.-AF)*YFLT(3)

C WRITE THE RESULTS c

c

c

IF(TOUT.LE.TDEAD)GO TO 113 KCTRL=KCTRL+1

113 TIM=TOUT/60. IF(((TIM/3.0)-INT(TIM/3.0)).NE.O.O)GO TO 1000

114 WRITE(2,1101)TIM,Y(1),Y(2*NG-1),Y(2*NT-1),VB,GV,RF WRITE(5,1101)TIM,Y(1),Y(2*NG-1),Y(2*NT-1)

1101 FORMAT(12(F14.7,2X))

1000 CONTINUE c C WRITE # OF OPTIMIZATIONS PERFORMED c

c

c

c

WRITE(5,*)' #OF CONTROL ACTIONS =',ICTRL WRITE(S,*)' #OF OPTIMIZATIONS =',IREBL

CLOSE (2)

156 STOP END

C******************** c

ABSTRACT **************************

c c c c c

THIS SUBROUTINE CONTAINS THE BASIC DIFFERNTIAL MASS BALANCE EQUATIONS FOR THE DISTILLATION COLUMN. THESE EQUATIONS ARE INTEGRATED USING THE GEAR TYPE INTEGRATION PACKAGE ( LSODE ).

C******************* c

NOMENCLATURE **********************

c c c c c c c c

X(I)=LIQUID COMPOSITION ON TRAY I XM(I)=LIQUID MOLAR HOLDUP ON TRAY I XL(I)=FLOW RATE OF THE LIQUID LEAVING TRAY I EF=MURPHREE PLATE EFFICIENCY

YX(I)=EQUILIBRIUM COMPOSITION OF VAPOR WITH 100% PLATE EFF. YC(I)=EQUILIBRIUM COMPOSITION OF VAPOR WITH A GIVEN PLATE

EFFICIENCY ' EF '

C********************************************************** c

SUBROUTINE FX(NE,T,Y,DYDX) IMPLICIT REAL*8(A-H,O-Z) DIMENSION Y(400),DYDX(400),XL(200),XM(200),

$ X(200) ,YC(200) DIMENSION DY(400),YX(200),XOLD(200),SLOPE(200),C(200) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /DIM/DEN,HWS,HWR,XLWS,XLWR,DTS,DTR COMMON /ON8/R,V,F,XF

124

Page 131: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

COMMON /TW9/ XLL(200),XB,YD,VR,VA,YC1(200) COMMON /DEAD/DOWN1(200),DOWN2(200),DEAD(200),XFOUT,XFMOD COMMON /TIME/TIMEIN,TIMEOUT,TDOWN COMMON /TW8/G,DY COMMON /CONR/VBC,GVC,RFC COMMON /PLT/EF COMMON /CON7/VMAX COMMON /PR1/KPRES,DPSET,DPOUT J=1 DO 88 I=1,NT X(I)=Y(J)

88 J=J+2 J=2 DO 87 I=1,NT XM(I)=Y(J)

87 J=J+2

C CALCULATE LIQUID HOLDUP ON EACH PLATE c

c

c

c

c

c c

CALL LHDUP(XM,XL)

IF(KPRES.NE.O)GO TO 33

V=XL(1)/(1.+1./VBC)

IF(V.LE.VMAX)GO TO 33 V=VMAX

33 R=V*RFC/(RFC+1.) G=GVC*V XL(NT-1)=R EF=0.80

C CALCULATE EQUILIBRIUM COMPOSITION OF VAPOR c

c

DO 2 I=1,NT YX(I)=ALFA(I)*X(I)/(1.+(ALFA(I)-1.)*X(I))

2 IF(YX(I).GT.1.)YX(I)=1. YC(1)=YX(1) YC(NT)=YX(NT) NTM=NT-1

C ACCONT FOR THE PLATE EFFICIENCY c

c

DO 9 I=2,NTM 9 YC(I)=YC(I-1)+EF*(YX(I)-YC(I-1))

BTM=XL(1)-V IF(BTM.LT.O.O)BTM=O.O

C DIFFERNTIAL MASS BALANCE EQUATIONS FOR COMPOSITION : c ------------------------------------------------------

125

Page 132: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c C TAKE INTO ACCOUNT THE DOWNCOMER DEAD TIME c

c

IF(TIMEIN.GT.5.0*60.0)GO TO 38 DO 37 I=1,NT

37 XOLD(I)=X(I) GO TO 39

38 DO 454 I=1,NT SLOPE(I)=(DOWN1(2*I-1)-DOWN2(2*I-1))/10.0 C(I)=DOWN1(2*I-1)-SLOPE(I)*TIMEIN

454 XOLD(I)=C(I)+SLOPE(I)*(T-TDOWN) C WRITE(5,55)TIMEIN,T,TIMEOUT C WRITE(5,56)DOWN2(2*NG-1),XOLD(NG),DOWN1(2*NG-1)

c

c

55 FORMAT(/' IN FX :',SX, 'TIN=',F7.2,5X,'T=',F7.2,5X, $ I TOUT= I I F1 • 2 )

56 FORMAT(' OLD2=',F8.7,3X,'ESTIMATE=',F8.7,3X, $ I OLD1=',F8.7)

39 DYDX(1)=(XOLD(2)*XL(1)-YC(1)*V-BTM*X(1))/XM(1) DYDX(2*NT-3)=(XL(NT-1)*(X(NT)-X(NT-1))+

$ V*(YC(NT-2)-YC(NT-1)))/XM(NT-1) NTM=NT-1 J=3 DO 3 I=2,NTM-1 DYDX(J)=(XL(I)*(XOLD(I+1)-X(I))+V*(YC(I-1)-YC(I)))/XM(I)

3 J=J+2

C EQUATION FOR FEED TRAY c

c

DYDX(2*NF-1)=DYDX(2*NF-1)+(-X(NF)+XF)*F/XM(NF) D=V-R IF(D.LT.O.O)D=O.O

C EQUATION FOR ACCUMULATOR c

c

DYDX(2*NT-1)=(V*YC(NT-1)-R*X(NT)-D*X(NT))/XM(NT) DO 666 I=1,NT

666 YC1(I) = YC(I)

C EQUATIONS FOR MOLAR HOLDUP ON EACH TRAY c

J=4 NTM=NT-1 DO 89 I=2,NTM DYDX(J)=XL(I)-XL(I-1)

89 J=J+2 DYDX(2*NF)=DYDX(2*NF)+F DYDX(2*NG)=DYDX(2*NG)-G DYDX(2)=0.0 DYDX(NT+NT)=O.O DO 359 I=1,2*NT

126

Page 133: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c

c c c

c

359 DY(I)=DYDX(I) DO 369 I=1,NT

369 XLL(I)=XL(I) RETURN END

SUBROUTINE JAC(NE,T,Y,ML,MU,PD,NRPD) IMPLICIT REAL*8(A-H,O-Z) DIMENSION Y(400),YP(400),DYDX(400),DYDXB(400),PD(NRPD,1) CALL FJAC(NE,T,Y,DYDXB) DO 100 J=1,NE Y(J)=Y(J)*1.01 CALL FJAC(NE,T,Y,DYDX) Y(J)=Y(J)/1.01 DO 100 I=1,NE IF(ABS(I-J).GT.2)GO TO 100 PD(I-J+MU+1,J)=(DYDX(I)-DYDXB(I))/Y(J)j.01

100 CONTINUE RETURN END

SUBROUTINE FJAC(NE,T,Y,DYDX) IMPLICIT REAL*8(A-H,O-Z) DIMENSION Y(400),DYDX(400),XL(200),XM(200),

$ X(200),YC(200) DIMENSION DY(400),YX(200),XOLD(200) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /DIM/DEN,HWS,HWR,XLWS,XLWR,DTS,DTR COMMON /ON8/R,V,F,XF COMMON /TW9/ XLL(200),XB,YD,VR,VA,YC1(200) COMMON /TW8/G,DY COMMON /CONR/VBC,GVC,RFC COMMON /PLT/EF COMMON /CON7/VMAX COMMON /PR1/KPRES,DPSET,DPOUT J=1 DO 88 I=1,NT X(I)=Y(J)

88 J=J+2 J=2 DO 87 I=1,NT XM(I)=Y(J)

87 J=J+2

C CALCULATE LIQUID HOLDUP ON EACH PLATE c

c CALL LHDUP(XM,XL)

IF(KPRES.NE.O)GO TO 33

127

Page 134: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c

c

V=XL(1)/(1.+1./VBC)

IF(V.LE.VMAX)GO TO 33 V=VMAX

33 R=V*RFC/(RFC+l.) G=GVC*V XL(NT-1)=R EF=0.80

C CALCULATE EQUILIBRIUM COMPOSITION OF VAPOR c

c

DO 2 I=1,NT YX(I)=ALFA(I)*X(I)/(1.+(ALFA(I)-1.)*X(I))

2 IF(YX(I).GT.1.)YX(I)=1. YC ( 1) =YX ( 1) YC(NT)=YX(NT) NTM=NT-1

C ACCONT FOR THE PLATE EFFICIENCY c

c

DO 9 I=2,NTM 9 YC(I)=YC(I-1)+EF*(YX(I)-YC(I-1))

BTM=XL(1)-V IF(BTM.LT.O.O)BTM=O.O

C DIFFERNTIAL MASS BALANCE EQUATIONS FOR COMPOSITION c

c

DYDX(1)=(X(2)*XL(1)-YC(1)*V-BTM*X(l))/XM(1) NTM=NT-1 J=3 DO 3 I=2,NTM DYDX(J)=(XL(I)*(X(I+1)-X(I))+V*(YC(I-1)-YC(I)))/XM(I)

3 J=J+2

C EQUATION FOR FEED TRAY c

c

DYDX(2*NF-1)=DYDX(2*NF-1)+(-X(NF)+XF)*F/XM(NF) D=V-R IF(D.LT.O.O)D=O.O

C EQUATION FOR ACCUMULATOR c

c

DYDX(2*NT-1)=(V*YC(NT-1)-R*X(NT)-D*X(NT))/XM(NT) DO 666 I=l,NT

666 YC1(I) = YC(I)

C EQUATIONS FOR MOLAR HOLDUP ON EACH TRAY c

J=4 NTM=NT-1

128

Page 135: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c

DO 89 I=2,NTM DYDX(J)=XL(I)-XL(I-1)

89 J=J+2 DYDX(2*NF)=DYDX(2*NF)+F DYDX(2*NG)=DYDX(2*NG)-G DYDX(2)=0.0 DYDX(NT+NT}=O.O DO 359 I=1,2*NT

359 DY(I}=DYDX(I) DO 369 I=1,NT

369 XLL(I}=XL(I} RETURN END

C*********************** ABSTRACT ************************* c C THIS SUBROUTINE CALCULATES THE MOLAR LIQUID HOLDUP ON C EACH TRAY USING THE FRANCIS WEIR FORMULA. c C************************************************************* c

c

SUBROUTINE LHDUP(XM,XL} IMPLICIT REAL*8(A-H,O-Z) DIMENSION XL(200},XM(200},H(200},DY(400) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /DIM/DEN,HWS,HWR,XLWS,XLWR,DTS,DTR COMMON /ON8/R,V,F,XF COMMON /TW9/ XLL(200},XB,YD,VR,VA,YC1(200) COMMON /TW8/G,DY NTRAY=NT-2 DO 1 I=1,NTRAY DTC=DTS HW=HWS XLW=XLWS IF((I+1).GT.NF)HW=HWR IF((I+1).GT.NF}DTC=DTR IF((I+1).GT.NF)XLW=XLWR

C FRANCIS WEIR FORMULA c

c

CONST=4.*XM(I+1)/(DEN*DTC*DTC*3.14)-HW 1 XL(I)=3.33*DEN*XLW*CONST**1.5

RETURN END

SUBROUTINE SDRIFT(I,V1,V2,V3,V4,V5,V6,V7) IMPLICIT REAL*8(A-H,O-Z} DIMENSION V(100),RND(100),DRIFT(100),DN(100) COMMON /RAN/SEED V(1)=V1 V(2)=V2

129

Page 136: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

V(3)=V3 V(4)=V4 V(5)=V5 V(6)=V6 V(7)=V7 S=SEED NN=I A=0.99 8=0.005 SD=0.005 CALL RANDOM(NN,RND) DO 10 J=1,I

10 DRIFT(J)=A*DRIFT(J)+(1.-A)*(0.5-RND(J)) DRIFT(2)=DRIFT(2)/200. DRIFT(3)=DRIFT(3)/75. DRIFT(1)=DRIFT(1)/150. DRIFT(7)=DRIFT(7)/50. DRIFT(4)=DRIFT(4)/100. DO 11 I=1,I

11 V(J)=V(J)+B*DRIFT(J) DO 20 J=2,4

20 DN(J)=1.9607*(RND(J)-0.5)/((RND(J)+0.002432)*(1.002432-$ RND(J)))**0.203

DN(2)=DN(2)/25. ON ( 3 ) =ON ( 3 ) / 15 0 . DN(4)=DN(4)/150. DO 21 J=1,I

21 V(J)=V(J)+SD*DN(J) V1=V(1) V2=V(2) V3=V(3) V4=V(4) V5=V(5) V6=V(6) V7=V(7) RETURN END

SUBROUTINE SNOISE(I,W1,W2,W3) IMPLICIT REAL*S(A-H,O-Z) DIMENSION W(100),RND(100) ,DNOS(100) COMMON /RAN/SEED W(1)=W1 W(2)=W2 W(3) =W3 SE=SEED MM=I A=0.99 8=0.02 SD=0.001 CALL RANDOM(MM,RND) DO 20 J=1,I

130

Page 137: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

DNOS(J)=1.9607*(RND(J)-0.5)/((RND(J)+0.002432)*(1.002432-$ RND(J)))**0.203

c

c

c

20 W(J)=W(J)+SD*DNOS(J) DNOS(1)=DNOS(1)/100.0 DNOS(J)=DNOS(J)/125.0 DNOS(2)=DNOS(2)/2.5 IF(W(J).GT.0.999)W(3)=0.999 W1=ABS (W ( 1)) W2=W(2) WJ=W(J) RETURN END

SUBROUTINE RANDOM(I,X) IMPLICIT REAL*S(A-H,O-Z) DIMENSION X(100) ,Y(100) COMMON /RAN/SEED A=7. B=67. P=2. C=(10**(-P))*(200.*A+B) COEFF=(10**P)*C DO 20 J=1,I Y(J)=COEFF*X(J-1) Y(1)=COEFF*SEED

20 X(J)=Y(J)-INT(Y(J)) SEED=ABS(X(I)) RETURN END

SUBROUTINE PRDROP(DELP,Y) IMPLICIT REAL*S(A-H,O-Z) COMMON /ON8/R,V,F,XF COMMON /ON9/ALFA(200),NT,NF,NG DIMENSION Y(400),YMASS(400),YVOL(400),YHT(400)

C DEFINE THE CONSTANTS c

c

WTMOL=51. 0 CSAREA=1.167454 RHOG=26.6 RHOL=468.0 GRAV=9.8 CSTRAY=1.05071 C1=-1.7276E-5 C2=37.0

C CALCULATE THE PRESSURE DROP c

HRHOG=O.O c

131

Page 138: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

1 c

c

DO 1 I=4,2*NT-2,2 YMASS(I)=Y(I)*WTMOL*0.454 YVOL(I)=YMASS(I)/RHOL YHT(I)=YVOL(I)/CSTRAY HRHOG=HRHOG+YHT(I)*RHOL*GRAV

VOL=V*WTMOL*0.454/RHOG VEL=VOL/CSAREA DELP=C1*HRHOG+C2*(VEL**2)

C CONVERT PRESSURE DROP TO PSI UNITS c

c

c

c

DELP=DELP*14.504

RETURN END

SUBROUTINE INFER(Y,YOUT,YINF) IMPLICIT REAL*S(A-H,O-Z) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /INF/FBOT,FSS,FTOP COMMON /CNT/ICTRL,IREBL DIMENSION Y(400),YOUT(400),YINF(400)

C SET THE FILTER CONSTANTS c

c

FBOT=O.S FSS=0.7 FTOP=0.7

C SET THE SLOPES c

c

SB=0.03823586 SS=1.0 ST=0.21622

C SET INITIAL INTERCEPTS c

c

BOTI=-0.0041049 SIDEI=O.O TOPI=0.7885197

C SET INFERENCE LOCATION c

c

NBOT=9 NSIDE=45 NTOP=47

C UPDATE THE INTERCEPT AND INFER THE COMPOSITION c

BCALI=YOUT(1)-SB*YOUT(2*NBOT-1) BOTI=FBOT*BCALI+(1.0-FBOT)*BOTI

132

Page 139: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c

c

c

c

c

c

c

c

c

c

YINF(1)=SB*Y(2*NBOT-1)+BOTI

SCALI=YOUT(2*NG-1)-SS*YOUT(2*NSIDE-1) SIDEI=FSS*SCALI+(1.0-FSS)*SIDEI YINF(2*NG-1)=SS*Y(2*NSIDE-1)+SIDEI

TCALI=YOUT(2*NT-1)-ST*YOUT(2*NTOP-1) TOPI=FTOP*TCALI+(1.0-FTOP)*TOPI YINF(2*NT-1)=ST*Y(2*NTOP-1)+TOPI

RETURN END

SUBROUTINE PRCTRL(DELP,DPOLD) IMPLICIT REAL*8(A-H,O-Z) COMMON /ON8/R,V,F,XF COMMON /TW8/G,DY COMMON /PR1/KPRES,DPSET,DPOUT COMMON /CONR/VB,GV,RF

KPRES=5555 TCTRL=1.0/6.0 PK1=0.1 PK2=0.005

ERR=1.0-(DELP/DPSET) EOLD=1.0-(DPOLD/DPSET)

IF(DELP.LE.DPOUT)GO TO 1 GO TO 2

IF(VOLD.LE.O.O)VOLD=V V=V+(PK1*ERR)+(PK2*TCTRL*((ERR+EOLD)/2.0)) V=0.7*V+0.3*VOLD VOLD=V GO TO 2

1 IF(DELP.LE.DPOUT)KPRES=O 2 RETURN

END

SUBROUTINE PARMTR(ETA1,ETA2) IMPLICIT REAL*8(A-H,O-Z) COMMON /CONR/VB,GV,RF COMMON /PAR/P1,P2,P3 COMMON /TW7/ALFA1,ALFA2,ALFA3 COMMON /PAR3/KPAR

EFF=0.8 KPAR=1 CALL ILLPAR(EFF,ETA1)

133

Page 140: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c

c

c

c

c

KPAR=2 CALL ILLPAR(EFF,ETA2)

RETURN END

SUBROUTINE CONTRL(CMIN,CMOUT,CIN,CSET,COLD1,COLD2,V,R,G) IMPLICIT REAL*S(A-H,O-Z) DIMENSION CMIN(3),CMOUT(3),CIN(3),CSET(3),

$ COLD1(3),COLD2(3) DIMENSION ERR(3),EOLD1(3),EOLD2(3),SUMOLD(3),DERV(3) COMMON /CTRL/KCTRL,CK11,CK12,CK21,CK22,CK31,CK32 COMMON /CONR/VB,GV,RF COMMON /OLDR/VBOLD,GVOLD,RFOLD COMMON /TW7/ALFA1,ALFA2,ALFA3 COMMON /PAR1/ETA1,ETA2 COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /DEAD/DOWN1(200),DOWN2(200),DEAD(200),XFOUT,XFMOD COMMON /CON7/VMAX COMMON /CNT/ICTRL,IREBL COMMON /PR1/KPRES,DPSET,DPOUT COMMON /FEED/FNEW COMMON /SUM/ SUM ( 3) COMMON /TIME/TIN,TOUT,TDOWN

FIL=0.97 XFMOD=FIL*XFMOD+(1.-FIL)*XFOUT XF=XFMOD

ICTRL=ICTRL+1

TCTRL=1.0j6.0

VBOLD=VB GVOLD=GV RFOLD=RF

DO 10 I=1,3 ERR(I)=-CIN(I)+CSET(I) EOLD1(I)=-COLD1(I)+CSET(I) EOLD2(I)=-COLD2(I)+CSET(I) SUMOLD(I)=SUM(I)

10 SUM(I)=SUM(I)+(TCTRL/3.)*(ERR(I)+EOLD1(I)+4.*EOLD2(I)) c

c

c

XSS=CIN(1)+CK11*ERR(1)+(CK12)*SUM(1) WSS=CIN(2)+CK21*ERR(2)+(CK22)*SUM(2) YSS=CIN(3)+CK31*ERR(3)+(CK32)*SUM(3)

IF(KPRES.NE.O)GO TO 600

C USE THE MODEL INVERSE TO CALCULATE CONTROL ACTIONS

134

Page 141: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c c

c

c

c

GUESS1=RF GUESS2=VB

KCON=1 CALL ILLCTRL(GUESS1,ANS1) RF=ANS1

KCON=2 CALL ILLCTRL(GUESS2,ANS2) VB=ANS2

GV=(((XF-XSS)/VB)-((YSS-XF)/(RF+1.)))/(WSS-XF)

C CHECK FOR REBOILER DUTY CONSTRAINT c ----------------------------------c

VV=FNEW/((1./(RF+1.))+(1./VB)+GV) IF(VV.LE.VMAX)GO TO 600 VSET=VMAX GO TO 700

c C SET V FOR PRESSURE CONSTRAINT FROM PRDROP SUBROUTINE c

600 IF(KPRES.EQ.O)GO TO 900 VSET=V

c C CUT OFF INTEGRAL WINDUP c

700 DO 20 I=1,3 20 SUM(I)=SUMOLD(I)

c C CALL THE OPTIMIZER c

CALL TREBL(VSET,CSET,CIN,COLD1,COLD2,R,FNEW,XF) GO TO 900

c C CALL TRBSQ(VSET,CSET,CIN,COLD1,COLD2,R,FNEW,XF) c

900 KCTRL=O RETURN END

135

Page 142: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c C**************** c

ABSTRACT *******************************

c c c c c c c c c c c c c c c c

THIS IS THE PARAMETERIZATION SUBROUTINE FOR THE CONTROLLER MODEL. THE MODEL IS PARAMETERIZED USING THE VALUES OF PRODUCT COMPOSITIONS AND THE VALUES OF THE MANIPULATED VARIABLES.

THE SUBROUTINE EMPLOYS THE ILLINOIS METHOD FOR SOLUTION OF A SINGLE NON LINEAR EQUATION IN ONE UNKNOWN. ILLINOIS METHOD IS A MODIFICATION OF THE REGULA FALSI METHOD AND IT DEMONSTRATES FASTER CONVERGENCE FOR CONVEX

FUNCTIONS. IT IS APPLIED ONLY WHEN THE FUNCTION APPROACHES THE SOLUTION IN CONVEX FASHION, OTHERWISE THE PROGRAM PROCEEDS USING THE NORMAL REGULA FALSI METHOD.

IT IS NECESSARY TO INPUT ONLY ONE GUESS VALUE, AND THE FUNCTION EQUATION IS CONTAINED IN THE SUBROUTINE 'MODPAR'.

C**************** NOMENCLATURE *************************** c c c c c c c c c c c c c c c c c c c

GUESS ERLIM X liNT X2INT XMULT

XlOLD X20LD

XlNEW

X2NEW ERRl ERR2 ElNEW E2NEW AI TEST ANSWER

= INITIAL GUESS VALUE SUPPLIED AS INPUT = ERROR CRITERIA FOR CONVERGENCE = INTERMEDIATE VALUE FOR BOUNDING THE FUNCTION = VALUE FOUND FOR BOUNDING THE FUNCTION = MULTIPLIER USED ON XliNT IN SEARCHING FOR X2INT

= FIRST WORK VARIABLE FOR CALCULATING THE NEW VALUE = SECOND WORK VARIABLE FOR CALCULATING

THE NEW VALUE = NEW VALUE CALCULATED USING THE REGULA

FALSI METHOD = NEXT VALUE CALCULATED USING ILLINOIS MODIFICATION = FUNCTION VALUE FOR VARIABLE XlOLD = FUNCTION VALUE FOR VARIABLE X20LD = FUNCTION VALUE FOR VARIABLE XlNEW = FUNCTION VALUE FOR VARIABLE X2NEW = ALFA FACTOR FOR ILLINOIS METHOD = TEST VARIABLE = THE FINAL CONVERGED VALUE

c C************************************************************ c

c

SUBROUTINE ILLPAR(GUESS,ANSWER) IMPLICIT REAL*8(A-H,O-Z) COMMON /PAR4/X(200),XEQ(200),Y(200),YEQ(200) COMMON /CHEK/AA,BB,CC,ROOTl,ROOT2 COMMON /ON9/ALFA(200),NT,NF,NG

ERLIM=l.E-6 XlOLD=GUESS CALL MODPAR(XlOLD,ERRl) XliNT=XlOLD

136

Page 143: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c c

c

c

c

c

IF(X1INT.EQ.O.O)X1INT=1.0

FIND OTHER GUESS VALUE TO BOUND THE FUNCTION

XMULT=1.01 ITER=O IMAX=1000

10 ITER=ITER+1 IF(ITER.GT.IMAX)GO TO 50

X2INT=X1INT*XMULT CALL MODPAR(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100 X2INT=X1INT/XMULT CALL MODPAR(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100 XMULT=XMULT+0.01 GO TO 10

50 WRITE(5,*)' ITERATIONS EXCEEDING THE MAXIMUM !! ' READ(5,*)NN GO TO 600

C BEGIN THE REGULA FALSI METHOD c -------------------------------c

c

c

100 ITER=O X20LD=X2INT AI=0.5

20 ITER=ITER+1 IF(ITER.GT.IMAX)GO TO 50 CALL MODPAR(X10LD,ERR1) CALL MODPAR(X20LD,ERR2)

C FORMULA FOR REGULA FALSI METHOD c

c

c

c

X1NEW=(ERR2/(ERR2-ERR1))*X10LD+(ERR1/(ERR1-ERR2))*X20LD

CALL MODPAR(X1NEW,E1NEW)

IF(ABS(E1NEW).LT.ERLIM)GO TO 400

C CHECK IF ILLINOIS MODIFICATION IS APPLICABLE c ----------------------------------------------c

c

TEST=ERR2*E1NEW IF(TEST.GT.O.O)GO TO 200

137

Page 144: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c C IF NOT, CONTINUE WITH REGULA FALSI c

c c

Xl0LD=X20LD X20LD=X1NEW GO TO 20

APPLICATION OF THE ILLINOIS METHOD c ------------------------------------c

200

c

c

c

X2NEW=((AI*ERR1)/(AI*ERRl-ElNEW))*XlNEW+ $ (ElNEW/(ElNEW-AI*ERRl))*XlOLD

CALL MODPAR(X2NEW,E2NEW) IF(ABS(E2NEW).LT.ERLIM)GO TO 500

TEST=E2NEW*E1NEW IF(TEST.LT.O.O)GO TO 300 X20LD=X2NEW GO TO 20

300 XlOLD=XlNEW X20LD=X2NEW GO TO 20

c C WRITE THE FINAL ANSWER c

400

500 c

600

c c c

c

c c c

ANSWER=XlNEW GO TO 600 ANSWER=X2NEW

CONTINUE RETURN END

SUBROUTINE MODPAR(ETA,ERR) IMPLICIT REAL*8(A-H,O-Z) COMMON /ON8/R,V,G,XF COMMON /ON9/ALFA(200),NT,NF,NG COMMON /CONR/VB,GV,RF COMMON /PAR1/ETA1,ETA2 COMMON /PAR2/YTOP,YSIDE,XBOT COMMON /PAR3/KPAR COMMON /PAR4/X(200),XEQ(200),Y(200),YEQ(200) COMMON /CHEK/AA,BB,CC,ROOT1,ROOT2

IF(KPAR.NE.l)GO TO 200

138

Page 145: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

C PART 1 : c ----------c TO EVALUATE PARAMETER ETA1 c

c

1

c

X(NT)=YTOP Y(NT-1)=YTOP

DO 1 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(RF/(RF+1.))*(X(I+1)-X(I)) CONTINUE ERR=YSIDE-X(NG) GO TO 300

C PART 2 : c ---------c TO EVALUATE PARAMETER ETA2 : c C SECTION 1 : SOLVE FROM THE TOP TO FEED c

c

c

c

c

c

200 X(NT)=YTOP Y(NT-1)=YTOP

IF(ETA.EQ.1.0)GO TO 300

DO 10 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA1*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(RF/(RF+1.))*(X(I+1)-X(I))

10 CONTINUE

FV=(1./VB)+GV+(1./(RF+1.)) Q=(RF/(RF+1.))-GV

DO 11 I=NG-1,NF,-1 AA=(ALFA(I)-1.)*(1.-ETA) BB=((ALFA(I)-1.0)*(ETA-Y(I)))+1.0 CC=-1.0*Y(I) DEL=((BB**2-4.0*AA*CC)) IF(DEL.LT.O.O)GO TO 300 DELTA=SQRT(DEL) ROOT1=(-1.0*BB+DELTA)/(2.0*AA) ROOT2=(-1.0*BB-DELTA)/(2.0*AA) IF(ROOT1.GT.O.O.AND.ROOT1.LT.1.0)GO TO 922 IF(ROOT2.GT.O.O.AND.ROOT2.LT.1.0)GO TO 911 GO TO 300

911 X(I)=ROOT2 GO TO 933

c 922 X(I)=ROOT1

139

Page 146: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

933 Y(I-1)=Y(I)-Q*(X(I+1)-X(I)) 11 CONTINUE

c C EQUATION FOR THE FEED TRAY c

c

c

Y(NF-1)=Y(NF)-Q*(X(NF+1)-X(NF))-FV*(XF-X(NF))

ETOP=Y (NF-1)

C SECTION 2 : SOLVE FROM THE BOTTOM UP TO FEED c C EQUATIONS FOR THE REBOILER ( REBOILER EFF 100 % ) c

c

c

c

X(1)=XBOT Y(1)=(ALFA(1)*X(1))/(1.+(ALFA(1)-1.)*X(1)) X(2)=X(1)+(VB/(VB+1.))*(Y(1)-X(1))

DO 20 I=2,NF-1 YEQ(I)=(ALFA(I)*X(I))/(1.+(ALFA(I)-1.)*X(I)) Y(I)=X(I)+ETA*(YEQ(I)-X(I)) X(I+1)=X(I)+(VB/(VB+1.))*(Y(I)-Y(I-1))

20 CONTINUE

EBOT=Y(NF-1) ERR=ETOP-EBOT

300 RETURN END

140

Page 147: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c C**************** c ABSTRACT *******************************

c c c c c c c c c c c c c c c c c c c c

THIS SUBROUTINE DETERMINES THE CONTROL ACTIONS USING THE TARGET SET POINTS AND THE MODEL PARAMETERS FOR THE TRAY TO TRAY MODEL.

THE DETERMINATION OF CONTROL ACTIONS PROCEEDS IN SIMILAR FASHION AS THE PARAMETERIZATION, EXCEPT THAT THE PARAMETERS ARE KNOWN AND MANIPULATED VARIABLES ARE UNKNOWN.

THE SUBROUTINE EMPLOYS THE ILLINOIS METHOD FOR SOLUTION OF A SINGLE NON LINEAR EQUATION IN ONE UNKNOWN. ILLINOIS METHOD IS A MODIFICATION OF THE REGULA FALSI METHOD AND IT DEMONSTRATES FASTER CONVERGENCE FOR CONVEX

FUNCTIONS. IT IS APPLIED ONLY WHEN THE FUNCTION APPROACHES THE SOLUTION IN CONVEX FASHION, OTHERWISE THE PROGRAM PROCEEDS USING THE NORMAL REGULA FALSI METHOD.

IT IS NECESSARY TO INPUT ONLY ONE GUESS VALUE, AND THE FUNCTION EQUATION IS CONTAINED IN THE SUBROUTINE 'MODEL'.

C**************** NOMENCLATURE *************************** c c c c c c c c c c c c c c c c c c c

GUESS ERLIM X1INT X2INT XMULT

X10LD X20LD

X1NEW

X2NEW ERR1 ERR2 E1NEW E2NEW AI TEST ANSWER

= INITIAL GUESS VALUE SUPPLIED AS INPUT = ERROR CRITERIA FOR CONVERGENCE = INTERMEDIATE VALUE FOR BOUNDING THE FUNCTION = VALUE FOUND FOR BOUNDING THE FUNCTION = MULTIPLIER USED ON X1INT IN SEARCHING FOR X2INT

= FIRST WORK VARIABLE FOR CALCULATING THE NEW VALUE = SECOND WORK VARIABLE FOR CALCULATING

THE NEW VALUE = NEW VALUE CALCULATED USING THE REGULA

FALSI METHOD = NEXT VALUE CALCULATED USING ILLINOIS MODIFICATION = FUNCTION VALUE FOR VARIABLE X10LD = FUNCTION VALUE FOR VARIABLE X20LD = FUNCTION VALUE FOR VARIABLE X1NEW = FUNCTION VALUE FOR VARIABLE X2NEW = ALFA FACTOR FOR ILLINOIS METHOD = TEST VARIABLE = THE FINAL CONVERGED VALUE

c C************************************************************ c

SUBROUTINE ILLCTRL(GUESS,ANSWER) IMPLICIT REAL*8(A-H,O-Z) COMMON /CON4/X(200),XEQ(200),Y(200),YEQ(200) COMMON /CONR/VB,GV,RF COMMON /CONS/KK

141

Page 148: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c

ERLIM=1.E-6 ITER=O X10LD=GUESS CALL MODEL(X10LD,ERR1)

IF(ABS(ERR1).GT.ERLIM)GO TO 1 X1NEW=X10LD GO TO 400

1 X1INT=X10LD IF(X1INT.EQ.O.O)X1INT=1.0

C FIND OTHER GUESS VALUE TO BOUND THE FUNCTION c

c

c

c

c

c

c

c

XMULT=1.01 ITER=O KK=O IMAX=1000

10 ITER=ITER+1 IF(ITER.GT.500}GO TO 50

X2INT=X1INT*XMULT CALL MODEL(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100 X2INT=X1INT/XMULT CALL MODEL(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100

IF(KK.NE.1)GO TO 11

X2INT=X1INT*(1.-XMULT) CALL MODEL(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100

11 XMULT=XMULT+0.01 GO TO 10

50 WRITE(5,*)' READ(5,*)NN

ITERATIONS EXCEEDING THE MAXIMUM

C BEGIN THE REGULA FALSI METHOD c -------------------------------c

c

100 KK=50000000 ITER=O X20LD=X2INT AI=0.5

142

! ! '

Page 149: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c c

c

c

c

20 ITER=ITER+1 IF(ITER.GT.IMAX)GO TO 50 CALL MODEL(X10LD,ERR1) CALL MODEL(X20LD,ERR2)

FORMULA FOR REGULA FALSI METHOD

X1NEW=(ERR2/(ERR2-ERR1))*X10LD+(ERR1/(ERR1-ERR2))*X20LD

CALL MODEL(X1NEW,E1NEW)

IF(ABS(E1NEW).LT.ERLIM)GO TO 400

C CHECK IF ILLINOIS MODIFICATION IS APPLICABLE c ----------------------------------------------c

c

TEST=ERR2*E1NEW IF(TEST.GT.O.O)GO TO 150

C IF NOT, CONTINUE WITH REGULA FALSI c

c

c c

X10LD=X20LD X20LD=X1NEW GO TO 20

150 X20LD=X1NEW GO TO 20

APPLICATION OF THE ILLINOIS METHOD c ------------------------------------c

c

c

c

c

200 X2NEW=((AI*ERR1)/(AI*ERR1-E1NEW))*X1NEW+ $ (E1NEW/(E1NEW-AI*ERR1))*X10LD

CALL MODEL(X2NEW,E2NEW) IF(ABS(E2NEW).LT.ERLIM)GO TO 500

TEST=E2NEW*E1NEW IF(TEST.LT.O.O)GO TO 300 X20LD=X2NEW GO TO 20

300 X10LD=X1NEW X20LD=X2NEW GO TO 20

C WRITE THE FINAL ANSWER c

400

500 c

ANSWER=X1NEW GO TO 600 ANSWER=X2NEW

143

Page 150: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c

c

c

600 CONTINUE RETURN END

SUBROUTINE MODEL(U,ERR) IMPLICIT REAL*S(A-H,O-Z) COMMON /DEAD/DOWN1(200),DOWN2(200),DEAD(200),XFOUT,XF COMMON /ON9/ALFA(200),NT,NF,NG COMMON /CONR/VB,GV,RF COMMON /PAR1/ETA1,ETA2 COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /CON4/X(200),XEQ(200),Y(200),YEQ(200) COMMON /CON5/KK

IF(KCON.NE.1)GO TO 200

C PART 1 : c ----------c TO EVALUATE REFLUX RATIO RF c

c

c

X(NT)=YSS Y(NT-1)=YSS

DO 1 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA1*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(U/(U+1.))*(X(I+1)-X(I))

1 CONTINUE ERR=WSS-X(NG) GO TO 300

C PART 2 : c ---------c TO EVALUATE RATIOS GV AND VB : c C CALCULATE GV FROM GUESS VALUE OF VB c

200 QQ=((XF-XSS)/U)-((YSS-XF)/(RF+1.)) GV=QQ/(WSS-XF)

c C SECTION 1 : SOLVE FROM THE TOP TO FEED c

c

X(NT)=YSS Y(NT-1)=YSS

DO 10 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA1*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(RF/(RF+1.))*(X(I+1)-X(I))

10 CONTINUE

144

Page 151: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c 911

c 922 933

11 c

FV=(1./U)+GV+(1./(RF+1.)) Q=(RF/(RF+1.))-GV

DO 11 I=NG-1,NF,-1 AA=(ALFA(I)-1.)*(1.-ETA2) BB=((ALFA(I)-1.0)*(ETA2-Y(I)))+1.0 CC=-1.0*Y(I) DEL=((BB**2-4.0*AA*CC)) IF(DEL.LT.O.O)GO TO 300 DELTA=SQRT(DEL) ROOT1=(-1.0*BB+DELTA)/(2.0*AA) ROOT2=(-1.0*BB-DELTA)/(2.0*AA) IF(ROOT1.GT.O.O.AND.ROOT1.LT.1.0)GO TO 922 IF(ROOT2.GT.O.O.AND.ROOT2.LT.1.0)GO TO 911 GO TO 300

X(I)=ROOT2 GO TO 933

X(I)=ROOT1 Y(I-1)=Y(I)-Q*(X(I+1)-X(I)) CONTINUE

C EQUATION FOR FEED TRAY c

c

c

Y(NF-1)=Y(NF)-Q*(X(NF+1)-X(NF))-FV*(XF-X(NF))

ETOP=Y (NF-1)

C SECTION 2 : SOLVE FROM THE BOTTOM UP TO THE FEED c C EQUATIONS FOR THE REBOILER ( REBOILER EFF 100 % ) c

c c

c c

c

X(1)=XSS Y(1)=(ALFA(1)*X(1))/(1.+(ALFA(1)-1.)*X(1)) X(2)=X(1)+(U/(U+1.))*(Y(1)-X(1))

DO 20 I=2,NF-1 YEQ(I)=(ALFA(I)*X(I))/(1.+(ALFA(I)-1.)*X(I)) Y(I)=X(I)+ETA2*(YEQ(I)-X(I)) X(I+1)=X(I)+(U/(U+1.))*(Y(I)-Y(I-1))

20 CONTINUE

EBOT=Y(NF-1)

C IF INITIAL GUESS IS BOUND, GO TO ERR DIRECTLY c

IF(KK.GT.1)GO TO 105 c

145

Page 152: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c C OTHERWISE CHECK FOR VALUE OF Y(NF-1) TO BOUND c

IF(EBOT.LT.O.O)GO TO 110 IF(EBOT.GT.1.0)GO TO 110

c 105 ERR=ETOP-EBOT

GO TO 300 c

110 ERR=O.O c

300 RETURN END

146

Page 153: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c C***************** c ABSTRACT *******************************

c c c c c c c c

THIS SUBROUTINE EMPLOYEES THE NELDER MEAD OPTIMIZATION ROUTINE FOR THE WEIGHTED LEAST SQUARES APPROCH FOR FLOODING CONSTRAINT.

THE TOP AND SIDESTREAM SET POINTS ARE THE DIMENSIONS OF SEARCH, AND FOR EACH OPTIMIZATION CYCLE THE MODEL IS USED TO DETERMINE THE VALUE OF THE OBJECTIVE FUNCTION.

C*********************************************************** c

c

c

c

SUBROUTINE TREBL(VMAX,CSET,CIN,COLD1,COLD2, $ ROPT,FOPT,XFOPT)

IMPLICIT REAL*8(A-H,O-Z) DIMENSION C(lO),CSET(3),CIN(3),COLD1(3),COLD2(3) DIMENSION ERR(3),EOLD1(3),EOLD2(3),STNEW(3),SUM(3) COMMON /CTRL/KCTRL,CK11,CK12,CK2l,CK22,CK31,CK32 COMMON /ON9/ALFA(200),NT,NF,NG COMMON /CONR/VBC,GVC,RFC COMMON /OLDR/VBOLD,GVOLD,RFOLD COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /CON4/X(50),XEQ(50),Y(50),YEQ(50),XOLD(50) COMMON /CON6/FV COMMON /CNT/ICTRL,IREBL COMMON /OPT/Sil,SI2,SI3 COMMON /OPTl/TOP,SS COMMON /OPT2/SETPT(3) COMMON /OPT3/F,V,R,XF COMMON /OPT4/RF,VB,GV COMMON /FAIL/IFAIL COMMON /IMP/BOTIMP,SSIMP,TOPIMP

F=FOPT V=VMAX R=ROPT XF=XFOPT

IFAIL=O

C WRITE(S,*) 1 CONSTRAINT CONTROL, OPTIMIZING ..•.•... 1

c

c

c

IREBL=IREBL+l

TCTRL=(l.0/6.0)

FVOLD=FV FV=F/VMAX IF(IREBL.LT.lO)GO TO 22

147

Page 154: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c 22

1

c c c

c c c

c

c

c

2

DO 1 I=1,3 SETPT(I)=CSET(I) DO 2 I=1,NT XOLD(I)=X(I)

INITIAL GUESS VALUES

C(1)=SETPT(3) C(2)=SETPT(2)

CALL THE NMEAD OPTIMIZER

H=0.0001 IPRINT=O CALL NMEAD(C,2,H,IPRINT)

VBC=VB RFC=RF GVC=FV-(1./VBC)-(1./(RFC+1.))

IF(X(1).LT.O.O)GO TO 20 IF(IFAIL.EQ.O)GO TO 30

20 WRITE(5,*) 1 CONTINUE WITH OLD VALUES OF RF AND GV' RFC=RFOLD GVC=GVOLD VBC=1./(FV-GVC-(1./(1.+RFC))) GO TO 700

c 30 CONTINUE

C WRITE(5,*) 'OPTIMIZATION COMPLETE' C WRITE(5,456) VBC,GVC,RFC,FV C WRITE(5,457)X(1),X(NG),X(NT)

457 FORMAT(2X,6(F8.6,2X)) c C APPLY THE GMC CONTROL LAW TO THE NEW OPTIMUM SET POINTS c

c

STNEW(1)=X(1) STNEW(2)=X(NG) STNEW(3)=X(NT)

DO 10 I=1,3 ERR(I)=-CIN(I)+STNEW(I) EOLD1(I)=-COLD1(I)+STNEW(I) EOLD2(I)=-COLD2(I)+STNEW(I)

10 SUM(I)=SUM(I)+(TCTRL/3.)*(ERR(I)+EOLD1(I)+4.*EOLD2(I)) c

c

XSS=CIN(1)+CK11*ERR(1)+(CK12)*SUM(1) WSS=CIN(2)+CK21*ERR(2)+(CK22)*SUM(2) YSS=CIN(3)+CK31*ERR(3)+(CK32)*SUM(3)

148

Page 155: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c c

c

c

c

c

c

KCON=99 TOP=YSS SS=WSS CALL 0PTCTRL(VBC,ANS2} VB=ANS2 VBC=ANS2 RFC=RF GVC=FV-(1./VBC)-(1./(1.+RFC))

IF(IFAIL.NE.O)GO TO 20

700 RETURN END

SUBROUTINE NSOLV(A,FUN} IMPLICIT REAL*S(A-H,O-Z} DIMENSION A(10) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /CONR/VBC,GVC,RFC COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /CON4/X(50),XEQ(50},Y(50},YEQ(50},XOLD(50} COMMON /CON5/KK COMMON /CON6/FV COMMON /OPT/SI1,SI2,SI3 COMMON /OPT1/TOP,SS COMMON /OPT2/SETPT(3) COMMON /OPT4/RF,VB,GV COMMON /FAIL/IFAIL COMMON /IMP/BOTIMP,SSIMP,TOPIMP

TOP=A(1) SS=A(2)

GUESS1=RFC KCON=1 CALL OPTCTRL(GUESS1,ANS1) RF=ANS1

GUESS2=VBC KCON=2 CALL OPTCTRL(GUESS2,ANS2) VB=ANS2

BOTIMP=1.-(X(1}/SETPT(1}) SSIMP=1.-((1.-X(NG))/(1.-SETPT(2))) TOPIMP=1.-((1.-X(NT))/(1.-SETPT(3))) FUN=SI1*BOTIMP**2+SI2*SSIMP**2+SI3*TOPIMP**2

RETURN END

149

Page 156: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c C************************************************************ c C THE ILLINOIS METHOD BEGINS HERE c C************************************************************ c

c

c

c

c

SUBROUTINE OPTCTRL(GUESS,ANSWER) IMPLICIT REAL*8(A-H,O-Z) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /CONR/VBC,GVC,RFC COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /CON4/X(50),XEQ(50),Y(50),YEQ(50),XOLD(50) COMMON /CON5/KK COMMON /CON6/FV COMMON /OPT/SI1,SI2,SI3 COMMON /OPT1/TOP,SS COMMON /OPT2/SETPT(3) COMMON /OPT4/RF,VB,GV COMMON /FAIL/IFAIL COMMON /IMP/BOTIMP,SSIMP,TOPIMP

ERLIM=1.E-6 ITER=O X10LD=GUESS CALL OPTMOD(X10LD,ERR1)

IF(ABS(ERR1) .GT.ERLIM)GO TO 1 X1NEW=X10LD GO TO 400

1 X1INT=X10LD IF(X1INT.EQ.O.O)X1INT=1.0

C FIND OTHER GUESS VALUE TO BOUND THE FUNCTION c

c

c

XMULT=1.01 ITER=O KK=O IMAX=1000

10 ITER=ITER+1 IF(ITER.GT.500)GO TO 50

X2INT=X1INT*XMULT CALL OPTMOD(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100 X2INT=X1INT/XMULT CALL OPTMOD(X2INT,ERR2) TEST=ERR1*ERR2

150

Page 157: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c 11

IF(TEST.LT.O.O)GO TO 100

IF(KK.NE.1)GO TO 11

X2INT=X1INT*(1.-XMULT) CALL OPTMOD(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100

XMULT=XMULT+0.01

c

c

GO TO 10

50 WRITE(5,*)' IFAIL=555 GO TO 700

optimization LIMIT reached

C BEGIN THE REGULA FALSI METHOD c -------------------------------c

c

c

100 KK=50000000 ITER=O X20LD=X2INT AI=0.5

20 ITER=ITER+1 IF(ITER.GT.IMAX)GO TO 50 CALL OPTMOD(X10LD,ERR1) CALL OPTMOD(X20LD,ERR2)

C FORMULA FOR REGULA FALSI METHOD c

! ! '

c X1NEW=(ERR2/(ERR2-ERR1))*X10LD+(ERR1/(ERR1-ERR2))*X20LD

CALL OPTMOD(X1NEW,E1NEW) c

IF(ABS(E1NEW).LT.ERLIM)GO TO 400 c C CHECK IF ILLINOIS MODIFICATION IS APPLICABLE c ----------------------------------------------c

TEST=ERR2*E1NEW IF(TEST.GT.O.O)GO TO 150

c c IF NOT, CONTINUE WITH REGULA FALSI c

X10LD=X20LD X20LD=X1NEW GO TO 20

c 150 X20LD=X1NEW

GO TO 20 c

151

Page 158: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

C APPLICATION OF THE ILLINOIS METHOD c ------------------------------------c

c

c

c

c

200 X2NEW=((AI*ERR1)/(AI*ERR1-E1NEW))*X1NEW+ $ (E1NEW/(E1NEW-AI*ERR1))*X10LD

CALL OPTMOD(X2NEW,E2NEW) IF(ABS(E2NEW) .LT.ERLIM)GO TO 500

TEST=E2NEW*E1NEW IF(TEST.LT.O.O)GO TO 300 X20LD=X2NEW GO TO 20

300 X10LD=X1NEW X20LD=X2NEW GO TO 20

C WRITE THE FINAL ANSWER c

400

500 c

600 c

ANSWER=X1NEW GO TO 600 ANSWER=X2NEW

CONTINUE

700 RETURN END

c c

c

c

SUBROUTINE OPTMOD(U,ERR) IMPLICIT REAL*8(A-H,O-Z) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /PAR1/ETA1,ETA2 COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /CON4/X(50),XEQ(50),Y(50),YEQ(50),XOLD(50) COMMON /CON5/KK COMMON /CON6/FV COMMON /OPT1/TOP,SS COMMON /OPT3/F,V,R,XF COMMON /OPT4/RF,VB,GV COMMON /FAIL/IFAIL

IF(KCON.NE.1)GO TO 200

C PART 1 : c ----------c TO EVALUATE REFLUX RATIO RF c

X(NT)=TOP Y(NT-1)=TOP

152

Page 159: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

1

c

DO 1 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA1*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(U/(U+1.))*(X(I+1)-X(I)) CONTINUE ERR=SS-X(NG) GO TO 300

C PART 2 :

c ---------c TO EVALUATE RATIOS GV AND VB : c c C CALCULATE GV FROM GUESS VALUE OF VB c

c

200 IF(KCON.NE.99)GO TO 222 XNUM=YSS-WSS XDEN=((WSS-XSS)/U)-(FV*(WSS-XF)) RF=(XNUM/XDEN)-1.0

222 GV=FV-(1./U)-(1./(1.+RF)) c C SECTION 1 : SOLVE FROM THE TOP TO FEED c

c

c

c

c

c

X(NT)=TOP Y(NT-1)=TOP

DO 10 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA1*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(RF/(RF+1.))*(X(I+1)-X(I))

10 CONTINUE

Q=(RF/(RF+1.))-GV

DO 11 I=NG-1,NF,-1 AA=(ALFA(I)-1.)*(1.-ETA2) BB=((ALFA(I)-1.0)*(ETA2-Y(I)))+1.0 CC=-1.0*Y(I) DEL=((BB**2-4.0*AA*CC)) IF(DEL.LT.O.O)GO TO 300 DELTA=SQRT(DEL) ROOT1=(-1.0*BB+DELTA)/(2.0*AA) ROOT2=(-1.0*BB-DELTA)/(2.0*AA) IF(ROOT1.GT.O.O.AND.ROOT1.LT.1.0)GO TO 922 IF(ROOT2.GT.O.O.AND.ROOT2.LT.1.0)GO TO 911 GO TO 300

911 X(I)=ROOT2 GO TO 933

153

Page 160: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c c

c

c

922 X(I)=ROOT1 933 Y(I-1)=Y(I)-Q*(X(I+1)-X(I))

11 CONTINUE

EQUATION FOR FEED TRAY

Y(NF-1)=Y(NF)-Q*(X(NF+1)-X(NF))-FV*(XF-X(NF))

ETOP=Y (NF-1)

C SECTION 2 : SOLVE FROM THE BOTTOM UP TO FEED c C EQUATIONS FOR THE REBOILER ( REBOILER EFF 100 % ) c

c

c

c

c

c

IF(KCON.NE.99)GO TO 198 X(1)=XSS GO TO 199

198 QQQ=GV*(X(NG)-XF)+((X(NT)-XF)/(RF+1.)) X(1)=XF-U*QQQ

199 Y(1)=(ALFA(1)*X(1))/(1.+(ALFA(1)-1.)*X(1)) X(2)=X(1)+(U/(U+1.))*(Y(1)-X(1))

DO 20 I=2,NF-1 YEQ(I)=(ALFA(I)*X(I))/(1.+(ALFA(I)-1.)*X(I)) Y(I)=X(I)+ETA2*(YEQ(I)-X(I)) X(I+1)=X(I)+(U/(U+1.))*(Y(I)-Y(I-1))

20 CONTINUE

EBOT=Y (NF-1)

C IF INITIAL GUESS IS BOUND, GO TO ERR DIRECTLY c

IF(KK.GT.1)GO TO 105 c C OTHERWISE CHECK FOR VALUE OF Y(NF-1) TO BOUND c

IF(EBOT.LT.O.O)GO TO 110 IF(EBOT.GT.1.0)GO TO 110

c 105 ERR=ETOP-EBOT

GO TO 300 c

110 ERR=O.O c

300 RETURN END

154

Page 161: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c C******************** c

ABSTRACT **********************

c c c c c c c c c c c c c

THIS SUBROUTINE IMPLEMENTS THE SQUARE APPROACH TO HANDLE CONSTRAINED VAPOR RATE.

CONSTRAINED VAPOR RATE SETS THE VALUE OF RATIO FV AND HENCE ONE DEGREE OF FREEDOM IS LOST, SO THE BOTTOMS COMPOSITION IS TOTALLY SACRIFICED TO MEET THE CONSTRAINT.

THE CONTROLLER MODEL IS USED TO DETERMINE THE ACTIONS USING ILLINOIS METHOD. THE RESULTING COMPOSITION IS SET BY THE MATERIAL BALANCE IN SUBROUTINE 'MODRB'.

CONTROL BOTTOM THE

C******************************************************** c

c

c

c

SUBROUTINE TRBSQ(VMAX,CSET,CIN,COLD1,COLD2, $ ROPT,FOPT,XFOPT)

IMPLICIT REAL*S(A-H,O-Z) DIMENSION CSET(3),CIN(3),COLD1(3),COLD2(3) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /CONR/VB,GV,RF COMMON /OLDR/VBOLD,GVOLD,RFOLD COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /CON4/X(lOO),XEQ(lOO),Y(lOO),YEQ(lOO) COMMON /CON6/FV COMMON /CNT/ICTRL,IREBL COMMON /OPT3/F,V,R,XF

F=FOPT V=VMAX R=ROPT XF=XFOPT

IREBL=IREBL+l

C SET THE CONSTRAINT VALUE c

c

c

c c

FV=F/VMAX

GUESSl=RF GUESS2=VB

KCON=l CALL ILLRB(GUESSl,ANSl) RF=ANSl

155

Page 162: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

KCON=2 CALL ILLRB(GUESS2,ANS2) VB=ANS2

RETURN END

C******************************************************** c C THE ILLINOIS METHOD BEGINS HERE c C******************************************************** c

c

c

c

c

SUBROUTINE ILLRB(GUESS,ANSWER) IMPLICIT REAL*8(A-H,O-Z) COMMON /CON4/X(100),XEQ(100),Y(100),YEQ(100) COMMON /CONR/VB,GV,RF COMMON /CONS/KK COMMON /CON6/FV

ERLIM=1.E-6 X10LD=GUESS CALL MODRB(X10LD,ERR1)

IF(ABS(ERR1).GT.ERLIM)GO TO 1 X1NEW=X10LD GO TO 400

1 X1INT=X10LD IF(X1INT.EQ.O.O)X1INT=1.0

C FIND OTHER GUESS VALUE TO BOUND THE FUNCTION c

c

c

c

c

XMULT=1.01 ITER=O KK=O IMAX=SOO

10 ITER=ITER+1 IF(ITER.GT.SOO)GO TO 50

X2INT=X1INT*XMULT CALL MODRB(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100 X2INT=X1INT/XMULT CALL MODRB(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100

IF(KK.NE.1)GO TO 11

156

Page 163: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c 11

X2INT=X1INT*(1.-XMULT) CALL MODRB(X2INT,ERR2) TEST=ERR1*ERR2 IF(TEST.LT.O.O)GO TO 100

XMULT=XMULT+0.01

c

c

GO TO 10

50 WRITE(5,*) I

READ(5,*)NN ITERATIONS EXCEEDING THE MAXIMUM

C BEGIN THE REGULA FALSI METHOD c -------------------------------c

c

c

100 KK=50000000 ITER=O X20LD=X2INT AI=0.5

20 ITER=ITER+1 IF(ITER.GT.IMAX)GO TO 50 CALL MODRB(X10LD,ERR1) CALL MODRB(X20LD,ERR2)

C FORMULA FOR REGULA FALSI METHOD c

! ! I

c X1NEW=(ERR2/(ERR2-ERR1))*X10LD+(ERR1/(ERR1-ERR2))*X20LD

CALL MODRB(X1NEW,E1NEW) c

IF(ABS(E1NEW).LT.ERLIM)GO TO 400 c C CHECK IF ILLINOIS MODIFICATION IS APPLICABLE c ----------------------------------------------c

c

TEST=ERR2*E1NEW IF(TEST.GT.O.O)GO TO 200

C IF NOT, CONTINUE WITH REGULA FALSI c

c

X10LD=X20LD X20LD=X1NEW GO TO 20

C APPLICATION OF THE ILLINOIS METHOD c ------------------------------------c

200 X2NEW=((AI*ERR1)/(AI*ERR1-E1NEW))*X1NEW+ $ (E1NEW/(E1NEW-AI*ERR1))*X10LD

c CALL MODRB(X2NEW,E2NEW)

157

Page 164: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c

c

c

IF(ABS(E2NEW).LT.ERLIM)GO TO 500

TEST=E2NEW*E1NEW IF(TEST.LT.O.O)GO TO 300 X20LD=X2NEW GO TO 20

300 X10LD=X1NEW X20LD=X2NEW GO TO 20

C WRITE THE FINAL ANSWER c

400

500 c

600

c c c

c

c

ANSWER=X1NEW GO TO 600 ANSWER=X2NEW

CONTINUE RETURN END

SUBROUTINE MODRB(U,ERR) IMPLICIT REAL*8(A-H,O-Z) COMMON /ON9/ALFA(200),NT,NF,NG COMMON /CONR/VB,GV,RF COMMON /PAR1/ETA1,ETA2 COMMON /CON2/XSS,WSS,YSS COMMON /CON3/KCON COMMON /CON4/X(100),XEQ(100),Y(100),YEQ(100) COMMON /CON5/KK COMMON /CON6/FV COMMON /OPT3/F,V,R,XF

IF(KCON.NE.1)GO TO 200

C PART 1 : c ----------c TO EVALUATE REFLUX RATIO RF c

c

c

X(NT)=YSS Y(NT-1)=YSS

DO 1 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA1*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(U/(U+1.))*(X(I+1)-X(I))

1 CONTINUE ERR=WSS-X(NG) GO TO 300

158

Page 165: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c C PART 2 : c ---------c TO EVALUATE RATIOS GV AND VB : c C CALCULATE GV FROM GUESS VALUE OF VB C AND THE CONSTRAINT c

200 GV=FV-(1./U)-(1./(RF+1.)) c C CALCULATE THE RESULTING BOTTOM COMPOSITION c

c QQ=GV*(WSS-XF)+((YSS-XF)/(RF+1.)) X(1)=XF-QQ*U

C SECTION 1 : SOLVE FROM THE TOP TO FEED c

c

X(NT)=YSS Y(NT-1)=YSS

DO 10 I=NT-1,NG,-1 XEQ(I)=Y(I)/(ALFA(I)-(ALFA(I)-1.)*Y(I)) X(I)=Y(I)-ETA1*(Y(I)-XEQ(I)) Y(I-1)=Y(I)-(RF/(RF+1.))*(X(I+1)-X(I))

10 CONTINUE c

c

c 911

c 922 933

11 c

Q=(RF/(RF+1.))-GV

DO 11 I=NG-1,NF,-1 AA=(ALFA(I)-1.)*(1.-ETA2) BB=((ALFA(I)-1.0)*(ETA2-Y(I)))+1.0 CC=-1.0*Y(I) DEL=((BB**2-4.0*AA*CC)) IF(DEL.LT.O.O)GO TO 300 DELTA=SQRT(DEL) ROOT1=(-1.0*BB+DELTA)/(2.0*AA) ROOT2=(-1.0*BB-DELTA)/(2.0*AA) IF(ROOT1.GT.O.O.AND.ROOT1.LT.1.0)GO TO 922 IF(ROOT2.GT.O.O.AND.ROOT2.LT.1.0)GO TO 911 GO TO 300

X(I)=ROOT2 GO TO 933

X(I)=ROOT1 Y(I-1)=Y(I)-Q*(X(I+1)-X(I)) CONTINUE

C EQUATION FOR THE FEED TRAY c

Y(NF-1)=Y(NF)-Q*(X(NF+1)-X(NF))-FV*(XF-X(NF)) ETOP=Y (NF-1)

159

Page 166: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

c c c c c

c

c

c

SECTION 2 : SOLVE FROM THE BOTTOM UP TO FEED

EQUATIONS FOR THE REBOILER ( REBOILER EFF 100 % )

Y(1)=(ALFA(1)*X(1))/(1.+(ALFA(1)-1.)*X(1)) X(2)=X(1)+(U/(U+1.))*(Y(1)-X(1))

DO 20 I=2,NF-1 YEQ(I)=(ALFA(I)*X(I))/(1.+(ALFA(I)-1.)*X(I)) Y(I)=X(I)+ETA2*(YEQ(I)-X(I)) X(I+1)=X(I)+(U/(U+1.))*(Y(I)-Y(I-1))

20 CONTINUE

EBOT=Y(NF-1)

C IF INITIAL GUESS IS BOUND, GO TO ERR DIRECTLY c

IF(KK.GT.1)GO TO 105 c C OTHERWISE CHECK FOR VALUE OF Y(NF-1) TO BOUND c

IF(EBOT.LT.O.O)GO TO 110 IF(EBOT.GT.1.0)GO TO 110

c 105 ERR=ETOP-EBOT

GO TO 300 c

110 ERR=O.O c

300 RETURN END

160

Page 167: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

APPENDIX C

SINGLE TRAY DYNAMICS

Distillation is one of the most commonly used methods for

separation, and is extensively employed by refining and

petrochemical industries. It is one of the major utility

consumer and directly affects the uniformity of products and

the throughput rates. As a result, distillation has a major

economic impact upon these industries.

Dynamic modeling of distillation columns is a valuable

tool for distillation controller development (Riggs, 1990).

The common approach to dynamic distillation modeling (Luyben,

1989) is to assume that the liquid on each tray behaves as a

continuously-stirred tank (CST) . The purpose of this study is

to use a detailed, dynamic model of a single tray in order to

evaluate the effectiveness of CST assumption.

A continuously-stirred tanks (CSTs) in series model is

used to represent the composition dynamics on a single tray

based on a simple vapor-liquid mass transfer model for a low

relative volatility system and a high relative volatility

system.

Literature Review

Kirschbaum (1948) has shown a steady-state analysis for

a tray where he assumes that the tray is composed of a number

of sections, each one of which is a completely mixed pool of

161

Page 168: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

liquid. He has illustrated a graphical method of calculating

overall plate efficiency, and he reports that a much better

estimate of overall plate efficiency can be obtained by using

a value of the theoretical enrichment ratio.

Gautreaux and O'Connell (1955) have studied a method of

approximating the effect of length of liquid path on the plate

efficiency. They have shown that the effect of number of

stages is more pronounced the higher the local efficiency.

Biddulph (1972) presented a theoretical study for

multicomponent distillation of air. He used a mathematical

model to simulate the steady-state operation of an air

separation column. The tray was divided into a number of

equal increments in the direction of the liquid flow and the

eddy diffusion model was used to represent the mixing on the

tray. He assumes complete mixing in the vertical direction.

Various other mixing models such as the mixing pool

model, the recycle stream model, the liquid residence time

model (Porter et al., 1972; Lockette et al., 1973; Lim et al.,

197 4) and the cascade of cells with stagnant zones model

(Bruin and Freije, 1974) have been proposed.

Biddulph and Ashton (1977) have studied the data taken

from an industrial distillation column producing benzene.

They have shown that extra data in addition to those normally

available from plant instrumentation are required to infer

efficiencies satisfactorily from industrial columns operating

on multicomponent systems.

162

Page 169: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Dribika and Biddulph (1986) studied the relationship

between point efficiencies measured in a small laboratory

column and the point efficiencies that actually existed on a

large rectangular tray using methanol-propanol and ethanol-

propanol systems. They used the same mathematical model,

which is described before, based on the eddy diffusion

concept. These results indicate that the laboratory column

with one sieve tray and external downcomer can be used to

obtain an approximation of point efficiencies on a similar

large tray when used in conjunction with the eddy diffusion

model.

Mathematical Model

Figure C.1 shows the graphical representation of the

mathematical model for a single tray. The tray is divided

into a number of sections, and each section is a continuous­

stirred tank. In other words, the tray is modeled as a series

of continuous-stirred tanks. The liquid enters the downcomer

and then enters the tray through the inlet weir, and flows

from one compartment to next compartment, with a specific

residence time in each compartment. So at any instant of

time, the liquid on the tray approximates the partially

backmixed state of liquid, which actually exists on a tray in

a real distillation column. Since complete mixing is assumed

in the vapor phase, the vapor entering each CST has the same

composition, but the vapor is not completely backmixed in the

163

Page 170: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Down comer

! t

-Liquid Inlet "

"" I -,

Figure C.1:

CST 1

t

Vapor outlet

t t -CST CST ,I

2 n

1

t t Vapor Inlet

Mathematical Model for Single Tray Dynamics

164

Liquid Outlet

l/

Weir

Page 171: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

CST. The vapor gradient along the height of the liquid in

each CST is determined using a mass transfer model. For a

lumped model commonly assumed for dynamic distillation

modeling, the entire tray is assumed to be a single

continuous-stirred tank, and hence it does not represent the

actual condition of the liquid on the tray, and it may tend to

predict a much faster response for the tray, whereas the

actual tray in a real column will exhibit a more sluggish

response due to partial backmixing.

It is well known that in a CST the liquid is completely

mixed, and in a plug flow reactor there is no backmixing of

the liquid. Also, an infinite number of CSTs in series would

approach the performance equivalent to that of a plug flow

reactor. This mathematical model is based on the concept that

a finite number of CSTs in series would yield a performance

intermediate to the two limiting cases of CST and plug flow.

Assumptions

The liquid dynamics on the tray were assumed to be much

faster than the composition dynamics, and the Francis weir

formula was used to calculate the total liquid molar holdup on

the tray. A flat liquid level was assumed for the tray (Van

Winkle, 1967). A uniform mixing for the vapor entering the

tray was assumed, which simply means that the composition of

the vapor entering each CST is identical. It was assumed that

the vapor entering the tray is uniformly distributed among all

165

Page 172: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

the CSTs, and the different vapor streams leaving each of the

CSTs are completely mixed in the vapor phase above the tray.

The composition of this uniform vapor phase was used to

determine the overall tray efficiency, and all the CSTs were

assumed to be of equal volume.

Model Eauations

The differential equation describing the variation of

molar holdup on the tray is written as follows,

(C.l)

(C.2)

where,

Mj = molar holdup on tray j,

Lj+1 = flow rate of liquid entering tray j+l,

Lj = flow rate of liquid leaving tray j,

and the flow rate of liquid leaving the tray is related to the

molar holdup using Francis weir formula.

The variation of liquid composition in each CST with

respect to time is described as follows,

where,

Mi =molar holdup in CST 'i',

x. 1

= liquid composition in CST ' 0 ' 1 '

L. 1 1-= flow rate of liquid entering CST

166

' 0 ' 1 '

(C.J)

Page 173: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

v

Yvap

=composition of liquid entering CST 'i',

=flow rate of vapor entering CST 'i',

=composition of vapor entering CST 'i',

=composition of vapor leaving CST 'i'.

As the vapor progresses upwards through the CST, the

vapor composition changes from y to y. due to mass transfer vap 1

in the CST. The value of the mass transfer coefficient is

determined from the steady-state base case design. The

variation of vapor composition with respect to liquid height

is given by the following differential equation,

dy = -k (y-y*) s dh v

(C.4)

where,

* equilibrium composition of the vapor, y =

k = mass transfer coefficient,

s = cross sectional area of the CST,

h = height of the liquid in the CST.

Liquid Dynamics in the Downcomer

Dynamics of the liquid in the downcomer have a

significant effect on the tray dynamics. There is a certain

deadtime of the liquid in the downcomer and that delays the

composition disturbance on one tray being transferred to the

next tray. When this deadtime for all the stages is

considered, it effectively makes the simulator response more

sluggish.

167

Page 174: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Since there is no mass transfer occurring in the

downcomer, the deadtime is modeled using a small number of

CSTs in series. There is no mass transfer taking place, and

the residence time in each CST contributes to the effective

deadtime of the liquid in the downcomer. The height of liquid

in the downcomer is calculated using various factors such as

clear liquid height over the weir, height of the weir and the

dry plate pressure drop in inches of liquid (Van Winkle,

1967). That basically yields the molar holdup of liquid in

the downcomer. The downcomer was modeled using three CSTs in

series. Then the flow rate distribution through the downcomer

is determined. The differential equation describing the

variation of liquid composition in the downcomer is given as

follows,

(C.S)

Solution Procedure

The system of differential equations consisting of the

equation for the molar holdup on the tray and the equations

for liquid and vapor compositions in each of the CSTs was

solved using a Runge Kutta integrator. For each instant of

time, t, the Runge Kutta integrator has the values of molar

holdup on the tray and the liquid composition and liquid flow

rates in each of the CSTs. The Francis weir formula is used

to calculate the flow rate of liquid leaving the tray based on

168

Page 175: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

the molar holdup. Since all the CSTs are of equal volume, the

total molar holdup on the tray determines the molar holdup in

each of the CSTs, and the derivative of the molar holdup, as

given by equation (C.l), is used to evaluate the flow rate of

liquid leaving each CST.

Consider equations (C.3) and (C.4) for the liquid and

vapor compositions. Since the liquid composition and molar

holdup in each of the CSTs is known, the height of liquid and

the equilibrium composition of the vapor is determined.

Equation (C.4) is then integrated for all the CSTs for the

height of liquid in each CST to determine the composition of

vapor leaving each of the CSTs. Once the exit compositions of

vapor leaving each of the CSTs are known, they are used in

equation (C.3) to evaluate the value of the derivative for

liquid composition in each CST.

It is to be noted here that there are two Runge Kutta

integration loops. The first integration loop (outside loop)

is for the molar holdup on the tray and the liquid composition

in each of the CSTs, and these are integrated with respect to

time. The second integration loop (inside loop) is for the

vapor composition from each CST, and it is integrated with

respect to liquid height in each CST.

Case Studies

Two base cases were considered to study the composition

dynamics on a single tray in a binary distillation column.

169

Page 176: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

The first system chosen was a low relative volatility system.

This system is characterized by a large tray diameter and a

large liquid molar holdup on the tray. The details of this

base case are shown in Figure C.2.

The second base case considered was a high relative

volatility system. This system is characterized by a

comparatively smaller tray diameter and a higher extent of

separation on each stage.

shown in Figure C.J.

The details of this system are

Steady-state base cases were designed for both the

systems, and the dynamic changes from these base cases were

studied. It was observed that for the Runge Kutta integration

to be stable, a sufficiently small time step of the order of

0.1 seconds was necessary. A typical simulation run required

a CPU time of 38 seconds for the simulation of 1 minute of

operation on an OCTEK HIPPO 486 computer with Intel 80486 main

processor.

Results

The dynamics of compositions on a single tray in the

rectification section were studied specially for the inlet

liquid and vapor composition disturbances. All responses plot

normalized impurity concentration versus time in seconds,

where normalized impurity concentrations are defined as,

x• = ( 1-x) I ( 1-xsteady) ' (C.6)

170

Page 177: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

-----------------------------------------------------------system

liquid feed rate

liquid inlet composition

liquid outlet composition

vapor feed rate

vapor inlet composition

vapor outlet composition

liquid molar holdup on the tray

relative volatility

mass transfer coefficient

Murphree tray efficiency

void fraction

diameter of the tray

height of the weir

length of the weir

Number of CSTs used to model the downcomer

Number of CSTs used to model the tray

0.454 kmoljsec

0.600

0.587

0.545 kmoljsec

0.620

0.628

4.870 kmol

1.2

1.590 kmoljm3 .sec

0.9

0.2

3.048 m

0.0508 m

2.133 m

3

24

Figure C.2: Base Case - Low Relative Volatility System

171

Page 178: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

-----------------------------------------------------------system

liquid feed rate

liquid inlet composition

liquid outlet composition

vapor feed rate

vapor inlet composition

vapor outlet composition

liquid molar holdup on the tray

relative volatility

mass transfer coefficient

Murphree tray efficiency

void fraction

diameter of the tray

height of the weir

length of the weir

Number of CSTs used to model the downcomer

Number of CSTs used to model the tray

c~c4

0.0635 kmoljsec

0.600

0.581

0.0934 kmoljsec

0.760

0.774

0.363 kmol

2.5

1.747 kmoljm3 .sec

0.8

0.2

1.219 m

0.0508 m

0.853 m

3

12

Figure C.3: Base Case - High Relative Volatility System

172

Page 179: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

where,

* X

X

* y

y

Ysteady

y• = (1-y) / (1-Ysteady)'

= normalized liquid impurity concentration,

= outlet liquid composition,

(C.7)

= initial steady-state outlet liquid composition,

= normalized vapor impurity concentration,

= outlet vapor composition,

= initial steady-state outlet vapor composition.

Normalized impurity concentrations were used because the

rectification section of the column is considered.

Pages 177 and 178 show the normalized composition

response and tray efficiency variation for a step decrease in

the inlet liquid impurity level for the low relative

volatility system. As can be seen from page 177, the step

change is given at t=20 seconds. The effect of deadtime in

the downcomer can be prominently observed in this case, which

makes the outlet composition response more sluggish. It is

seen that the vapor composition starts responding faster than

the liquid. This is because as the liquid composition change

is passed through the first CST, the outlet liquid composition

does not change, but the outlet vapor composition starts

changing because the vapor coming out from the first CST has

a different composition. It was determined that the time

constant for this response was about eight seconds. It is

seen that the tray efficiency shows a maximum and then comes

173

Page 180: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

back. This is because when the Murphree plate efficiency is

calculated, the equilibrium composition of vapor is determined

by using the outlet liquid composition, and the outlet liquid

composition starts changing after a relatively longer time due

the residence time of liquid in intermediate CSTs. Due to

increase in outlet vapor composition and unchanged vapor

equilibrium composition, the efficiency exhibits a maximum.

Page 179 shows the response of the lumped model for the

same step change in the inlet liquid composition. It can be

seen that this model does not consider the deadtime in the

downcomer, and has a faster response as compared to the

detailed tray model.

Page 180 shows the responses of the detailed model for a

high relative volatility system. The major difference between

these cases is that the high relative volatility system shows

a much faster response, and the time constant for this system

was determined to be about five seconds. For a high relative

volatility system, the extent of separation on each tray is

larger, and hence the magnitude of the step change given to

the high relative volatility system is also larger, as can be

seen from page 180. Pages 181 and 182 show the responses for

a step increase in the inlet liquid impurity for the low

relative volatility and the high relative volatility cases,

respectively, and it can be seen that they exhibit very

similar behavior.

174

Page 181: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Pages 183 and 184 show the variation of compositions and

tray efficiency for a step increase in the inlet vapor

impurity for the low relative volatility system. It can be

seen that the responses are very fast, and this is because the

vapor entering each CST has the same vapor inlet composition,

and the step change in inlet is immediately transferred to all

the CSTs. It was determined that the time constant for this

response is about five seconds. It can be seen that the

variation in efficiency is also very sharp and the reason why

we get a peak in efficiency is the same as explained before.

It was observed that the high relative volatility system also

exhibits very similar behavior except that the responses are

much faster than the low relative volatility system.

Due to the construction of the mathematical model, and

the way in which equations are formed, composition dynamics

for changes in the flow rate of inlet liquid can not be

predicted. Pages 185 and 186 show the variation of

composition and tray efficiency for a 5% relative decrease in

the inlet vapor rate for the low relative volatility system.

It is seen that the magnitude of shift in the steady-state

compositions is very small. The efficiency changes and

settles at a higher value, because for the same liquid flow

rate, the vapor inlet rate goes down, and hence the vapor­

liquid mass transfer in each CST goes up, resulting in a

higher tray efficiency. A very similar behavior was observed

for the high relative volatility system.

175

Page 182: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

Conclusions

A mathematical model to study the composition dynamics on

a single tray which considers the downcomer effects has been

developed. The model uses CSTs in series to represent the

partial backmixing of the liquid on the tray.

Various disturbances such as step changes in liquid and

vapor inlet compositions showed the composition and efficiency

variations on the tray. These variations are similar to those

observed using a lumped model which represents the tray as a

single, completely backmixed CST. Hence, a lumped model can

be used to represent the tray with an effective molar holdup,

which can be calculated based on various time constants

determined by using this detailed model for a single tray.

176

Page 183: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

NORMALIZED COMPOSITION RESPONSE 1.003

LOW RELATIVE VOLATILITY

1.002

1.001

z 0

0 .999 i= ~ cr 0 .998 t-z w

0997 ~ 0 z 0.996 0 0 0.995 ~ ~

0994 ~ ::J 0.993 n.

~ 0 .992

0 w

0 .991 ~ N ::::i 0 .99 ~ ~ cr

0989 ~ 0 z 0 .988 LIQUID INLET

0.987

o.986 I 0.985 1

0 20 40 60 80

TIME (SEC.)

177

Page 184: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

TRAY EFFICIENCY VARIATION LOW RELATIVE VOLATILITY

0 .99

0 .98

0 .97

0 .96

>- 0 .95 u z w u 0 .94 ~ lL. w 0 .93 >-<( a:: 0 .92 1--

0 .91

0 .9

0 .89

0 .88

0 .87 i

0 20 40 60 80 100

TIME (SEC.)

178

Page 185: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

NORMALIZED COMPOSITION RESPONSE 1 .00.3 LOW RELATIVE VOLATILITY

1.002

1.001

z 0 i= 0 .999 <{ It: 0 .998 ..... z w 0 .997 u z 0 .996 0 u

0 .995 ~ LIQUID OUTLET

0 .994 It: ::>

0 .99.3 Q. VAPOR OUTLET ~

0 .992 0 w 0.991 N ::J 0 .99 <{ ~ It: 0 .989 0 z 0 .988 LIQUID INLET

0 .987

0 .986

0 .985

0 20 40 60 80

TIME (SEC.)

1 7 9

Page 186: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

NORMALIZED COMPOSITION RESPONSE HIGH RELATIVE VOLATILITY

1.005 ..,-------------------------------,

z 0 i= ~ LIQUID OUTLET a:: 1- 0 .995 -z w u z 0 u 0 .99 -

~ a:: :::> VAPOR OUTLET Q. 0 .985 -~

0 w N ::::i 0.98 -~ ~ a:: 0 z LIQUID INLET

0 .975 -

0.97 -t----.----~----,r-----,-1---.-1--~l---,1------j

0 20 40 60 80

TIME (SEC.)

180

Page 187: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

NORMALIZED COMPOSITION RESPONSE 1.015

LOW RELATIVE VOLATILITY

1.014

1.0 1.3 LIQUID INLET

z 1.012 0 t= 1.01 1 <{ 0:: 1.01 1-z w 1.009 u z 1.008 0 u

1.007

~ 1.006 0:: ::J

1.005 11. ~

1.004 0 w 1.003 N :J 1.002 <{ ~ 0:: 1.001 0 z

0 .999

0 .998

0 .997

0 20 40 60 80

TIME (SEC .)

181

Page 188: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

1.03

1.025 -

z 0 i= ~ 1.02 -0:: 1-z w u

1 .015 -z 0 u

~ 1.01 -0:: :J Cl ~

0 1.005 -w N ::::i ~ ~ 0:: 0 z

0.995 -

0 .99

0

PRODUCT COMPOS IT ION RESPONSE

I I

20

HIGH RELATIVE VOLATILITY

LIQUID INLET

VAPOR OUTLET

~~============~

LIQUID OUTLET

I I

40

TIME (SEC .)

182

I r

60 I

80

Page 189: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

NORMALIZED COMP OSITION RESPONSE 1 017 LOW RELATIVE VOLATILITY

1.016 -

1.015 -

1.014 -z VAPOR INLET 0 1.013 -i= <( 1.012 -cr 1- 1.01 1 -z w

1.01 -u z

1.009 -0 u

VAPOR OUTLET 1.008 -~ 1.007 -cr ::> 1.006 - LIQUID OUTLET n. ~ 1.005 -0 1.004 -w N ::::i 1 .00.3 -<( ~ 1.002 -cr 0 1.001 -z

0 .999 -

0.998 -

0 .997 I I I I I

0 20 40 60 80

TIME (SEC .)

183

Page 190: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

TRAY EFFICIENCY VARIATION 0 .93

LOW RELATIVE VOLATILITY

0 .92 -

0 .91 -

0 .9

0 .89 -

>- 0.88 -() z

0 .87-w u i;:: 0 .86 -LL w >- 0 .85 -<{ n:: 1- 0 .84 -

0 83 -

0 .82 -

0 .81 -

0.8-

0.79

0 20 40 60 80

TIME (SEC.)

184

Page 191: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

NORMALIZED COMPOSITION RESPONSE LOW RELATIVE VOLATILITY

1.0005

1.0004 -

1.0003 -

1.0002 -z 0 1.0001 -f= ~ 0:: f- 0 .9999 -z w 0 .9998 -(.) z

0 .9997 -0 (.) LIQUID OUTLET

~ 0 .9996 -

0 .9995 -0:: :::> 0 .9994 -Cl. ~ 0.9993 -0 0 .9992 -w N ::J 0 .9991 - VAPOR OUTLET ~ ~ 0 .999 -0:: 0 0 .9989 -z

0.9988 -

0 .9987 -

0.9986 -

0 .9985 I I I

0 20 40 60 8C

TIME (SEC.)

185

Page 192: NONLINEAR PROCESS MODEL-BASED A THESIS IN CHEMICAL

TRAY EFFICIENCY VARIATION LOW RELATIVE VOLATILITY

0 .94 .-----------------------------,

0 .93 -

>-0 0 .92 -z w 0 G:: u.. w >-<{ 0 .91 -a:: 1-

0 .9 +------_j

0 .89 -+--------,.---,--------,---,----,-----,----,------j 0 20 40 60 80

TIME (SEC.)

186