Model Accuracy for Economic Optimizing Controllers - American

Model Accuracy for Economic Optimizing Controllers: The Bias Update. Case. J. Fraser Forbes and Thomas E. Marlin'. Department of Chemical Engineering,...
0 downloads 0 Views 1MB Size
Ind. Eng. Chem. Res. 1994,33, 1919-1929

1919

Model Accuracy for Economic Optimizing Controllers: The Bias Update Case J. Fraser Forbes and Thomas E. Marlin’ Department

of

Chemical Engineering, McMaster University, Hamilton, Ontario, Canada L8N 4L7

In many advanced control applications the numbers of manipulated and controlled variables are not the same. A combination of steady-state economic optimization and model predictive control has been employed to exploit the optimization opportunities presented by such “non-square” systems. The economic optimization subsystem uses a process model and is usually coupled with a model updating scheme to compensate for plant/model mismatch. Care must be exercised during the design of such a system to ensure the model-based optimization yields operating conditions which are optimal for the true plant. This paper presents a rigorous criterion for determining under what conditions the model-based optimization embedded within the model predictive controller, using bias update, is capable of finding the plant optimum despite plant/model mismatch. The model accuracy criterion can be applied by solving an appropriate nonlinear programming problem. Further, it is shown that when the embedded model-based optimization problem has linear constraints, the bias update method will ensure convergence t o the plant optimum, providing the model accuracy criterion is satisfied and an appropriate filter is included in the feedback path. Discussions are concluded with a demonstration of the methods on a real-time gasoline blending control and optimization problem. 1. Introduction

In many process control situations the number of independent product specifications does not equal the number of independent manipulated variables available for process control. When there are an excess number of manipulated variables (the underspecified case), the process control system can use these extra degrees of freedom to improve process operations. In the overspecified case, when there are fewer independent manipulated variables than product specifications,the process control system must strike a balance among the offsets from product setpointa. In either the under- or overspecified cases,the controller attempts to (1)satisfy the constraints on the controlled and manipulated variables, (2) meet the specifications on the most important products, and (3) find the best operating conditions based on some specified objective,such as estimated operating profit or cost. Many model-predictivecontrol (MPC) systems contain a steadystate optimization layer which provides the ability to deal with such non-square problems (Brosilowand Zhao, 1988; Morshedi et al., 1985; Yousfi and Tournier, 1991). A natural basis for steady-state optimization is a process model, operating constraints, and economics. Any control system built for optimizingprocess economics is commonly called an online optimizing controller or a real-time optimizer (RTO). It is important to note that the optimization of steady-state conditions provides only the endpoint for the dynamic trajectory. In this structure, the standard predictive control algorithms remain free to determine the future values of the manipulated variables to achieve a desirable trajectory,usually through a separate optimization. Typically, a model-based optimization system consists of a set of integrated subsystems for (1)validating process measurements, (2) updating the process model using these measurements, (3) performing the optimization using the updated model, and (4) validating the optimizer commands (Darby and White, 1988). Success of the optimizing controller in converging to the plant optimum depends on

* Author to whom correspondence should be addressed. OSSS-5SS5/94/2633-1919~Q4.5QIO

the ability of the model to accurately represent key aspects of process behavior. For example, Roberts (1979) has shown that an inappropriate choice of process model can cause the optimizing controller to drive the manipulated variables far from the process optimum. Thus, process modeling decisions made during design are crucial to the eventual success of the optimization system, and the MPC system in which it is embedded. The importance of a “proper” model for achieving good dynamic performance with model predictive control has been recognized, and substantial research has been directed toward defining modeling requirements for MPC (Garcia and Morari, 1982, 1985). Much less attention has been paid to the model and updating requirements for the steady-state economic optimizer embedded within the MPC. This paper provides design-phasetesting methods for determining whether a process model is appropriate for use within a steady-state economic optimizing controller which uses bias update. Although discussions are framed around the economic optimizing controller, developments presented here are also applicableto any form of steady-state optimization used with the model-predictive controller. Figure 1 depicts the simplest form of an optimizing controller. In this configuration the optimizer calculates the optimal steady-state values of the manipulated variables, based on process economics, which are fed directly to the plant. Generally, there is a model-predictive controller between the optimizer and the plant (Brosilow and Zhao, 1988; Cutler and Ramaker, 1979; Yousfi and Tournier, 1991); however, since this paper considers the ability of the optimizing controllerto determine the steadystate optimum operations of the plant, with respect to economics, these discussions are limited to the case of direct online optimization. Although discussions are limited to direct steady-state optimization, there is no loss of generality since the model-predictive controller achieves the final conditions determined through such steady-state optimization. In the system of Figure 1, plant outputs are compared with those predicted by the process model. The difference between the actual and predicted plant outputs is used to 0 1994 American Chemical Society

1920 Ind. Eng. Chem. Res., Vol. 33, No. 8, 1994

plant-wide

considerable industrial relevance. Thus problem 1 can be rewritten

model-predictive controller

/

!1 1 I

maximize P(x,u) x.u

I II

steady-state optimizer

P

I

I i

I

subject to

f(x,u,a)-

=0

I I

I

X

I

gI(x,u,a)- 82J< 0

Figure 1. Simple model predictivecontrol system with 'bias" update.

