Operability considerations in chemical processes: A switchability analysis

Operability considerations in chemical processes: A switchability analysis

Computers"chem. Engng, Vol. 21, Suppl., pp. S143-S148, 1997 Pergamon © 1997 Elsevier Science Ltd All fights reserved Printed in Great Britain 0098-1...

452KB Sizes 1 Downloads 56 Views

Computers"chem. Engng, Vol. 21, Suppl., pp. S143-S148, 1997

Pergamon

© 1997 Elsevier Science Ltd All fights reserved Printed in Great Britain 0098-1354/97 $17.00+0.00

PII:S0098-1354(97)00040-9

Operability Considerations in Chemical Processes: A Switchability Analysis T. T. L. VU, P. A. BAHRI, J. A . R O M A G N O L I ICI Laboratory for Process Systems Engineering Department of Chemical Engineering, University of Sydney, NSW 2006, Australia Abstract - A formulation for simultaneous operability and switchability is proposed, leading to an uncertain dynamic nonlinear programming problem that can be solved by two different approaches: sequential and simultaneous optimisations. Both techniques are used to test the effectiveness of the proposed strategy on the mini integrated plant. Some studies on the effect of scaling the state and control variables are carried out. Adding proper control strategies and number of degrees of freedom may speed up the switching time and reduce the integral square error. Due 1o possible disturbances entering the plant during the switch, closed-loop back-off from the nominal optimal trajectories should also be taken into consideration. Different optimisation problems generated in this study are solved using the software package GAMS with MINOS 5.3 optimiser and numerical results are tested against the plant simulations using SPEEDUP flowsheeting package. INTRODUCTION A processing system should be designed so that it has the ability to respond to changeovers in downstream demands, product specifications, feed stock and the environment regulations in an optimal and safe manner. During normal operation, the supervisory and regulatory layers of the control system are responsible for the optimal moving between different operating conditions caused by those changeovers. This leads to the switchability problem in a chemical plant. Due to possible disturbances entering the system throughout a switch, two aspects of the operability, namely flexibility and controllability should also be incorporated in the switchability concept. Hence the integrated strategy proposed by Bahri (1995) for operability analysis has been used as the starting platform that results in economically desirable steady state conditions at the beginning and the end of the transition. To ensure safe and feasible changeover in the switchability problem path constraints are efficiently dealt with by placing bounds on interior points. Minimising the integral squared deviation of the state and control variables drives them to their new target values in a short period of time. A framework within the optimisation environment is proposed introducing an uncertain dynamic nonlinear programming (NLP) problem that can be solved using existing techniques. The aims of this paper are: * To formulate the simultaneous operability and switchability problem. * To solve the dynamic NLP problem for a mini integrated plant by different techniques, test the numerical results against plant simulation and determine which of the optimal trajectories might be desirable for real plant implementations. * To study the effect of problem formulation on optimal solution. In order to achieve these goals, the common dynamic

optimisation techniques should be reviewed first in the following section. SWITCHABILITY ANALYSIS Optimisation of dynamic processes is solving optimal-control problems in which some of the equality constraints are ordinary differential equations (ODE). The general dynamic optimisation problem under consideration is: Minimise Subject to

I = F(x, u, p, t, tf) dx = f(x, u, p), Xo = x(0)

dt

(1)

g(x, u, p) < 0 c(x, u, p) = 0 This field of theory has been significantly developed since the 1950s. A wide range of authors used different techniques to solve chemical engineering problems in reactor design, batch process operation, process startup, changeover policy, etc .... Review on dynamic optimisation techniques These variational problems were often converted to approximating NLP problems and solved by existing NLP methods. As shown in Table 1, the methods of solution used can generally be classified into two categories: sequential optimisation and simultaneous optimisation. Since the sequential optimisation approach integrates ODEs to completion at each iteration, most of the computational time is spent on the integration of the system equations that provides gradient information. The method either applies an approximation to the control profiles or the state profiles with adjoint variables. To avoid the requirement of solving differential equations at each step the method of simultaneous optimisation and integration was introduced. The dependent variables as well as the independent variables are replaced by approximating functions. S143