update a "bias" or constant term appearing in the constraints of the model used by the optimizer. (The "raw" updates may be filtered, providing the steady-state gain of the filter is unity.) Then, the updated process model is in turn used to calculate the optimal steady-state manipulated variable values. Model-predictive-control systems make extensive use of the bias updating method (Garcia et al., 1989). It has been shown that, for linear systems with model updating at the control frequency, MPC systems yield zero steadystate offset for steplike disturbances in processes where the number of manipulated variables is equal to the number of setpoints. The success of the bias update method within the MPC structure has motivated control practitioners to incorporate it into the steady-state optimization layer (Brosilow and Zhao, 1988; Stadnicki and Lawler, 1985;Yousfi and Tournier, 1991);however, to date there has been no analysis of the merits of bias update in this steady-state optimization layer. This paper concentrates on the steady-state, optimizing control problem presented in Figure 1. The optimizing controller consists of a general nonlinear program of the form maximize P(x,u) x,u

(1)

subject to

f(x,u,a)-

=0

g(x,u,a)- 82 5 0 where f is the set of process model equations including mass/energy balances, thermodynamic relationships, etc., gis the set of operatingconstraints, Pis the profit function, u are the dependent process variables, x are the manipulated variables, a are the fixed model parameters and Bi are the adjustable model parameters. Note that in this expressionof the optimizing controlproblem, all adjustable model parameters appear in the "bias" terms vi). The problem to which we restrict ourselves here is where there are as many independent, active constraints as manipulated variables at the process optimum (x*). This situation merits special attention due to the widespread use of linear program (LP) and quadratic program (QP) based optimizing controllers (Brosilow and Zhoa, 1988; Cutler and h a k e r , 1979;Morshedi et al., 1985;Garcia andMorshedi, 1986;YousfiandTournier, 1991). Although this formulationis specific,it is commonly used in optimal, model-based, predictive control systems and as such has

where gA and gI are the active and inactive operating constraints, respectively. Throughout this paper knowledge of some design points is assumed. This information consists of the optimal values of the manipulated variables and the associated active constraint set for common plant operating modes. These design points may be available through detailed plant simulation studies using complex process models which are unsuitable for use in a real-time system. In operating plants, the active set for each mode of operation would be well-known from experience. For newly designed plants, the potential aetive set of constraints for each mode of plant operation could be identified from the results of operations flexibility studies (Grossman and Floudas, 1987;Swaney and Grossman, 1985a,b). Such design points will allow candidate process models to be evaluated for their use in a closed-loop economic optimizing control system, which will be responsible for reacting to unforeseen process changes. This paper generalizes the work presented in Forbes et al. (1992)to design of steady-state optimizers for nonlinear models, within model-predictive-control systems. We develop methods to determine the process model's adequacy (Le., the ability of the updated model to sufficiently represent the process geometryso that the plant and model optima coincide) and to determine the accuracy of the process model (i.e., its ability to yield the plant optimum despite uncertainty in the fixed model parameters). These methods are developed for the general nonlinear RTO system using bias update; however, they are also applicable to the linear case. Since many industrial applications involve linexu pn>cess models and Constraints (e.g., Brosilow and Zhao, 1988;Yousfi and Tournier, 1991),an analytical method for determining the effects of uncertainty in the fiied parameters of such linear constraints is presented and the method's relationship to postoptimal sensitivity analysis discussed. Finally, all of the methods are illustrated with an example built around a gasoline blending optimization and control system. 2. Point-Wise Model Adequacy

Process model selection is an important step in the design of an optimizing controller. Typically, there are many modeling alternatives, and a criterion is needed to distinguish models which are adequate for optimizing control from those which are not. Perhaps the most common method fol; differentiating among modeling alternatives is comparison of their accuracy in predicting key process outputs, given a set of process inputs. However, Durbeck (1965)showed that model selection based on such a criterion would not guarantee the success of an optimizing controller. The major previous work in this area is presented in Biegler et al. (1985). They used a type of adequacy criteria to show that the "inside-out" method, when applied to

Ind. Eng. Chem. Res., Vol. 33, No. 8, 1994 1921 process optimization, does not guarantee convergence to the optimum of the more complex model. In their work it was found that a model is adequate if the gradients of the process model, with respect to the process variables and fixed plant parameters, can be forced to match those of the plant, by an appropriate selection of parameter values. However, their work assumed a considerable correspondence between the variables and equations in the process model and the true plant. Typically, a process model is a simplification of reality and as such may not contain all of the plant variables. Taken to extreme the model could only include the variables which can be manipulated. Thus, the only necessary correspondence between a plant and an approximate optimization model is that they both must contain the same set of the manipulated variables. Similarly, the operating constraint set for a plant would undoubtedly be much more complex than that implemented in a process model. Since there may be little direct correspondence between the mathematical structure of the plant and that of the model, the actual values of the dual and nonmanipulated variables should not be used in determining the adequacy of a process model. Associated with any plant optimum is a set of manipulated variable values which give the location of the optimum (x*). Then, the most general criterion would require that an adequate process model would enable the optimizing controller, with an appropriate model updating scheme, to predict the manipulated variable values which give the location of the plant optimum, regardless of the model's accuracy in predicting the process outputs or profit measure. This idea is the central concept on which model adequacy is tested. These considerations lead to conclusion that a general definition of point-wise model adequacy should be made only in terms of the manipulated variables. Such a definition is: Definition 2.1: Point-Wise Model Adequacy. I f x* represents a unique process optimum, then a point- wise adequate process model possesses at least one set of adjustable parameter values B* such that the modelbased optimization has an optimum at It is recognized that the location of the process optimum may change periodically due to process disturbances, etc. and that adequacy results at any given design point are valid for that point only. However,the methods presented provide information useful in the formulation of candidate models, in the elimination of inadequate or inaccurate candidate models, and in the final selection of a process model. Further, since these are design-phase calculations, it is feasible to examine the adequacy of candidate process models for each typical operations modes. Since model adequacy will be framed solely in terms of the manipulated variables, adequacy testing is more simply performed in the reduced space (Avriel, 1976) of these manipulated variables. Reduced space techniques utilize equality, and in some instances active inequality, constraints to eliminate dependent process variables from the optimization problem. In this reduced space, the Karush-Kuhn-Tucker (KKT) conditions (Edgar and Himmelblau, 1988) can be used directly to yield criteria for point-wise model adequacy. The model adequacy criteria for the bias update case can be stated in terms of the reduced properties of the optimization problem as: Criteria 2.1: Point-Wise Model Adequacy (Bias Update Case). Given a unique process optimum x*, the candidate process model, of the form given in problem 1 , is point-wise adequate only i f there is at least one

+.

adjustable parameter set B* E B such that

v p - XTv,gA= 0

(3)

where Ai 2 0

V i = 1, ...,m

(4)

and

f(x,u,a)- &* = 0

(5)