S144

PSE '97-ESCAPE-7 Joint Conference

Sequential Optimisation I

Simultaneous Optimisation ]

C.V. Iteration or C.V. Parameterisation ]

I Global or Finite Element Collocation[

I Discretisation I Control Prof'de

Parameterisation State and/or Control Profde

Control Profile = [ [ Parameterisation Coef. = I Decision Variables [ [ Decision Variables [

I

I

Parameterisation [ State and/or [ Control Profde [

Collocation Points = Decision Variables

Disadvantages * Handle constraints on state variables with difficulty. * Tend to converge slowly. * Require solutions of differential equations.

Disadvantaees * Can be used only for small scale problems. * Intermediate results are meaningless if they are not satisfy the DAEs.

Advantaees * Can be used to solve large scale problems. * Intermediate results may give a meaningful improved design.

Advantaees * Can handle constraints on state variables. * Reduce computational time.

Table 1 Two Common Aproaches to Solve Dynamic Optimisation Problems The very popular approximating methods are: Orthogonal Collocation (OC) and its improved form, Orthogonal Collocation on Finite Elements (OCOFE). The differential equations are then converted to algebraic ones. The dynamic optimisation problem becomes a NLP problem and can be solved by any optimisation technique

The switchability formulation The switchability deals with problems involving changeover policies, startup and shutdown operations. For this type of problems the best trajectories of the control variables and the profiles of the state variables can be effectively found by minimising the integral squared deviation of the variables from their final steady state values for a fixed period of time. The objective function becomes: Minimise t/

I = ~ {w I ( x - x ¢ )2

+w2(u_u¢)2}dt

(2)

0

As illustrated in the CSTR startup problem, Hick and Ray (1971) formulated the functional that expressed the desire to move to the steady state quickly while avoiding excessive control action. The sequential optimisation approach was then applied to solve for the optimal trajectory; however, path constraints were not considered in this startup problem.

For more complex problems Sargent and Sulivent (1979) described the method of discretising and approximating the control function by piecewise continuous basis functions. This approach could solve the problem of feed changeover policies for refinery distillation units by employing the optimal control package OPCON. The objective function was minimising a measure of off-specification product. Path constraints in this case were converted to the type of constraints bounded by minimum and maximum values. As this type of state variable constraints is difficult to handle using the sequential optimisation technique McAuley and MacGregor (1992) have recently considered the addition of a quadratic penalty function to the original objective function. They solved the optimal grade transition problem by approximating the control variable profiles as a series of ramps. The end-points of the ramps were the decision variable chosen by the optimiser MINOS 5.1. To handle path constraints with less difficulty the simultaneous optimisation method might be in order. For functions that vary sharply OCOFE approach (Biegler,1991) is used to solve the system of equations including differential equalities. The state variables are approximated by the Lagrange interpolation polynomial. These approximation functions can be differentiated with respect to time

PSE '97-ESCAPE-7 Joint Conference

S 145

Final condition NFE ~ A ~ i = tf 1

Objective function:

Minimise NFE NCOL NFE NCOL )2_ I = W 1 i__~l E ( X i j - - X s f W2 Z )",(Uij--Usf) 2 j=0 i=l i=l

Where:

Subject to: NCOL

Residual equation ¢)j(z) = ~ ( t )

NCOL

r(ti0 =

: H

X x ij tlJj("[s)- f(Xis, Uis, p) j=0

n=O

(t~ - ti.)

n~j NCOL

A ~ = 0, s = 1, 2 ...... NCOL, i = 1, 2 ...... NFE

--H

Continuity equation

n=O n~j

NCOL Xi0 =

(t - tin )

.~, Xi_l,jtDj ('[ = 1) i = 2 , 3 ..... NFE j=0

('c

- ~.)

('l;j -'1;n)

NCOL NCOL

Initial condition

1-I(x-x.)

Xo = x(0)

k=0 n=0

Inequality constraint

k~j

g(xis, Uis,p) -< 0 A~> 0

A t ~ i j ( t ) = Wj(x) =

n~j n~k NCOL

1-I(xj -x.)

Equality constraint

n=O nc:j

c(xis, ui~, p) = 0

Table 2 The Switchability Formulation in Discrete Form and substituted into equation (1) to convert the ODEs into the set of algebraic residual equations. The domain is divided into NFE elements. Each element has NCOL internal collocation points which are the roots of the Legendre Polynomials and is bounded by two knots oq and oq+~. The solutions of the state equations at these roots are selected as control variables. The initial condition is used for the first elements. An additional set of (NFE - 1) continuity equations is required to make the polynomials continuous at the interior knots. For the convenience of using computer codes, the problem is formulated in discrete forms. Table 2 shows the general formulation of the switchability problem using OCOFE approach. CASE STUDY The example used as a case study is taken from de Hennin (1991). The flowsheet consists of two Continuous Stirred Tank Reactors (CSTR) in series. A separator and an intermediate mixer are used to split the feed or join streams before entering the second CSTR (see Figure 1). The reaction in both reactors is irreversible, exothermic and first order. Heat is removed from the system by cooling jackets surrounding the reactors. The system has two level control loops and two temperature control loops. In each reactor the level is controlled by manipulating the outlet flow rate and the temperature is controlled by adjusting the amount of coolant to the cooling jacket. The controllers are PI controllers tuned by Ziegler Nichols method.

The switchability problem It is assumed that the plant is working at the closedloop back-off point referred to as the first steady

Sgara~r

Feed

w

QLT-

Q2

I

' First Reac~r

Mixer

QL

$eeoml Raaetar

(l~) To2'( ~

Figure 1 The Mini Integrated Plant state. These optimum conditions are the solution of a dynamic optimisation problem solved by Bahri (1995b). Due to the 25 % drop in the feed concentration the optimum operating point also changes. This new point referred to as the final steady state is found by solving a separate steady state optimisation problem without disturbances. The objective of the switchability problem is solving

S 146

PSE '97-ESCAPE-7 Joint Conference

for the optimal trajectories of the inlet flowrates. These profiles help the plant to move from the first to the second steady state conditions without any violation of constraints. It is difficult to find a solution for a NLP problem and the solution may be not unique or only locally optimal. The initial values, the bounds and scaling play substantial parts in solving a NLP problem. Therefore it is important to keep the formulation as simple and the model as small as possible at first. The size and complexity of the problem will be increased gradually. Process constraints and objectivefunction Mass and energy balance equations are written for two reactors: The constraints placed on the process are: * The reaction temperature cannot exceed 350 K. * The total feed flowrate is less than 0.8. * The amounts of cooling available for the first and second reactors are 20 and 30, respectively. * The minimum and maximum throughput of each reactor are 0.05 and 0.8, respectively. *The concentration of raw material in the product should be less than 0.3. The intergral quadratic objective function is formulated as: tr 2 2 I = I{•Wpi(Q i -"~sfr~i)2 + EWci(C i _Csf) i 2 + to i=l i=l (3) 2 . 2 . ~ w t i ( T I _T2f)2 + EWhi(Hl - H sif ) 2 } i=l

i=l

(a) CSTR1

(b) CSTR2

0.92

0.8 a

1

0.78

0.9

I i

0.88

L t

0.76 i

o

0.86

L

LI-

\

0.74

0.84

c3

t' ,I t I , I i 1 , 1 1 , 1 i

0.72

0.82

,

0.8

' ,,/-',

0.7 0

fib Time (s)

IO0

0.78 0

50 Time (s)

Figure 2 Throughput Violation (Broken line: Step Trajectories) Optimal Trajectories) (Solid line:

~

00

Method of solution The simultaneous optimisation and integration approach has been adopted first to solve the switchability problem. The state variable profiles are approximated by the Lagrange interpolation polynomials over each finite element to convert the ODEs into the set of algebraic equation. The dynamic optimisation problem becomes an ordinary NLP problem and can be modelled in GAMS language (Brooke et al., 1972). Solutions of state equations at the collocation points are decision variables choosen by MINOS 5.3 optimiser. For comparision the problem has also been solved using the sequential optimisation method. The control variable trajectories are approximated by a series of steps. Values of the decision variables at each step are selected by an optimiser. The model equations are solved within SPEEDUP (1995) to supply the optimiser with objective, constraint and gradient information. RESULT AND DISCUSSION The simplest trajectories are step changes in feed flowrates to compensate for a step change in feed concentration. However such changeovers would result in temperature and throughput violations in the first and second CSTRs. These violations are shown in Figure 2. The true optimal control variable trajectories that minimise the integral quadratic objective function are curves rather than a series of steps. For the convenience of performing dynamic simulations and real plant on-line implementation later, these curves are approximated by series of steps. Figure 3 shows approximated profiles of total feed and inlet flowrate to the first CSTR. Results from dynamic simulations in SPEEDUP using the approximated profiles are very closed to those from solving the NLP problem in GAMS (dot and solid curves in Figure 4). However using the approximated profiles the outflow of the second tank is still slightly violated (see Figure 4a). This can be improved by using finer steps in the approximation or discretising the control profiles first then solving the problem using the sequential optimisation method. Some disadvantages of the sequential method as discussed above are: trajectories determined in this approach are actually suboptimal and computational time increases; however, as a trade off, the problem is much easier to solve and the control profiles are ready for real plant on line implementation. The deviation terms included in the objective function (Equation 3) act like proportional controllers with weighting factors as controller gains. As the weighting factor is increased, the final value of the error decreases in magnitude and the system reaches steady state faster. However, as these deviation terms interact in a complicated way, it is not possible to set the weighting factors to very large values because the NLP problem becomes infeasible. An example shown in Figure 5 demonstrates this feature. If temperature weighting factors are

PSE '97-ESCAPE-7 Joint Conference increased by ten times, temperature response is faster but the number of iterations required to solve this problem also increases from 250 to 350. A proper constant tuning is to include these factors as

0.8

f

0.78 0.76 0.74 Q)

•~ 0.72

.d

0

"

0.7

i

i

t-

I

H

--= 0.68

o.66 / ; 0.64I i o.62[ i,, 0.6 / 0

i

50 Time (s)

1O0

Figure 3 Feed Flowrate Profiles (Broken line: To CSTR 1) (Solid line: Total Feed)

329.5 ! 00

329" 328.5

0.78 o II

#_

328

/

--~ 0.76 ~ 327.5

0 I--m 0.74 o

327

326.5 0.72 326 070

i

50 100 32550 Time (s)

i

50 100 Time (s)

Figure 4 Solutions from GAMS tested against SPEEDUP Simulations (Dot line: GAMS) (Solid line: SPEEDUP)

S147

decision variables. In this case study the magnitude of the weighting factors related to levels and temperatures are selected 10.3 times smaller than those related to other terms since the magnitude of temperature is much larger. Another reason for this choice is that the system has already had two PI level controllers and two PI temperature controllers (in some cases). As a result, the first and the second terms in the objective functions (Equation 3) are more important. At the beginning of the switch the concentrations are far from the target, then the second term dominates. The optimiser will simultaneously bring the state variables closer to their set points and avoid any path constraint violation. Near the end of the switch the state variables almost reach their targets. The first term now takes turn to drive the control variables to the desired steady state values. Again, some temperature dynamic responses of two reactors are plotted for different values of gain and reset time in Figure 6a. The control variable returns to the set point slowly, if the reset time is increased. A small value of reset time results in highly aggressive controller. On the contrary, if the controller gain is increased, the dynamic response becomes faster. The optimal values of these constant are evaluated by minimising the ISE as before. The total feed flowrate coresponding to this optimal combination of controller gain and reset time is plotted in Figure 6b. Finally the temperature in each reactor is controlled by adjusting the coolant rate. The fully-closed-loop model becomes more complex and can be converged only with small temperature controller gains. It seems that the optimal control profiles are not improved by using small gains. However these loops are necessarily to be closed because of the existence of disturbances and uncertainty during the transition. Figure 6b also shows the total feed profile back-off from the nominal optimal trajectories for the +5°C disturbance on the feed temperature. The last factor that can reduce the switching time is the number of degrees of freedom. If total feed and feed to the first CSTR are free to move, then the control and state variables reach their final steady state values after 80 and 150 seconds, respectively. If the difference of two feeds is set as a constant then the switching time increases by twofold. CONCLUSION An optimal-control problem, formulated for simultaneous operability and switchability analysis has been solved using two common methods: simultaneous and sequential optimisation approaches. The first method could handle path constraints and reduce computational time but could not be used for large and complicated problems. The second approach converged slowly but was more practical for engineering applications. It was found through the case study that changing control strategies and the number of degrees of freedom in the system could reduce the switching time while

S148

PSE '97-ESCAPE-7 Joint Conference CSTR2

CSTR1

350.5 350

S

349.5

349 E i,-

348.5 348 347.50

5(1 100 Time (s)

0

50 100 Time (s)

Figure 5 The Effect of Weighting Factor (Dot line: w = 0.0001) (Solid line w = 0.001)

(a) CSTR1 350~ ~ ' - . - ' - 4

# 346J v k,/,, 0

50 CSTR2

330j~

- 326[ ,.,' 0

• .

100

.....

" "', 50 (b) Total Feed

100

50 Time (s)

100

~ 0.7 u_ 0.6t

0

Figure 6 The Effect of Reset Time and Gain (Dot line: Gain = 3; Reset Time = 10) (Broken line: Gain --- 1.27; Reset Time = 23) (Solid line: Optimal values )

changing weighting factors could reduce the number of iterations. It was necessary for the plant to back of from the nominal optimal trajectory because of the existence of disturbances and uncertainties. NOTATION c: Algebraic equality constraints C: Concentration g: Algebraic inequality constraints H: Fractional liquid level I: Value of objective function p: System parameters Q: Flowrate r(t): Residual function t: Integration variables T: Temperature u: Independent or control variables x: Dependent or state variables w: Weighting function Greek Letters A~: Length of the finite element ~i, ~ : Lagrange polynomials ~i: Derivative of ~i with respect to t Superscripts and subscripts 1: First CSTR 2: Second CSTR i,o: Initial s: Steady state f: Final REFERENCES Bahri, P.A., 1995, A New Integrated Approach for Operability Analysis of Chemical Plants Ph.D. Thesis, Dept. of Chem. Eng., University of Sydney. Biegler L.T.and Cuthrell, J.E., 1987, Comp. and Chem. Eng. in press. Biegler L. T., 1991, Solution of Dynamic Optimization Problems CACHE Process Design Case Studies 6. Brooke, A., Kendrick, D. and Meeraus, A., 1992, GAMS User's Guide, Release 2.25, The Sciencetific Press, San Francisco, CA. De Hennin, S.R. and Perkins, J.D., 1991, Technical Report B93-37, Imperial College, London. Hicks, G.A. and Ray, W.H., 1971, Approximation Methods for Optimal Control Synthesis Can. J. Chem. Eng. 49, 522-528 McAuley, K.B. and MacGregor, J.F., 1992, Optimal Grade Transition in a Gas Phase Polyethylene Reactor AIChE Z 38, 1564-1576. Ray, W. H., 1981, Advanced Process Control, McGraw-Hill, New York. Sargent, R.W.H. and Sullivan,G.R., 1979, Development of Feed Changeover Policies for Refinery Distillation Units Ind. Eng. Chem. Process Des. 18, 113-124. SPEEDUP 5.5-5d, 1996, User Manual, Aspen Technology, Inc, Cambridge, Massachusetts