The derivation of these expressions is presented in Appendix A. The point-wise model adequacy criteria 2.1 are stated for use where there are as many independent active constraints a t the plant optimum as there are manipulated variables and the only adjustable parameters appear as "bias" terms in the model. Point-wise model adequacy testing for situations where there are fewer independent active constraints at the plant optimum than manipulated variables can be found in Forbes et al. (1994). Notice that in the bias update formulation, the adjustable model parameters (@i) are used only to ensure feasibility and to satisfy the active status of the appropriate inequality constraints, in eq 5. They do not enter directly into the optimality conditions of eqs 3 and 4. Thus, for the process model form under consideration and the specific constraints active at the process optimum, the optimality of the given point in the model-based problem depends entirely on the fixed model parameters (4. This is a particular weakness of the "bias" updating strategy (recall that only B is adjusted). The point-wise model adequacy criteria can be illustrated with the simple example: Example 2.1. In this example we will examine the pointwise adequacy of a process model for several proposed values of the fixed parameter (a). 1 onsider the modelbased optimizing control problem o the form maximize [l 0.51 I

subject to

In the design phase of the controller, the value of the manipulated variables at the process optimum were determined to be x* = 11.67 1.67IT, using a detailed nonlinear model. The coefficient matrix in problem 6 contains some errorfree known values (such as stoichiometric coefficients, etc.) and a fixed parameter. The fixed model parameter (a)is estimated infrequently (e.g., daily or weekly), compared to the execution frequency of the optimizing controller and is therefore considered "fixed". In this case, the estimated "nominal" value for a is 2. Then, the solution to the model adequacy problem of eqs 3 and 5 in criteria 2.1 yields

B = [lo 10IT, X = 10.0033 0.2483IT As both elements of X are positive, the given values of the manipulated variables (x*)are an optimum of the model-

1922 Ind. Eng. Chem. Res., Vol. 33, No. 8, 1994

based problem, and the process model can be considered point-wise adequate. Although a is fixed, there is some uncertainty associated with its value. Suppose, because of this uncertainty, a were to have a value of 2.05; then the only value of the adjustable parameters for whichx* can be made a solution of eqs 5 of the model adequacy problem is

XI

B = [lo 10.O83IT However, for this value of a,the solution to eq 3 of the adequacy problem yields

X = [-0.00084 0.2504IT and according to the point-wise model adequacy criteria, the process model cannot be considered adequate. This conclusion can be confirmed by substituting a = 2.05 and the calculated value of B into problem 6, and solving. In this case the optimum of the model-based problem is at x = [2.5 OIT,which does not coincidewith the given process optimum. Although, for the bias update case with a = 2.05, there are values of B for which the given x* can satisfy the inequalities in problem 6, there is no value for @ which will yield x* as an optimal solution to problem 6. From this example, it is apparent that model adequacy can be very sensitive to the values assigned the fixed model parameters, which reinforces our desire for a method to determine permissible ranges of variation in a for which the model will remain point-wise adequate. 3. Model Accuracy

In general, the plant optimum is unknown and the system designer must make process modeling choices based on the results of detailed simulations, coupled with knowledge of likely process variation and modeling errors. One of the decisions in the design of an optimizing controller is the segregation of the model parameters into adjustable and fixed sets. Selection of the bias updating method dictates which parameters will be fixed and which are adjustable. Given that allmodel parameters are subject to some uncertainty, section 2 clearly showed that ’bias” updating will not guarantee that the model-based optimization will find the plant optimum when there are errors in the fixed parameters. Thus, optimizing control system design would be facilitated if results of model-based optimization are robust to expected errors in the fixed parameters. Friedman and Reklaitis (1975a,b) studied a related problem in which they examined the possible set of solutions to a linear programming problem, given the presence of parametric errors. However, their interest was in determining the space of possible solutions given a prespecified uncertainty in the model parameters and then choosing process operations which would provide the appropriate flexibility to ensure feasible operation throughout the possible range of model parameter values. In pointwise model accuracy testing we are interested in determining whether the plant optimum will remain the solution to the model-based optimization problem throughout the range of possible parameter errors. Alternatively, accuracy testing can be used to determine the maximum amount of parameter error for which the plant optimum remains the solution to the model-based optimization problem. Consider the two-dimensional optimization problem illustrated in Figure 2. In this situation the o p t s u m is found at the intersection of two constraints (gl and g2). When such a point is an optimum, the reduced gradient

XZ Figure 2. Model accuracy in two dimeneions.

of the performance function (V,P) is contained within the cone bounded by the reduced gradients of the active constraint set (V~BA),or equivalently all of the Lagrange multipliers (Ai) are positive (Edgarand Himmelblau, 1988). Then by definition this model is adequate, if the point of intersection of gl and g2 can be made to be the process optimum (x*) by an appropriate choice of values for the adjustable parameters. Given that the process model is of the bias update form in problem 1 for which there are as many independent active constraints at the plant optimum as there are manipulated variables, uncertainty in the fixed parameters is interpreted as uncertainty in the slopes of the inequality constraints in the reduced space or the reduced gradient of the profit function. Figure 2 shows the case where there is uncertainty in a fixed parameter on which g2 depends. The allowable region of the fixed parameter can be represented by an angle of rotation (8) of g2 about the plant optimum (x*),assuming the corresponding bias term can be adjusted so that the constraints intersect at x* throughout the range of possible values for the fixed parameters. The reduced gradient of the constraint will rotate through the same angle. If 8 is large enough then V,.gz will cross over V,P, moving V g outside of the cone of the constraints, as shown by the dashed line in Figure 2. In such a case x* would no longer be an optimum of the model-based problem, and one of the Lagrange multipliers would become negative. In the preceding discussions, uncertainty in the fixed parameters associated with a single constraint has been considered. Typically there is uncertainty in many of the fixed parameters on which the reduced gradients of the constraints and profit function depend. Thus, associated with each constraint gradient (and possibly the gradient of the profit function) are angles of rotation which depend upon the uncertainty in the fixed parameters. Clearly, there are many ways in which the reduced gradient of the profit function may be rotated outside of the cone of reduced gradients of the active constraints, due to uncertainty in the fixed parameters. Ideally, the model-based optimizing control problem should be posed in such a fashion, and the fixed model parameters known to the degree of accuracy, that x* will remain the optimum of the model-based problem for all values of the fixed parameters within the defined region of likely variation. On the basis of these ideas point-wise model accuracy can be defiied as: Definition 3.1: Point-Wise Model Accuracy. I f the model- based optimization recognizes the true process optimum (9) as an optimum for every value of the fixed parameters (a)within the allowable region for the estimates of a, then the model is point-wise accurate.

Ind. Eng. Chem. Res., Vol. 33, No. 8,1994 1923 Stating that all Xi must remain positive within the allowable region of the fixed parameter estimates is equivalent to V,P remaining within the cone of the constraints, for all values of a within this region. Then, the point-wise accuracy of a process model-based optimization, with respect to an expected range of errors in the fixed model parameters, can be determined by solving the optimization problem: minimize 6 a

(7)

subject to

v q x . - ATV&Alp = 0 6 = min(Ai) a1 5 a Ia,

Also, if the adjustable parameters have a fixed range, then these should be included as bounds on B and feasibility conditions of eqs 5 should be included in the accuracy test. Since both the controller model and constraint equations can be nonlinear, it is possible that the permissible range of values for a contains singularities of these equations. In such cases, care should be taken to ensure that such values of the fixed parameters are physically meaningful and the specific values excluded from the problem where appropriate. Problem 7 may not be solvable using conventional gradient-based nonlinear programming (NLP) codes, since the objective function 6 could be nonsmooth. In such cases mixed-integer nonlinear programming (MINLP) can be used to solve problem 7 (Balakrishnan and Boyd, 1992; Quesada and Grossman, 1992). Although the developments of Balakrishnan and Boyd (1992) are limited to parameter variation in linear systems, the authors provide a valuable discussion of the branch-and-bound MINLP method for control system design under parameter uncertainty. Quesada and Grossman (1992) present a branch-and-bound technique for convex MINLP problems where the discontinuous variables take on binary values. This work may be extended to the optimizing controller design problem 7. Alternatively, since problem 7 is solved during the design of an optimizing controller, the problem could be reformulated to minimize each individual Lagrange multiplier in turn and the select the smallest of these minimum values. This could be written (min

xi

’r

Solvingthe model accuracy problem in the form of problem 7a requires the solution of as many individual optimization problems as there are manipulated variables or independent active constraints at the plant optimum. Typically the set of manipulated (optimization) variables are a small subset of the plant variables, so problem 7a should be tractable in the design phase. The formulation given in problem 7a was used throughout this paper to test model accuracy. Should the solution of problem 7 yield a negative value for 6, it indicates that VJ‘ lies outside of the constraint cone for some possible values of the fixed parameters, and the “bias” updating method will result in incorrect operating conditions for these fixed parameter values. If

the model is point-wise accurate, the minimum value of Swillbe positive. When the constraints of the optimization problem are linear and the problem is point-wise accurate, it can be shown that the bias updating method (only Bi adjustable) leads to the true process optimum for all expected values of the fixed parameters. Proof of this is presented in Appendix B. When a model-based control system fails the pointwise accuracy test, the accuracy of the fixed parameter estimates must be improved. Alternatively, the offending fixed parameter can be added to the set of adjustable parameters and a model updating strategy more complex than bias updating used. Selection of alternative updating schemes is beyond the scope of this work. Example 3.1. This example uses the same system as in problem 6 of example 2.1, which was shown to be pointwise adequate a t the “nominal” value of a = 2. If the allowable region for a is 2.0 f 0.1, is this controller model accurate? Solving the minimization problem posed in problem 7, with the given range of variation in the fixed parameters, yields the minimum value of 6 = -0.0051, corresponding to a = 2.1. In order that the process model be considered point-wise accurate, 6 must remain positive. Thus, for this expected range of a the model is not point-wise accurate. The model can be made point-wise accurate by increasing the accuracy of the estimate of a to 2.0 f 0.04. The minimum value of 6 is yielded to be 0.0, which indicates multiple optima. Thus, for the process model to be pointwise accurate, the uncertainty in a must be less than f0.04. The system used in examples 2.1 and 3.1 is linear and serves to illustrate the ideas presented in each section. Since the tests presented in both sections 2 and 3 are pointwise in nature, they are also applicable to nonlinear problems. Appendix C presents a small nonlinear example of model accuracy testing. 4. Model Accuracy and Sensitivity Analysis

As discussed in the previous section, values for the fixed model parameters are often estimated from plant data and therefore contain some uncertainty. The point-wise model accuracy method of problem 7 deals only with whether or not the model is capable of yielding the same optimal manipulated variable values throughout the possible range of fixed parameter values. Should a particular model, containing many fixed parameters, fail the accuracy test, little information is provided as to which parameters caused the failure. The point-wise model accuracy test can be rerun on a trial-and-error basis to determine the permissible errors in the fixed parameters for which the model is accurate. However, when a controller model and constraint set fails the point-wise accuracy test, it would be valuable to be able to directly determine the maximum permissible uncertainty bounds for the fixed parameters. Such information could be used to refine the fixed parameter estimates. Post-optimality analysis methods such as parametric programming (Gal, 1979)or parametric sensitivity analysis (Fiacco, 1981)provide insight into the effects of variation in the model parameters on the optimum of a given problem. For the model accuracy problem, such methods can be extended to yield bounds on the permissible variation of the fixed parameters. The developments of Gal (1979) can be extended to all systems which are linear in the fixed parameters (a). Although the following developments cannot treat the general nonlinear problem, they are‘applicable to models containing linear combinations of functions which may be nonlinear in the process

1924 Ind. Eng. Chem. Res., Vol. 33, No. 8, 1994

variables. This analysis could be applied to MPC systems which contain embedded linear or quadratic programming problems, as well as nonlinear programming problems based on linear combinations of nonlinear functions of the manipulated variables (such as polynomials of XI. Consider the optimizing control problem maximize P(x) X

(8)

subject to g(x,a)- B 5 0

where the constraints are linear in the fixed parameters (a).At the optimum 03,. - (X*)TA, = 0

(9)

A, = v,g*l,.

(10)

where

In this paper we have limited discussions to problems where there are as many independent active constraints as manipulated variables; therefore A, is invertible and A* = [V&(A,)-'lT

(11)

In general, each element of A, is not a fixed parameter, since the model can contain known physical relationships such as stoichiometry and so forth. Hence, perturbations in the fixed parameters can be considered as a low rank correction to A, (Golub and Van Loan, 1989) and the dependence of the Lagrange multipliers on these perturbations can be written as X = [VA,.(A,

+ VET)-'lT

where E contains the errors in the fixed parameters and V is a matrix (containing 1's and 0's) which places these errors in the correct positions in A,. This expression can be expanded using the Sherman-Morrison-Woodbury formula (Ortega, 1987) to yield

correct row of A,. These developments are framed as perturbations to a row of the parameter matrix A,, since in general the rows of A, represent individual constraints. In situations where perturbations to columns of A, are of interest, such as when a parameter appears in several constraints, the following developments can be reformulated by substituting tvT for VCT and performing the appropriate algebra. In order that x* remain the optimum value for the manipulated variables, optimality theory requires that X 10 for all permissiblevalues oft. This optimality condition can be rewritten

+ tTA,'v)I - vtTA:'lTX*

[ (1

when (1 + cTA,v) > 0, which will generally be the case when the errors in the fixed parameters are much smaller in magnitude than the parameters themselves. (If (1+ cTA,v) < 0, then the inequality sign would be reversed.) For this work we will assume (1+ aT&v) > 0, and inequality 16 can be simplified to

[vTX*I- X*V~](AJ)-'CI X*

+ ETA;lV)-lETA;l]TX*

([

[

02483 0 0 0.0033 0 0.24831 - 0 0.248111-

[: ] [ [ ] :2]

0.0033 0.2483

(14)

Equation 14 will allow the changes in the Lagrange multipliers to be directly calculated as a function of specific perturbations in the fixed parameters, which in turn provides a basis for investigation of model accuracy. It would be particularly valuable if eq 14 could be used in conjunction with the nonnegativity requirements on the Lagrange multipliers to yield a simple model accuracy criterion. However, eq 14is nonlinear in the perturbations to the fixed parameters and little further refinement is possible except in the single constraint case. Consider the situation single constraint when ,=[I-

(17)

Since A,, v, and X* are known and constant, the set of simultaneous inequalities 17 can be used to directly calculate the maximum (or minimum) permissible perturbation (e) to the fixed parameters (a)for which the process model and constraint equations will remain pointwise adequate. This method allows the point-wise accuracy of a problem to be analyzed on a constraint-by-constraint basis. Example 4.1. Consider the system problem 6 of example 2.1; in example 3.1 it was shown to be point-wise accurate for a = 2.00 f 0.04 by trial and error. To directly determine the allowable range of values for cy, define v = [O 1IT, since the fixed parameter under consideration is in the second row of the constraint matrix, and t = [O ~ 2 3 Recalling ~ . that A* = [0.0033 0.2483IT, inequality 17 becomes

Simplifying using eq 11 gives X = [I - V(I

(16)

20

(15)

where C is the vector containing the perturbations in the fixed parameters of a single constraint and v is the vector of (1's and 0's) which places these perturbations in the

(18)

which simplifies to 0.0833~~ 50.0033

(19)

or the permissible bounds on cy are --03 I LY 5 2.04, which agrees with the results from the numerical solution of the mathematical programming accuracy test. The small example in Appendix C includes an application of the sensitivity method of section 4 to a system which is nonlinear in the manipulated variables, but linear in the fixed parameters. 5. Gasoline Blending Case Study

This case study is taken from Crowe et al. (1989), in which two types of automotive gasoline are blended from feedstocks with the objective of maximizing profit. Economic optimizing control in gasoline blending is of particular interest due to the widespread use of linear programming in solving such blending problems (Mac-

Ind. Eng. Chem. Res., Vol. 33, No. 8,1994 1925 Table 4. Plant Optimum (x*)

Table 1. Production Requirements value ($/bbl) @ j ) max bbl/day (Dj-) min bbl/day (Djmh) min octane (Si-) mas RVP (psi) (Si-)

regular

premium

33.00 8000 7000 88.5 10.8

37.00 loo00 loo00 91.5 10.8

Table 2. Feedstock Availability (4)and Cost (ct) available (bbl/day) 12000 6500 3000 4500 7000

cost ($/bbl) 34.00 26.00 10.30 31.30 37.00

Table 3. Feedstock Quality Data (Qd octane reformate 91.8 LSR naphtha 64.5 92.5 n-butane 78.0 FCC gasoline 96.5 alkylate

RVP (mi) 4.0 12.0 138.0 6.0 7.0

reformate LSR naphtha n-butane FCC gasoline alkylate

Donald et al., 1991)and common use of the bias update technique (e.g., Leung, 1985;Stadnicki and Lawler, 1985) in the real-time control and optimization of these systems. The process model was written in the "bias" update form of problem 1. In the case study, the model consisted of inequality constraints on maximum and minimum production rates, feedstock availability, octane, and Reid vapor pressure (RVP). Product octane and RVP were calculated as weighted averages of the feedstock properties, with RVP's represented by their blending indices to yield linear blending correlations (Gary and Handwerk, 1984). Using the product and feedstock data given in Tables 1-3, the formulation of the steady-state, economic optimizing control problem is:

subject to

C a i p i js I

s~,-CF~~ + B~ maximum quality limits I

minimum quality limits

+ B3

maximum demand limits

C F i j 2 Dj,mh+ B4

minimum demand limits

c F i j IDj,,, I

L

maximum feed availabilities

C F i j L Ri,,

+ B6

minimum feed availabilities

I

where ci are the feedstock costs, Dj are the production limits for product j (regular or premium gasoline), Fij is the flow of feedstock i to product j , pj are the product values, Qi are the feedstock qualities (octane or Reid vapor pressure), Ri are the availability limits for the feedstocks, and S, are the product quality specifications. This case study will deal with the effects of mismatch in the fixed parameters on the ability of the optimizing

reformate LSR naphtha n-butane FCC gasoline alkylate

regular (bbVdav) 2747 0 283 2268 1702

premium (bbl/dav) 9253 0 504 243 0

controller, using "bias" update, to successfully match the plant optimum operations. The plant optimum will be taken as the solution of problem 20 with the bias terms set to zero, using the data in Tables 1-3. The optimum plant operating conditions are given in Table 4. At the plant optimum of the problem the active constraints are (1)minimum production of regular, (2) maximum production of premium, (3)all available reformate used, (4)no LSR naphtha in either blend, ( 5 ) no alkylate in premium gasoline, (6) maximum RVP for both products, and (7) minimum octane for both products. Since there are 10 active constraints and 10 manipulated variables, the optimizing control problem is fully constrained. The fixed parameters in the process model are the feedstock qualities (octane and RVP). These qualities are infrequently measured by laboratory testing and can change frequently since the feedstocks are intermediate products in a refinery, whose qualities depend on upstream plant operations. Thus, the range of variation in feedstock qualities is due to a combination of measurement error and upstream process variation. Suppose that laboratory analysis concluded that the errors in octane and RVP are estimated to be no more than f0.5 octane number and f0.3 psi, respectively. Solving the optimization problem posed in problem 7a with MINOS in GAMS (Brooke at al., 1988),using these expected errors for the feedstock qualities, gave a negative 6. (Further analysis of this solution revealed negative Xi's associated with the minimum use of LSR Naphtha.) Such negative values indicate the process model is not point-wise accurate for these levels of uncertainty in the feedstock qualities. Thus, there are some possible values of the fixed parameters (or some true process conditions) for which an optimizing controller using bias updating will not converge to the true process optimum. By reducing the expected error regions for the product qualities to fO.l octane number and fO.l psi for feedstock octane and RVP, respectively, the solution to problem 7a yields a 6 > 0 and therefore the process model becomes point-wise accurate. Thus, an optimizing controller using bias updating can only be successful throughout the range of expected uncertainty in the fixed parameters, if the accuracy of the laboratory tests is significantly improved or the frequency of feedstock quality measurement increased. Should such improvements not be possible, another updating strategy should be considered. To illustrate the dangers of using an inaccurate process model, simulations were run with fixed errors in the octane numbers and RVP of the feedstocks. As stated previously, the plant was simulated using the equations given in problem 20 with the bias terms set to zero and feedstock qualities given in Table 3. No noise was added to the process measurements. The fixed parameter errors used in the optimizing controller are given in Table 5. For the first set of errors, the plant/model mismatch in the fixed parameters was sufficient to yield an inadequate model, at the plant optimum given in Table 4. The second set of fixed parameter errors were sufficiently small so as to yield an adequate model at the plant optimum. In both

1926 Ind. Eng. Chem. Res., Vol. 33, No. 8, 1994

inadequate 88.42

14

88.4

1

3

2

4

5

-1-

2

I

Controller Execution Number

4

3

5

Controller Execution Number

Figure 3. Regular gasoline octane trajectory.

Figure 6. Regular gasoline feedstock flows (adequate model).

I

,infeasible operation

E 0 2

10.84 k i n a d e q u a t e

100

I7

adequate

1

2

3

4

5

5 n

Controller Execution Number Figure 4. Regular gasoline RVP trajectory. 2.000 I

-

n

-E

I

LSR

x

v)

1,000

alkylate

.-

n-butane

ig Q F-

reformate

-1,000 O P - - -

-3,000

'

I I

2

3

4

5

Controller Execution Number

Figure 6. Regular gasoline feedstock flows (inadequate model). Table 5. Fixed Parameter Errors for RTO Simulations LSR naphtha

FCC gasoline

inadeauate model octane +0.6 RVP -0.3 octane -0.6 RVP +0.3

adeauate model octane +0.1

RVP

-0.1

octane -0.1

RVP

-

3

4

H

-3001

1

2

5

Controller Execution Number Figure 7. Optimizing controller profit trajectory.

$

X

X

--

inadequate

.-.-

*I

I

+0.1

cases a bias update was used as in Figure 1and problem 20, with no filter. The simulation results for the regular gasoline blend are given in Figures 3-7. The results for premium gasoline are similar,and therefore have not been presented. Figures 3 and 4 clearly show that both optimizing controllers adjusted the manipulated variables to quickly and successfully satisfy product quality constraints. In this case, the inadequate model was in violation of both the minimum octane and maximum RVP specificationsfor the first RTO cy.cle. Figure 5 presents the deviation of the feedstock flows from their optimal values, as given in Table 4, for the inadequate model. Note that all flows exhibit offset. The major feature of the solution that the inadequate modelbased optimizing controller produces is that FCC gasoline is dropped from the solution basis and LSR naphtha is

added to the basis. Figure 6 shows that the adequate model-based optimizing controller quickly converges to the optimal solution. Figure 7 presents the profit trajectory for both the adequate and inadequate models. The inadequate model seems to exceed the optimal plant profit during the first control cycle; however, this is due to infeasible operation (see Figures 3 and 4). The adequate model quickly convergesto the optimal plant profit. Careshould be taken in interpreting the results in Figure 7, as model adequacy is not dictated by the ability of the model-based optimization to match the optimal plant profit. Recall that model adequacy is determined by the ability of the model-based optimization system to match the optimal manipulated variable values for the plant. Forbes et al. (1994)present an example of an adequate model-based optimization which does not match the optimal plant profit level. In problem 20 the same feedstock qualities appear in constraints for both the premium and regular gasoline blends; thus the fiied parameters in the quality constraints are not independent of each other and a constraint-byconstraint sensitivity analysis is not possible. However, consider the revised situation where the premium blend is completed,as given in Table 4. The economic optimizing control problem is then reduced to determining the blend for regular gasoline. In this revised subproblem of on-line optimization for only the regular blend, the fixed parameters are now independent of one another and a constraintby-constraint analysis is possible. In order to determine the required accuracy of the feedstock octane and RVP for which the model of the subproblem is point-wise accurate, the method of section 4 can be used and Table 6 presents the results. Thus, for this regular gasoline blending problem, wider variation in the fixed parameters can be tolerated while maintaining model accuracy.

Ind. Eng. Cliem. Res., Vol. 33, No. 8,1994 1927 Table 6. Quality Perturbations (t) in Regular Blend Constraints

octane reformate LSR naphtha n-butane FCC gasoline alkylate

-6.5438 d e I -m 4 c I0.5198 -1.785 I e 4 67.5148 -0.3075 4 c 4 4.1 -18.39 Ie I0.7009

RVP I c 4 10.7417 -0.8533 I c I -61.0 Ic 4 19.05 -8.767 I c 4 0.4961 -1.116 d c I -a

6. Conclusions

The common model-based optimizing controller with “bias” updating can be a successful tool for solving the “non-square”, steady-state, economic optimizing control problem. However, care must be taken in order to ensure a successful implementation. Particular attention must be paid to expected errors in the fixed model parameters, since these can dictate the ability of the optimizing controller to find the plant optimum. Design-phase techniques have been presented for determining whether a model-based optimizing controller, with errors in the fixed model parameters and which uses bias update, can recognize the plant optimum. The accuracy tests developed in this paper are point-wise (local) and must be performed at each design point and possible active constraint set. Although such testing may require a considerable number of calculations, these are performed during the design of an optimizing controller and thus are tractable. These testing methods have been used to determine the maximum permissible range of fixed parameter errors throughout which the optimizing controller will be guaranteed to successfully recognize the plant optimum. When the bias update method is found to be unsuitable for use within a particular optimizing controller application, other forms of model update must be considered. Krishnan (1990)and Chen and Joseph (1987)use past process data to update model parameters in their twophase approach. Roberta (1979)showed that the interaction between model updating and model-based optimization must be considered in any model-based optimizing controller design. Roberts’ (1979) modified two-step method integrates the parameter estimation and modelbased optimization problems, which when combined with some process excitation may overcome modeling deficiencies. Golden and Ydstie (1989)also present an integrated model updatelmodel-based optimization method which requires persistent process excitation. Thus, these update methods are much more complex than bias updating and may require a nonlinear optimization in the real-time parameter estimation step. Such nonlinear parameter estimation problems could require intensive computation and result in unreliable convergence. This situation results in a desire by practitioners to use the bias update method where possible. Further, methods such as the two-phase approach (Chen and Joseph, 1987) also require testing procedures to determine their adequacy and accuracy. The ideas presented in this paper have been framed as design considerations and are important to the eventual success of an optimizing controller. However, the model accuracy methods could also be used for periodic, realtime monitoring of the “robustness” of the optimizing controller to occasional changes in the process economics, the fixed parameters (a),and the active constraint set. The methods presented here are well suited for such “robustness” monitoring, since the optimal values of the manipulated variables and the associated active set would be available in real time from the results of the optimizing controller calculations.

Nomenclature Symbols A = Jacobian of active constraints B = space of permissible adjustable parameter values ci = cost of feedstocks in gasoline blending problem Dj = product demand limits in gasoline blending problem E = matrix containing fixed parameter variations in decomposition of perturbations to A Fij = flow rate of feedstock i to product j in gasoline blending problem F(z) = fiiter matrix used in Appendix B f = process model equations g = process operating constraints P = performance function pj = product pricing for gasoline blending problem Qi= feedstock qualities in gasoline blending problem Ri = feedstock availability limits in gasoline blending problem Sj = product quality limits in gasoline blending problem V = matrix assigning position of parameter variations in decomposition of perturbations to A v = vector assigning row position in rank one decomposition of perturbations to A u = dependent process variables x = independent or manipulated variables Z = matrix containing basis vectors for the null space of the equality constraint set Jacobian z = forward shift operator a = fixed model parameter vector = adjustable model parameter vectors X = Lagrange multiplier vector t = vector containingfixed parameter perturbation in a single constraint of A 0,= reduced gradient operator Subscripts A = active I = inactive i = feedstock index for gasoline blending problem j = product index for gasoline blending problem k = iteration index 1 = lower limit m = model p = plant u = upper limit Superscripts T = matrix transpose * = values at the process optimum = values predicted by model

-

Appendix A Model Adequacy Derivations Given the optimization problem 2,the reduced gradients of the profit function and the active operating constraints can be expressed using the methods of Gill et al. (1981) as

where Z is a matrix containing the set of vectors which form a basis for the null space of the Jacobian of the equality constraint set. Specifically, for a set of nonlinear model equations,

f(x,u,a)the matrix Z must satisfy

=0

(23)

1928 Ind. Eng. Chem. Res., Vol. 33, No. 8, 1994

[V,f V , f l Z = O

(24)

v p - XTVrgA = 0

(25)

which define X in the reduced space as a function of x alone. The optimality conditions further require that the Lagrange multipliers associated with the inequality constraints be nonnegative or

This difference equation will converge as k the filter is designed such that

where X is defined in eq 25. Finally, any candidate optimal values for the variables also must be feasible:

gA(x,u,a)- @2,A = 0

-

(34) providing

IIG(z)(I- Am-1Ap)l12