Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue...

113
University of Alberta Real-Tome Optirniration of Gasoline Blending with Uncertain Parameters BY Dayadeep S. Monder A thesis submitted to the Faculty of Graduate Studies and Research in partial fulfillment of the requirements for the degree of Master of Science Department of Chernical and Materials Engineering Edmonton, Alberta Spring 2001

Transcript of Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue...

Page 1: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

University of Alberta

Real-Tome Optirniration of Gasoline Blending with Uncertain Parameters

BY

Dayadeep S. Monder

A thesis submitted to the Faculty of Graduate Studies and Research in partial fulfillment of the requirements for the degree of Master of Science

Department of Chernical and Materials Engineering

Edmonton, Alberta

Spring 2001

Page 2: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

National Library ofCanada

Bnbliotheque nat ide du Canada

Acquisitions and Acquisitions et Bbiiographic Services seMces bibbgraphiques

The author has granted a non- exclusive licence allowing the National L i i of Canada to reproduce, loan, distriiute or seil copies of diis thesis in microfonn, paper or electronic formats.

The author retains ownership of the copyright in this thesis. Neither the thesis nor substantid extracts fiom it may be printed or othenvise reproduced without the author's permission.

L'auteur a accorde une Licence non exciusive permettant à la Bibliothèque nationale du Canada de reproduire, prêter, distriiuer ou vendre des copies de cette thèse sous la forme de microfiche/nIm, de reproduction sur papier ou sur format dectronique.

L'auteur conserve la propriété du droit d'auteur qui protège cette thèse. Ni la thèse ni des extraits substantieIs de celle-ci ne doivent ê e imprimés ou autrement reproduits sans son autorisation.

Page 3: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

"In these matters, the only certainty is that nothing is certain." P h y the Elder

"Piediction is difEcult, especiaily of the future ..." Ni& Bohr

Page 4: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

To my parents

Page 5: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Acknowledgement s

Foremost, I would like to thank my parents for all that they have aven to me, ami for granting me the fieedorn to explore on my own. For helping me through this work and for his extraordinary support, patience, and sage advice, 1 am grateful to my supervisor, Dr. J. Raser Forbes.

1 believe that I have been blessed with some of the best friends a person can hope for. My eternal gratitude goes out to the ones that were with me, in thought and in person, during my stay at U of A. Fkom my good buddies h m bsdr home: Ashish, Gagan, Hameet, Smiksha, Aeshish, Sachin; to the new ones 1 made in Edmonton: Fbhit, Arun, Indra, Sonia, Gurinder, Al (pu are 90reIy mi&, dude), Andru, Nikhil, Laksh, and Aseema.

I would lüce to thank the entire CPC Group at U of A for welcoming me into theh midst and for tolerating me as long as they have. 1 would also like to express my gratitude to people at my m e n t place of employment: Mark, Ling, Julie, Dave, Benny and James, for their support and encouragement during the final stmggfe. To all the people I have missed here, borrowing f om one of my favourite bands: T o u know who you are. Take a bow."

Page 6: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Abstract

Gesoline is a key revenue generator for the petr01eum rehing industry. Typically,

bknd recipes are determined such that property spdcations (e.g. Octane Num-

ber, vapour pressure, etc.) are met while maWniPng the profitability of the blend.

Lower lwel process contr01lers enforce these blend recipes, aisuring that the prop

erty specihtions are met and quality giveaway is minimïzed, while compemating

for disturbances and plant/model mismatch.

None of the ment blending Real-Time Optimization (RTû) approaches treat un-

certainty in the constraint parameters (feedstock qualities, etc.) àirectly. As shown

by Singh et al. [1996], varying constraint parameters can cause the calculation of

infeasible solutions, if the expected values of the parameters are used. In this work,

methods are pioposeci to explicitly indude constraint parameter mcertainty in the

dynamic formulations of the Gasoline Blending Optimization problem. These new

formulations borrow from a branch of Stochastic Programming (SP) called Proba-

büistic Progrrimming (PP). The performance of the proposed SP based optimizers

is compared with that of conventional blending optiminers. This thesis thus pro-

vides a new approach to solving the Gasoiine Blending Optimization problem, which

explicitly indudes uncertainty information in the problem formulation.

Page 7: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined
Page 8: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

. . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Non-Linear Model 33 . . . . . . . . . . . . . . . . . . . . 3.2 Uncertainty in Gasoline Blending 34

. . . . . . . . 3.3 Blending Optimizers for Uncertain Feeàstock Quaiities 37 . . . . . . . . . . . . . 3.3.1 GBO using ProbabWc Programming 37

3.3.2 Probabüistic ProgrBmmjng for Non-Linear Blending Model . . 40 3.3.3 Probabilistic Programming for Dynamic Blending . . . . . . . 43

3.4 sllmmq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * . 47

4 Blending Optimization Case Study 48 . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Case Shidy D d p t i o n 49

4.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 . . . . . . . . . . . . . . . . . . 4.2.1 Time Horizon RTO - Ideal case 53

. . . . . . . . . . . . . 4.2.2 Linear Programming k Bias Updating 55 4.2.3 TirneHorizon RTO - Deterministic constraints . . . . . . . . . 58

. . . . . . . . . . . . 4.2.4 Tiô.Horizon EtïO - Chance constraints 59 4.2.5 Feasibility Horizon ElTO - Deterministic constraints . . . . . . 61

. . . . . . . . . 4.2.6 Feasibiliv Horizon RTO - Chance constraints 63 4.3 Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

4.3.1 Computational Issues . . . . . . . . . . . . . . . . . . . . . . . 69

5 Conchsions and hture Work

Bibliography 75

A List of Symbols 79

B Interpretation of CCP 81

C Bounding joint probabilities 82

C.1 kmmbound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.2 Upper bound . . 84

D Linearhation of the Ethyl model 85 D.1 TheRONconstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 D.2 TheMONconstraint . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

E Non-aseociativity of Ethyl EËr-70 modals 86

F Feedstock quality prediction error variance 87

Page 9: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

G Lagrange multipliers for THRTO - Ideal case 90

H Additional results for Fsesibility Horizon RTO forms 92

1 Demand over Blend Tirne-Horizon RTO R.esuits 100

1.1 Ideal Case (all feedstock qualifies known) . . . . . . . . . . . . . . . . 100 1.2 Det m c Constraints . . . . . . . . . . . . . . . . . . . . . . . . 101 1.3 Probabiiic Constraints . . . . . . . . . . . . . . . . . . . . . . . . . 101

Page 10: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

List of Tables

4.4 Standard deviations of the uncertain feedstock q d t i e s and aMoaated measurernent noise with the feedstock qualiw sensors . . . . . . . . .

4.5 Results for the THRTO (Ideal case) algorithm . . . . . . . . . . . . . 4.6 Results for the LP + bias updating (nominal feed qualities) algorithm 4.7 Results for the LP + bias updating measured feed qdt ies ) algorithm 4.8 Results for the THRTO (deterministic constraints) algorithm . . . . . 4.9 Results for the THRT.0 (chance canstraints) algorithm . . . . . . . .

. . . . . 4.10 Results for the FNRTO (deterministic comtraints) algorithm . . . . . . . . . 4.11 Results for û-step ahead FHIYTO (chance constraints)

4.12 R d t s for all IYTO formulations in the gasoline blending cace shidy . 4.13 Worst case computation times for the IiTO formulations used . . . .

H.l Mts for 1-step ahead Feasibility Horizon ElTO (deterministic con- straints) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

H.2 Results for Zstep ahead FessbiIiity Horizon FtïO (determiaistic con- maints) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

H.3 Results for bstep ahead Feasibility Horizon R ï 0 (deterministic con- straints) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

H.4 Results for 1-step ahead FEIIYTO (chance constraints) . . . . . . . . . H.5 Results for 2-step ahead FHRTO (chance constraints) . . . . . . . . . H.6 Results for M e p ahead F m 0 (chance constraints) . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Blend demand over day . . . . . . . . . . . . . . . . . . . . . 1.2 Blenddemandovereachintentsl

. . . . . . . . . . . . . 1.3 Results for the THRTO (Ideal case) algorithm . . . . . 1.4 Results for the (deterministic c o ~ a i n t s ) algorithm

1.5 Results for the TBFU'O (chance constraints) algorithm . . . . . . . .

100 LOO 100 101 101

Page 11: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

List of Figures

RTO Components and St~cture WaIeigh. 19981 . . . . . . . . . . . . Flow Diagram for a typical Refinery (gasoline feedstocks in bold) [Singh. 19971 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gwline Blending Stmctue . . . . . . . . . . . . . . . . . . . . .

Illustration of uncertainty in objective function (cost data) . . . . . . Illustration of uncertainty in constraint parameters 1: Uncertain RHS Illustration of uncertainty in constraint parameters II: Uncertain LHS coefEicients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Propagation of feedstock quality disturbances through the gasoline blender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Gwline Blending Flow Diagram . . . . . . . . . . . . . . . . . . . . Results for benchmark algorithm (all qualities known): regular . . . . Results for benchmark (all qualities known) case: premium . . . . . . Results for LP + bias updating with nominal feedstock quaüties: regular Results for LP + bias updating with nominal feedstock qualities: pre- mi um . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . LP + bias updating using measured feed qualities: regdm grade

LP + bias updating with measured feedstock qualities: premium grade Results fiom Time-Horizon EYTO algorithm: regular . . . . . . . . . . M t s from T m 0 a l g o r i h premium . . . . . . . . . . . . . . .

. . . . . 4.10 Mts from chance constrained =O algorithm: regular 4.11 rtesults from chance cotistrained THRTO dgorithm: premium . . . . 4.12 Feasible over Current Intend FU0 algorithm: reguiar . . . . . . . . 4.13 Feasible mer Current Interval FU0 algorith premium . . . . . . . 4.14 Results using chance constrained û-step ahead FTEtTO algorithm: reg-

ular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 12: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Ftedts using chance constrained 0-step ahead FHRTO algorithm: pre- m i u m * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Performance (profit/blend) cornparison between LP + bias updating aigorithms and the benchmark algorithm . . . . . . . . . . . . . . . . Profit profile8 for TIIIiTO algorithm . . . . . . . . . . . . . . . . . . Profit profiles for F e b l e over Current Intemai s l g o r i h . . . . . . Bounding joint probabilities . . . . . . . . . . . . . . . . . . . . . . .

Time Horizon fYT0 - Ideal case; Lagrange multipliers for blend quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m-aints

T h e Horizon RTO - Ideal case; Lagrange mdtipiiers for blend demand co-ain ts.................................

Qualiv and amount blended profiles for 1-step ahead Feasibility Hori- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . zon RTO; regular

Quaüty and amount blended profiles for 1-step ahead FeaSibility Hori- . . . . . . . . . . . . . . . . . . . . . . . . . . . . zon RTO; premium

Quality and amount blended profiles for Zstep ahead F'eaaibiliw Hori- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . zon RTO; repuiar

Quality and amount blended profile for Zstep ahead Feasibility Hori- . . . . . . . . . . . . . . . . . . . . . . . . . . . . zon RTO; premium

Quality and amount blended profiles for bstep ahead Feasibiliv Hori- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . zon RTO; regular

Quality and amount blended profiles for M e p Bhead Feasibiliw Hori- . . . . . . . . . . . . . . . . . . . . . . . . . . . . zon RTU; premium

Qudity and amount blendeà profiles for l-step aheaà flexible Chance . . . . . . . . . . . . . . . . . . . . Constrained THF?TO; regular ..

Qudity and amout blended profiles for 1-step ahead flexible Chance . . . . . . . . . . . . . . . . . . . . . Constrained =O; premium

Quality and amount blended profiles for 2-step ahead flexible Chance . . . . . . . . . . . . . . . . . . . . CoIlStTained =O; regulm . .

H.10 Qdity and amount blended profiles for 2-step ahead flexible Chance . . . . . . . . . . . . . . . . . . . . . Constrained =O; premium

H.11 Quaüty and amount blended profiles for 3-step ahead flexible Chance . . . . . . . . . . . . . . . . . . . . . . Constrained THE1TO; regular

H.12 Wty and amount blended pronles for 3-step ahead flexible Chance . . . . . . . . . . . . . . . . . . . . . Constrained THEMTO; premium

Page 13: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Chapter 1

Introduction

Optimization is an integral part of engineering and is used by engineem (both heuris- tically and mathematically) to design new processes/equipment, "improven &sting processes, and to optimize process operations [Edgar and Himmdblau, 19881. Pr* cess Operationa optimisation is essentid if a manufacturer m t s to stay cornpetitive in the industry [White and Hall, 19921. The objective of Process Operations Opti- mization is to determine an opentions policy that optimizes the economic benefit of producing the final product. In most cases, the economically optimal policy is

calculat ed using steady-state optimization of the plant operations [Forbes, 19941. Most steady-state optimiRation methods can be divided into: 1) direct search

based methods; 2) model-based methods [Garcia and Morari, 19811. Direct search methods use on-line plant experimentation to p a t u b the plant to different oper- ating regions and measure the performance index (cost and/or profit for economic optimization) in these regions. Thus, given enough experimentation, a profit d m e cm be mapped over the different possible operating regions. Most direct methods use an iterative policy (continuous experimentation) to rehe this profit d a c e and try always to move the plant to an operating region where the process performance index improves. More recent dwelopments to the direct search methoda have been in identifying dynamic models for the plant h m pro- perturbation and using these to determine economically optimal steady-state moves for the process (e.g., McFar- lane and Bacon, 1989). Howewr, there are some fundamental limitations to the use of aU direct search methods. The amount of plant experimentation invoived can be prohibitive for large sa le plants with many degreea of freedom- Moreover, large tirne constants in these cornplex interconnected units mean that it takes a long time for the units to corne to steady state aRer each eixperiment. Thus, the sheer nilmber of experiments that neeà to be pedormed, and the amount of time required by each expriment, combine to make direct search based methods partidarIy difEicult to

Page 14: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

use for large scale optimization problems. Model-based optimiRation methods represent the process with 8 steady-state or

dynamic mathematical model and use the model to predict optimal operation. Thus, hstead of working directly on the process, these methods use a mathematical approx- imation of the proceas. Optbhation dgorithms are then used to optimize the model and the solution is implemented on the plant ( a h applying certain checks). Most large scale units in the chernical and petrochemical industry are timevarying

in nature. This means that the underlying processes are chmghg all the tirne. This could be due to various reasons: heat exchanger fouling, reactor catalyst decay, feed- stock compositions changes, and so forth. For a time-vsrying process, the emnomi- cally optimal operation conditions are a trajectory in t h e that the plant must follow. Process Optimization stmctures which track these changes in the pro- and solve the optimization problem for the optimal operations policy are known as Real-Time Optimization (RTO) systems or On-line OptirniRem. For largescale industrial im- plementations, the size of the model and the resulting computational Ioad cmently prohibits the use of dynamic process models to calculate the optimal trajectory in real-the. As a r d t , most fLTO qmtems are steady-state, model-based optimization systems which solve the steady-state optimization problem for the process, recUTSively. Thus, the model representing the process must be updated and optimized at a ke quency, which (ideally) keeps pace with the process changes. The process models themselves are an approximation of the physical plant, and thus, have both stnic- tural as w d as psrametric uncertainty associated with them. This uncertainty in model structure and parameters needs to be taken into account in the design of RTO

syst-• Gasoline ie a key revenue generator for the petrooleum refining industry [ DeWitt

et d., 19891. Gesoline blending operations is one of the petroleum r- processes where FtïO systems are used fairly extensively [DeWitt et ul., 1989; Sullivan, 1990; Ramsey and Thesdale, 1990; Bah et ul., 19931. The motivation behind using an RTO system for gmohe blending optimization, is to address the variation in feed- stock qualities and market prke fluctuations. Gasoline blending is one of the fear processes that are f&ly simple to model (essentially no model dynamics) dong with being industnally relevant. Ab, the blending optimization problem has a relatively 1ow number ( typ idy < 100) of decision variables. This maka gasoIine blending o p timization a good candidate to do IlTO studies on. Conventiod gasoline blend opti- &ers do not take uncertainty in the optimization problem parameters into account whüe s01ving for the optimal blend recipes In this thesis, the issue of uncertainty in blending optimization pasameters is considmed and solutiom are offered for the

Page 15: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

unoertain feedstock @tics case.

1.1 Real-Time Optimization (RTO)

The stcuctuxe for a typical steady-state c l d loop Real-T'me Optimisation (CLRTO) grstem is shown in Figure 1.1. The various fLTO subsystems or components: M- surement, Data Validation, Modd Updating, Optimization, Command Conditionhg (also d e d Results A~alysis), and Control, are describeci below.

1.1.1 RTO Components

The Measurements block is the set of sensors used to monitor the process. Process meamrements are used in tum to update the process model in the optimizer, after they have been checked for validity.

Command Plant and Condiüoning ' controllen

Measutements

Figure 1.1: RTO Components and Structure [Raleigh, 19981

The data fiom the rneasu~ement set is examined for sewa l purposes in the Data Validation sub-system. Wlthin tbis subsystem, proces measurements are first mon- itored for the detection of steady-state in the process. The other sub-processes in the Data Validation block include gross emr dettxtion, and data reconciliation. The purpose of this mbqmtam is to ensure that %diablen data is useci in the subsequent Kr0 subsystems.

The didateci, steady-state measurements from the process are used to update the process model nsed for optimizAtion. The model updating mally takes the form of caldation of certain parameters (e-g., heat trader co&ciests, M a t i o n

Page 16: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

tray &ciencies, etc.) in the optimization model. This subqystem is responsib1e for keeping the mode1 current so that process changes are tracked &ecfively.

The Optimizer block is where the stesdygtate optimhtion pmblem, using the updated modd, is solved to generate a f&ble operating point that mdmizes profit (or minimizes cost of operation) at the m e n t h e .

The Optiminer generates setpoints defining the rnodel-based optirml operating point. These setpoint estimates, however, are uncertain due to error propagation through the ElTO loop. Results Analysis ie the process of sramining the optimizer outputs to ensure that the new setpoint estimates actdly represent a significant change in the process before the setpoints are implemented.

The final subsystem in the RTO loop, the Con- sub-gmtem, takes the opti- mizer output in the form of setpoints and imp1ements them on the process to take it to the newly calculated optimum.

1.1.2 Design Issues in RTO

As the Kï0 system is a closed loop system (Figure 1.1), each of the above mentioned sub-systems affects the overall performance of a Real-Time Optimizer. Thus, each component in the loop has to be carefully designed such that the mail process of on-line optimization is s u c c d . The Measurement subsystem is where the overd CLRTO proces begins. The selection of measurements to be used as inputs for the RTO system is very important considering the proces model updates (and aibse- quently the optimization step itself) are dependent upon current information about the plant. Krishnan et al. [1992] propose meaSUTement selection based on minimi7,

hg mom in estimation of model parameters (parameters in the process model which aze updated by the EYTO system to d e c t changes in plant conditions). This a p

proach, howwer, only considers the dects of measurernent selection on the Mode1 Updating subsystem. In another proposed rneamrement dection strategy, Raleigh [1998] bases the selection criteria on ovaall performance of the IYTO system. In the k t stage of this approach, viable measurement sensor sets are identifieci subject to observabiliw criteria for the parameters to be updated. In the second stage, process setpoint qpality and expected profitabüity (deriveci using Design of Experiments t h e ory) are cornbineci into a Sensor System Design Cost (SSDC) criterion, which can be used to compare possible measmement seasor sets. The SSDC criterion is also usefiif in determiring the optimal placement of additional sessors in the process to inmease the ELTO systeds performance.

The Data Validation block takes raw plant data and performs a series of statistical

Page 17: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

tests on it. The first of these is usually &cation thet the plant/pmcess being optimized is at steady state. Steady-state detection [Cao and Rhinehmt, 1995) is nec- before the measurements can be used for updating the steady-state models. If the plaut is experiencing transients, the RTO system uaually goes into a suspended state until the traneients die down. At least one commercial implementation of on-line optimizers, MDC Technology's RT0+ [Hyprotech Ltd., vieweti 24 September, 20001 does not employ steady state detection as part of the Data Validation block.

The other essential steps before the steady-state mea~lz~ements can be wed in model updating are Gross &or Detection [Crowe, 1988; Tong and Crowe, 1997, Kelly, 19991, and Data Reconciliation [Tjoe and Biegler, 1990, Crowe, 19961. G 1 m h o r Detection involves identifying and removing gr- mors (e-g., readjngs from fded senson) while Data Reconciliation tries to ensure that the correcteci measurements satisfy the material and energy balances around and inside the process. Both the above sub-processes depend h d y on redundancy in the input process measuiements to isolate faulty measurements and reconcile curent plant information passeci on to the Model Updating subsystem.

Selection of appropriate models to represent the plant in model based on-line optimization systems is one of the first RT0 design decisiors made. It was shown by Biegler et al. [1985], that a model is adequate for optimization if gradients of the model's objective function with respect to the decision variables can be made to match those of the plant. This requirement was r e l d by F'orbes et id. [1994] by showing that only the reduced gradients of the objective function [Fletcher, 19871 need to be matched to those of the plant at the optimum. Model fidelity in the context of an RT0 system is dependent upon both the model structure as well as the selection of parameters to be updated. Model adequacy requirements that take these into consideration for a closed loop FtTO system are discussed by Forbes [1994]. The problem of selecting suitable parameters to be updated in the model(s) used has ais0 been looked at ày researchers. Updating parameters that have the most dect on the profit function and/or change the active coI1stlraint set is mggesteci by Krishnan et al. [1992]. An alternate, more direct approach [Forbes, 19941, is to use Model Adequacy conditions to choose updated model parameters. That is, if a set of parameters exists which can be mmipulated such that the model optimum coincides with the plant optimum, this set of paremetas should be updated onüne. Another important model paraxneter updating issue is the observabiliw -811, 19901 and the degree of observabüity [ S i , 19971 of the updated parameters kom the selected rneasurements set. The choice of the so1ution sigorithm used in the actual parameter estimation also plays a major role in nM) performance. A mbust estimation scheme

Page 18: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

is essedial due to the nature of the àata (a single set of data comipted with sensor mors) being operateci upon. Raleigh (19981 proposes the use of more robust least- squares based solution algorithm instead of the conventional (less computationdy expensive) back-substitution algorithnu.

The core sub-system in the RTO loop is the opthber itself. Two important f8Ctors Muencing the choice of an algorithm in the optimizer subsystem are: a) ability to incorporate the process model chosen for the plant into the formulation of the optimization problem, b) cornputational tractabiüty Le., the abüity to solve the optimization problem posed in a reasonable amount of time. Optimization theory / Operations Research is an important branch in mathematics that has been studied sctezlsively both by theoretical mathematicians and by engineers e.g., Edgar and Himmelblau [1988]; Gill et al. (19811; Avriel [1976]; Wfight [1997].

Before the setpoints genaated by s01ving the proces optimization problem can be implemented by the control system in the plant, the optimizer solution goea through

the Command Conditioning or R d t s Analysis sub-system. This post optimaüty statistical andysia is done to check if the process moves dictated by the optimizer solution are in fact worthwhîle. The optimizer results are implernented if the sta-

tistical tests suggest that the Merence in the optimum of the plant and the model is significant and is not due to assortecl errors propagated through the RT0 loop [Miletic and Mmh, 1998; Zhang et al., 2000].

Although each ELTO sub-system is designed to meet specific requirements for itself and subsystems dependent upon it, sdection of an EYTO design to be implemented should dtimately be dependent on expected performance of the FIT0 system. One of the first design approaches using this philosophy was the Design Cost approach by Forbes and Marlin (1993, 19961 to model-based optimization system design. The Design Cost method evaluates the cost (profit lost with respect to p e r f e optimiz* tion) of an FtïO design by combining the coBts of setpoint bias and variance when implemented. This method was enbanced (Extendeci Design Cost or EDC) by Zhang and Forbes [2000] to indude the cost incurred while the process is in transition fiom one process optimum to mother. Another approach that considers the complete RTO loop in making IlTO design decisions is the method of average deviation fkom opti- mum proposed by de Hclnnin (19941 and extended by Loeblein [1997]. This approach comists of mapping the diffexent error sources (measurement errors, modelling mors, etc.) in an EiTO loop through the parameter update and optimization sub-systems to examine their effect on the performance of an RTO design. An analytid expression is derived for the average deviation from the true optimum for an on-line opthher by integratîng the deviation fiom tme optimum over the various ezmr s0ut:ces. This

Page 19: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

average deviation from optimum is then computed and compsred for the available IlTO d e s i p to select the m& profitable scheme.

In this section, on-he or r d time optimization was introduced. In the next section of this chapter, the process of primary focus in this study, gasoline blending, is introduced.

1.2 Gasoline Blending

Gssoline is p r o d d by blending different streams fiom vaxiow upstream processes. Any grade of gasoline shouid be in the correct b o a range (100 to 4000F, [Gary and Handwerk, 19941). This repuirement restricts the choice of stremns (boiling fraction cuts) that can be used as gasoline blend feedstocks igue 1.2). Despite this restriction, some refineries can have up to 20 different gasoline blending feeàstocks [Givens, 19851. The main feedstocks used are:

1. Light Straight Run naphtha or LSR, which is the gasoline boiling range cut from the atmospherïc distillation tower.

2. Catalytic cracker gasoline (te., the gasoline cut from the fluidized catalytic cracking unit or FCCU).

3. Reformate, the gasoline from the catalytic reforming unit.

4. AUcylate, the gasoline nit fiom the liquid catalyzed alkylation unit.

5. n-Butane, normal butane from various processes including the cmde atm= spheric tower, FCCU, etc.

6. 'Hydromackate', the gasoline fraction from the hyckocracker.

In this work only the fht five will be considered as the feedstocks available. Each grade of gasoline has to have certain pmpaties in order to meet s p d c a -

tions. Some of the most important ones are described hem Octane Number is an indicator of the fuel's anti-knock properties. There are

two measures generdy used: Research Octane Number (RON), and Motor Octane Number (MON). The higher the octane number, the better the gasoline's anti-knock capability and the smoother the engine nuis.

Reid Vapor Pressure (RVP) is a measure of the volatiliv of the fuel. The gasoline hss to be volatile enough to vaporize on injection bto the combustion cham- ber. At the same t h e it being excessively volatile could lead to vapor-lock in the fuel

Page 20: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Light Cycb Oil .

V a c u ~ i G u O i l CaQiYric Cnide crackhg *Clh&dC CU. oiI

I b H c w Cycle

Figure 1.2: Flow Diagram for a typical Rehery (gasobe feedstocks in bold) [Singh, 19971

he. Environmental regulations also Iixrtit the maximum R W to reduce emi.esions of volatile organic cornpounds (VOC).

Gasoline is a mixture of hydrocarbons with a range of different boüing points. To better characterize gasoline volatility, a standard laboratory batch distillation is performed. Diiring this batch &stillation, amount àistiiled (percent volume basis) to a given temperature is r n m e d . Using several points dong the temperature scale, the ASTM Distillation curve, is generated. This test is known es the ASTM D-86.

Total Aromatics Content (benzene, tduene, etc.), and Sulphur Content in motor gasoline is also regulated due to enviro~l~~lentd conwrns (vehicular emissions).

Although this thesis considers only the first three gasoline puaiities mentioned above (RON, MON and RVP), for illustrative purposes, the methods presented here are general and can be essily extended to include all sp&cations on blended gaso-

lines.

Page 21: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Issues in gasoline blending and real-tirne optimization were considered separately in the previous sections. In the next sedion, ItTO techniques and formulations used

in on-line optïmhtion of gasoline blending are deamibecl.

1.3 RTO in Gasoline Blending

The huge volume of gaaoline production implies that a small saving in the cost of production per unit can lead to a large incresse in the total profit [Grmdidier, 19973. &O, any beneh hom improved control/opti~~ization of processes upstream WU be useless if the final blending step is "sub-optimd". mese facts make on-line optimiza- tion of gasoline blending a very attractive proposition.

Final Blended Qualities

Figure 1.3: Gasoline Blending ELTO Structure

In this section, the various conventional gasoline blending RTO structures in nir- rent use are desmibed bridy. The disünguishing featurea and shortcomings of these optimizers are discussed. Some of the comxnerually available blend controliers and optimizers are ais0 discussed briefiy.

The generd bIending optimization problem (Roblem 1.1 below) consists of max- imhing an economic measure ( d y profit) while ensuring that dl the property spdcation, product demand and feedstock avaitability coIlStraints are met.

Page 22: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

max X

svbject to: blend properties(Q, x) 1 speu f idions p o d u d p~aluced(x) 2 product denutnd f eedstock used(x) 5 f eedstock availability

where: c is the vector containhg price information for the feedstocks and the final bleds, x is the flow-rate vector of the blend feedstocks and Q is the matrix containing property information for the feedstodrs.

1.3.1 LP + Bias

The simplest RTO s t ~ c t u r e used in gasoline blendiag is a variation on the Linear Progremming (LP) approach. A Linear Program (Gill et d., 1981) is one of the sim- plest mathematical optimization formulations where both the objective function and the constraints are Iinear in the decision parameters (x in Problem 1.2). Known 8s

the L P + bia9 (Linear Progrnmming with bias updating) form [Singh, 19971, this for- mulation reduces the gasoline blending optimization problem to the following Linear Program, which is solved at each FtTO interd

subjeet to: i jx s (lTx)s - p H X l p

where: p is the s e h g price of the blended gasoline, c is the vector of cost prices of feedstocks, x the flow-rate vector of feedstocks, 4 the qualïty matrix containing the feedstodc quality blmding indices, s is the vector containing blend quality specifica- tions, p the vector of bias tams used to update the blending model to maintain its accuracy, H is the ma- for dexnand and aV8ilab'iIity coflstraints, p the vector of demands and adabiiities, and 1 is a col- veetor of ones, [ 1 1 ... 1 ] =.

W the properties considered above (RON, MON, RVP) blend non-linearly (i. e., the final RON of the blend will not usually be the volumetric average of the RONs of the feglstoclcs). There are many empmcal and semi-empmcal n0n-lllea.r modets available in literature ([HeaIy et d., 19591 , [Stewart 1959a,b] , Morris et al., 19941 , [Ru& et al., 19811 , ~ 8 z ~ u e s - ~ a g o z a et oL 19921, etc.) whîch d d b e property blendhg, but they C E L I ~ I ~ O ~ be ased if the pmbIem is to be formulateci as a linear program. As a result, simpler, linear blending models are used in which the actusl

Page 23: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

properties are transformecl into blending indices whose volumetric average gives us the blended properties. These trdormed qualities: biending RON, blending MON, and Reid Vapor Pressure Blending Indices are oontained in the matrix a. The bias vector, @ is the Merence between the actual qualities and the predicted qualities at the previous FtïO interval:

@ = (mea~uted blend qualities - predicted blend qualities) x ( 1 * ~ ~ - ~ ) (1.3)

The bias updating structure is one of the Bimplest model updating strategies used

in Model Predictive Control (MPC) structures [Garcia et d., 19891 and Real-Time Optimization systems [ B r d m and Zhao, 19881. The vector of adjustable param- eters, p (the model update term), is expected to keep the blending model current such that the model SUfficiently represents the blending pro- with the changing feedstock qualities. The purpose of model updating, as explainecl bridy in 51.1, is to

ensure that the optimization of the updated model pives the tnie process optimum. It has been shown that the bias updating structure will not necessarily iterate to the true optimum in the presence of disturbances in the constraint paremeters (feed- stock qualities), [Forbes and Marlin, 19941. Thus, the LP + bias approach is not an appropriate approach for gasoline blending optimization.

1.3.2 NLP + Bias

The LP + bias fonn has structural mismatch, because the linear constraints use approximations of the nonlinear blending models. To remove the stmctural model mismatch, while retaining the simplicity of the bias updating strategy, the Non-Linear Programming with bias updating (NLP + bias) form is sometimes used Non-Lineu Programming is a more general form of mathematical optimization where both the objective function and the constraints can be non-linear functions of the decision variables (Edgar and Himmelbiau, 1988; Gill et al., 1981). In this fondation, more accurate non-linear blending models are used (cg., Ethyl IM:-70 for octana blending [Hedy et d, 1959]), thus improving the reliabiity and performance of the blend optimizer. Mathematically, the NLP + bias structure is fomdated as:

Page 24: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

where: Q is the quality matrix containing the feedsfock qudïties, and g is the vector of nonlinear functions in the property spedication m ~ a i n t s .

In this blend optimization aigorith, the geometry of the tnie process is more eccurately represented than in the LP + bias case. Huwever, the problem of time- varying blend feedstock qmbties is not tackled directly by the bias model updating strategy. The aigorithm above is based on the current/norninal operating conditioas and thus, only opümizes over the curreat FU0 intexval. Besides, by treating the feedstock qualities as 6(ed parameters in the quality constraints, no sttempt is made to account for future trends in timevarying parameters. Neither does the NLP + bias approach look at the qualïties of the blended pool produced so far whiie ealculating the m e n t feedstock fim.

As seen above, the bias update model structure does not adequately adàress the issue of stochastic disturbances in the feeàstock qualities. This is due to the fact that the feedstock qualities are treated as h e d parameters in the optimiser while they vary in the actual blending process.

Gasoline is usually blended in batches over a specified length of time. If perfect knowledge of the qualities is given over the length of the blend, an ideal optimizer can be designed [Singh, 19971 that operates the blender in the most profitable manner while ensuring that the blend quality specifications are met at the end of the blend. Even though knowledge of fuhue feed qualities is not possible, past values can be used to predict these future qualities and the predictions can be used to calculate feedstock flmates required to meet quaüty specifications. In the TheHorizon EYTO (THFtïO) proposed by Singh [1997], future disturbmces are predicted over the blend length and future control moves calculated that also consider the properties and amount of gasoline blended up until that point. The feedstock flownrtes (control moves) calculated for the m e n t tirne i n t d are then implemented. This principle of prediction and opthkation to caldate the future m m with ody the cment feedstock flows (recipe) being actually impIemented, ia known as receding horizon control and is used extensively in Mode1 Predictive Control [Garcia et d, 19891. A key Merence between MPC and TuneBorizon Real-he Optimîzation (THELTO) proposed by Singh [1997] is that d e MPC, only the prediction horizon is user tunable in the THRTO, whüe the control (optidzation) horizon is fixed as the Iength of time left to the completion of the blend.

The mathematicai representation of the Tirne-Horizon blend optimizer is given as:

Page 25: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

subject to:

where: xt is the feedstock flowrate vector at t h e t, Qt is the matrix of predicted feedstock properties (uncertain) at time interval t, t , is the initial blend time (when blending starts), t, is the present tirne (when the op tWer runs), At is the time interval between consecutive RTO executions and t, is the ha1 blend time (blending done). In this formulation, it is ~ssumed that the feed properties rem& constant over w q FIT0 interval (e-g., t, to hl).

The objective hinction to be rnmdmized in Problem 1.5 is the total profit over

the blend horizon. The first constraint represents the satisfaction of the quality comtraints at the end of the blend, whiie the second constraint states that the m e n t recipe must also be within specifications. In the event of blending being hdted before the scbeduled end of blend, the second constraint reduces the possibili@ of the gasoline blended so far being off-specification. The final constraint is the condition that the demand and availabiüty coflstraints are satisfied over the blend.

1.3.4 Commercial Packages

There are a number of software packages amilable commercially for gasoline blending scheduling and control [Anonymow, 19971. AU of these packages attempt to integrate blend scheduiing and blend optimisation. They do this by sequencing the blends and then trying to enforce the scheduled recipes wbiie m h h k h g giveaway. Many of theae p-es claim to use non-linear progrmmhg (mP) techniques in the Blend Optimizer. However, for most of than the non-linear part is probably a quaciratic term in the objective function pc*iakhg deviation fiom scheduled recipe, while the property constraints are linetc As shmn in Singh [Igg'?], using linear blending models can lead to major losses in performance for the on-line optimizer. Also, in none of the

software packages is uncertainty in any of the parsmeters in the blending optimization problem taken into 8cçount. There are some vendors who use more accurate non- h e m blending models and Near Ma-Red (NIR) analvers [Anonymous, 19971 to

Page 26: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

update the blendeci andlor feedstock qdties in the model, but none of them t&es the uncertaïnty in or reliabiity of the mea~u~ements into account.

1.3.5 Discussion of A d a b l e Methods

As seen in sections 1.3.1 and 1.3.2, problemr, such as plant/model structural mismatch (for LP + bias) and distuIb811ces in feedstock qdties (both LP + bias and NLP + bias assume constant feedstock quslities) are not handled by the gasoline blending optimization approaches based on bias updating.

The constant feed qualities m p t i o n is valid only if the blending is done out of well k e d , standing feedstock tanks. These days many reheries are using running tanks i e . , fresh feedstock is being pumped into the tank from the upstream procens even as feedstock is being withdrawn kom the tank for blending. This is done in an dort to reduce coats by mhbbhg inventories. As feedstock puaiities are dependent on the process conditions in the unit they are coming fiom, the qualities/properties of these streams change with changing upstream pro- operations. Thus, feedstock qualities are timevarying and stochastic in charecter and, change continuously with upstream operation changes. To cornphte matters further, d qu* measwements (for feedstocks as wd as final blends) are subject to measu~ement noise. Using the LP (or NLP) formulations with bias updating, while assuming the qualities to be constant at given expected values, can give setpoints for the feedstock flow-rates that may violate one or more of the spedkation constraints. Cornraint violation in actual industrial blenders is usually avoided by using conetraint controllers below the blending ElTO system. The objective of these mntro11ers is to minimiae quality

giwaway and deviation fiom blend recipes (passed dom fiom the RTO) while trying to ensure that the quality constraints are not violateci. Thus, when the blender starts to produce off-specification blends, the mnstraint controller deviates kom the "optimaln recipe to make the blend on-specification* The recipe implernented might not deviate from the "optimaln recipe in the most economic m e r and makes the

final blend less profitable. The coerts of most of the gasoline f-ocks are not k n m with certainv. This

is tme especially of those feedstocks that are not sold as such and are refinery in- termediste producta (e.g., FCCU Gasoline) which are used as feedstocks for final products that are aold. These feedstock costs are decided based on some heuristics by the rehery scheduünp department. In some situations the daund for the blends and/or avaüabüity of the feedstocks may change whüe the biending is under way.

This t r d a t e s to unerbinty in these! parameters. Therefore, a l q r pmblem &er-

Page 27: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

ies face is formulating the blending optimization and contr01 problem such that the mcertainty in the all the above rnentioned parameters has the least possible e t on the optimFllity of the solution, and does not cause the 0ptiniil.e~ to generate infeasible solutions.

1.4 Thesis Objectives and Scope

This thesis is concemed with the design of the EtTO layer in a Gasohe Blending Con- trol system. As discussed in the previous sections, the RTO layer in current blend controllers is unable to hande stochastic disturbances in the feedstock qualities satis factorily. To minimire blending of off-specification gasoline, most industrial blenders accept some product qU81ity give-away [Grosdidier, 19971. Current prLICtiSe is to blend to targets which ex& specifications for the more critical qiurlities (e.g., octane, RVP, etc.) by some arbitrarily decided amount ['hiber et d., 19981. The main objective of this thesis is to design an KïO based blend optimizer that àirectly incorporates parametric uncertainty, and can efktively hande stochsstic disturbances in blend feedstock qualities. Such a blend optimizer would thus be a systematic method to calculate the most economically effective rnanner to exceed specifications or provide an acceptable probability of feasibility.

Stochastic Progranunhg is the branch of Mathematical Programming concernecl with optimization problems that have uncertain parmeters. A brief introduction to Stochastic Programming is given at the beginning of Chapter 2. In the Gasoline Blending Optimization Problem, all mode1 paramet ers: economic, property data, de- mand/availability, are uncertain to some degree. The scope of this thesis is Mted to developing strategies to deal with utlcertainw in gmline feedstock qualities (con- straint parameters in blending opthkation) only. To this end, Vanous Stochastic Programming methods that deal with uncertainty in constraint parameters in opti- mization problems are reviwed. Solution techniques for solving these problem for- mulations that incorporate uflcertainty information direct1y are discussed. The suie

ability of these different techniques for hplementation in a R d - t h e Optimization system is then examineci. Basecl on the above-rnentioned discussions, the Stochastic ProgrBmming formulations used in this thesis for Gamline Blending Opthnization are decided upon.

The discussion on the Gwline Blending Optimization problem is continueci in Chapter 3. Blending modds wtually used in this work are describeci. Uncertsinty issues in g w h e bIading, espeùally uncertainty in feedstock qualities, are examinai

in more detail. This is followed by development of algorithms for gasaline b lende

Page 28: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

optimization that dizectiy incorporate parametric uncertainty in the blending model coIlStraints. Chapter 4 develops the case study used to dernonstrate the &ectiveness

of the proposed algorithms in dealing with stwhastic disturbances in gasoline feed- stock @tics. The r d t s of the case study are then presented and the performance of the different optimizers is compare& Chapter 5 makes some conclusions as to the &ectiveness of the strategiea exnployed to deal with parametric uncertain@ in gasoline blending optimization. Some impEcatio118 for the wider area of Real-Tirne ûptimization are discussed and possible future àirections of reaearch are cansidered.

The Stochastic Programming formulations used in this thesis are applicable to any optimization problems, on-line or off-line, where some optimization parameters are not hoam with complete certain@

Page 29: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Chapter 2

Stochastic Prograrnming for Uncertain Constraint Paramet ers

"Stochastic Pmgmmming handles mothematicol pmgmmming pmblems when some of

the parometers are mndonz vufiables . .. " [Prekopa, 19951 is one of the simpler defini- tions given for Stochastic Programming (SP). Stochastic Programming or Stochastic Optirnization came into being in the mid 1950s' [Dantzig, 19551. The field was born when people 6rst started to thhk about what to do in case some of the parameters in a linear (or non-linear) optimization problern were uncertain. Thus, Stochastic Programming consista of forrnulating optimization problems that directiy incorps rate ucertainty in the optimization parameters and investigating techniques to solve such problems.

2.1 Introduction

Consider the general optimization problem (Problem 2.1 below) .

where: f is the objective hction, c is the vector containing economic data, x is

the decision variables vector, h is the vector of inequality coIlStraints, is the set of constraint parameters, and b is the right hand side vector of the ineqpality mnstraints.

&de constraints are not considerd in the above formulation of Problem 2.1 as it hss been e~ssumed that any equaliq coDStraints have already been useci to reduce the dimensionaliity of the optimization pmblem (Le., the optimization problem is considd in its reduced spaae).

Page 30: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Apparent Profit Contours ----- bfit ~~~ ...*S.. *--

Constrainb-

Figure 2.1: Illustration of uncertainty in objective function (cost data)

Stochastic Programming problems can be split into t h e categories based on the location of uncertainty in the optimization problem:

1. uncertainty in economics or the objective function parameters (c).

2. uncertainty in the right hand side elements of the constraints (b) . 3. uncertainty in the constraint function parameters (e). To aid visualization, the abwe three SP categories are iliustrated by showing the

&éct of uncertainty on an LP problem in two dimensions. AU the arguments pre sented b e h can be generalized to an n-&mensional non-linear programming (NLP) pr O blem.

Uncertain@ in economic data translates to uncertainty in the gradient (slope and direction) of the profit SUrftm. As seen in Figure 2.1, this mcertainty in the slope of the objective (profit) function can cause the apparent optimum1 to shiR to a sub opthai opaating point2. If the angle of tilt of the profit surface changes by 8 (hom the nominal value), the caldateci optimum (apparent optimum) shifts to a new 'sub optimal' point.

'Apparent optmnna. the salutim calcuiated iIsing naminlil d u e s (va actual values) Tor the uncertain parameters,

*mb-optimnl nith respect to the actusi plant or system

Page 31: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 2.2: Illustration of uncertainty in constraint parameters I: Uncertain RHS

The second category of Stochastic Progrsmming problems is that of optimiza- tion problems with uncertain parameters in the right hand vector (b) of inequality constraints. Geometrically, uncertainty in the b vector 1ead.s to M i n g or lateral translation of the inequality constraints (Figure 2.2). An example of a physical pic

rameter in the right hand side vector for the inequality constraints is the availability of a feed-stream in a process. Th, changes in feedstock availability cm shrink or expand the region of feesible solutions. This uncertainty in feasîble region size implies that solutions generated using the nominal values for the uncertain bi could lie out- side the actual feasible region. As illustrateci in Figure 2.2, lateral shïfting (by 6 and E ) of the active constraints causes the apparent optimum to move into the infeasible region. Thus, in this case, ignoring the wcertainty in the b vector would cause the optimker solution to be infêasibIe with respect to the actual physical process. Shifes in the opposite direction to that shown in Figure 2.2 will result in the apparent opti- mum moving into the feasibIe region. This would Iead to a feasible, but suboptimal, solution-

In the third category of Stochastic Programming problems, lie problems where the constraint function parameters are uncertain (c in Problem 2.1). This uncmtainty translates to uncertainty in both or either of the dope and the shape (curvature) of the constraints. For a lin- model, only the dope of the (hear) constrainta would be uncertain. This results in un certain^ in the shape of the whoie feasible region (governed by uncertain t$ and 7 in Figure 2.3) defined ày the cpalïw constraints. This uncertaine in the shape and size of the feasib1e region agab impliea that o p

Page 32: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Apparent Optimum (infeasible) Rotitcomws ----- AdualChsWnts -

Figure 2.3: Illustration of uncertainty in constraint parameters II: Uncertain LHS coefficients

timizer solutions generated using the nomind (expected) dues for the parameters &, can either lie outside the actuel feasible region3, or be sub-optimal by moving into the feasible space, depending on the direction of deviation in ci. Examples of constraint function parameters for the gtuoline blending optimization problem are all the feedstock qualities/properties.

The work in this thesis is restricted to problems that fd into the thhd cat- egory (à. e., uncertain constraint coefficients), because as stated above, feedstock qualities are constraint fimction parameters in the gasohe blending optimization problem. In this chapter, Stochastic Prograuunhg foda t ions for treating uncer- tcùnty/disturbances in constraint parameters (both h and E ) are introduced and dis- asseci.

2.2 DifEerent formulations for Uncertain Constraint s

Uncertain constraint parameters in an optimiRation problem can cause infeasible s* lutions to be generated when the problem is solved using expected d u e s of the un- certain parameters (Figures 2.2 and 2.3). Implementation of infkasible solutions can

cause s number of pro- problems. Examples of such problems M u d e d e @ and environmental code violatiom, damage to procgsing eqyipment, production batches

- --

=aauai h i e regiorc the mbspace defined by actuai physicai cmstramts where there îs no parameteric niismatch in &

Page 33: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

that cannot be sold on the market (either discardecl or need corrective measures before they can be sold), and so forth.

Optimization problems wîth uncertain parameters in the mnstraints can be dealt with in a number of wap. Discussio~ in this chapta wili assume all inequality constraints have stochastic parameters. If a spedic problem &O contains strictly deterministic constraints, these deterministic constraints would remain as determin- istic consbaints in the Stochastic Programming formulaton. Some of the possible formulations developed to deal with uncertain constraint parameters are discussed below. Each formulation has a different aim or objective, but all of them attempt to minimize the &a, in some sense, of uncertainty in constraint parameters on the "optimal" solutions generated.

In the probability maximbation formulation prekopa, 19951, there is no explicit econornic objective fimction. This form is used in situations where a "safe" operating region is requved to ensure that the risk of any constraint violations is low. The objective function to be maximized is the probability of the uncertain constraints being satisfied:

where P d stands for probability. This formulation requires the solution to be such that the probabüity of the con-

straints bebg violated is the least out of all possible solutions. As seen in Problem 2.2, economics are not used explicitly, and the sole a b is to minimile the probability of infessibility. hplicitly though, an economically optimal solution is generated as violation of the uncertain constraints has a cost associated with it. This formulation would be appropriate in situations where the vio1ation of constIaints hm a very high CO& associated with it and the "safest" operating point/region in the presence of uncertain mnstraint parameters is required. Huwever, there may be many operating points with a high safety marpin. Thus, a better objective would be to search for a solution that takes the economics into a c m ~ t acplicitly, while teqWring a high mgin of safew.

Page 34: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

2.2.2 Penalty Fundion forms

Anofher method of poSmg the problem for uncertain constraints is the penalty h c -

tion method (Problem 2.3). For this formulation, the uncertain constraïnts are in- corporated into the objective function by pedizing their infeasibility. A function q is defined which m-es the violation of the stochastic constraints and is included in the objective function with the economic objective to be minimi.ed. One of the main problans with this approach is that the quantification of coat of infeasibility is not eaqr. Another is that the caldation of the expectation of the penalty function is non-trivial.

where: q is a penalty function on constFaint violation As an example, if the penalty function is simply the magnitude of the violation,

the blending optimization problem with uncertain feedstock RVPs can be written es:

The above form minimizes the cost of producing the blend and the expected violation of the uncertain constraint. Since penab fuaction approaches cannot ensure feasible solutions for finite values of the penalty fundion, barrier functions [Fletcher, 1987; Gî et al., 19811, which would ensure feasibiity may be us& in this formulation.

2.2.3 Programming under Probabilistic Constraints

M e a d of directly rnidmizing the probab'ity of an infeasible solution (5 2.2.1), an- other approach could be to set a reliabiliw level for the uncertain coI1St):aints by requiring that they be satisfied at a minimum (high) le& of probabiliv. In mch a formulaton, the original economic objective function can be retained as such, while the uncertain constrainta are now frmed as probabilisüc coI1Sfi'aints [Chames and Cooper, 19631, [Vajda, 19721. A solution to this Probabilistic Rogramming problem would minimize economic cost while ensuring that the probabfiw of the comaints

being violated is very s m d (the all& probabi3iW of violation is specified during problem fonnulation). Thus, the strategy adopted is to optimize the economic advan- tage, while keeping the risk of constraint violation due to uncertain@ at m t a b l y l m lads.

Page 35: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Probabilistic Programming can be further divided into two categories: 1) pr+ gramming under inàividual probabiüstic constraints snd 2) prograrumhg under joint probab'ilistic mnstrsints.

Individual Probabiiistic Constrained Programminp

In this formulation [Charnes and Cooper, 19631, each individual constraint (with uncertain parameters) is converteci into a probabilistic constraint with an associateci probab'ity level of feasibiliity. The risk mhimization takes the form of ensuring that each uncertain mnstraint is satided with a probability of at least T, where T E (0,l). The individdy conatrained, probabi ic programming problem is:

where: h, is the ith inequaliw constraint function, and bi is the right hand side of the it inequality constraint .

As an m p l e of the formulation of individual chance constraints, consider the maximum Reid Vapor Pressure constraint on blended Premium Gasoline. If the Reid Vapor Pressures of the feedstocks are uncertain, and the specXcation on RVPFmM states it cennot be more than 10.8 psi, the R V P m - chance constraint would be formulated as:

where the minimum probability of feasibility is taken as 95% for this example. This is the formulation used in the remaining part of this work. Constraints of

this type, where each constraint has to be satisfied at hast T x 100% of the t h e , are

called individu81 chance constraints [Chames and Cooper, 19631, and the formulaton Chance Constrained Programming or CCP.

Joint Probabilistic Constraints

Only individu81 p m b a b ' i c constrahts (CCP) were comidered above. Such for- mulatiom ensure that each constraint is violateci no more than (1 - ?r) x 10% of the t he . However, in actual practke it may be reasombIe to speciiy that none of the uncertain constraints are violatecl (1 - T ) x 100% (a smdl percentage) of the tirne. Consider a set of constraints with uncertain parameters. If violation in any of

Page 36: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

these is unacceptable, it would be desirable to fiame the pmbleni as one in which the probabiüty of the whole set of conatraints being s a M e c i is always greater than some minimum risk threshold.

Probabiliste constraints of this type are k n m as Joint Probabiliatic Constraints [Miller and Wwer, 19651. The new optimization formulation with Joint Probabüistic Constraints (JPC) can be written as:

For a simple illustration of the idea, consider the set of ququsl constraints in the general blending optimization problem (Problem 1.1). Instead of fomulating the RON, MON, and RVP constraints separately as individuel chance constraints, they are lumped into one probabWic constraint which dates that the whole set of constrainta with uncertain parameters must be satisfied at a probability level of r. This would be formulated as:

As seen above, the JPC formulation is a more natuml approach for handling the uncertain coflstraint parameters problem. A joint probabilxv criterion can be met by using individual probabilistic constraints; however, the hining of the probability lwels for the individual chance constraints to meet this JPC criterion is non-trivial (refer to Appendix C for a more complete discussion).

Probabilistic constraints are normdly used where the mit of infeasibility is very

high (and hard to ascertain), thm making the use of penalty function approaches (5 2 3 2 ) cMîcult. The ELSSigning of values for ?r, the minimum probab'ility of fdbi l iw, is heuristic except for some situations where the acceptable risk threshold is defineci in the specifications for the product. An example of such a situation could be the mmuffacture of simple hi& volume hardware products such as nuts and bolts. There are specifications on the physicd dimensiom of these products. In most cases t h e is also a srnaIl, specified, acceptable fiaction of production volume which may be defective. This &action of acceptable defkts can be used while selecting the opera- tion seqpence and the operating pointa of the rnachinery used to manufacture these products.

Page 37: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Although Probabilistic Programma limits the probability (or fiequency) of in- f d b l e soIutions, the degree or extent by which the uncertain constraints are violated is not canaidered. This requhement of somehow limiting the degree of i n f ' b ' i ~ for the solut io~~ that are infeasible can be met using Merent techniques, such as the one outlined in the next section,

2.2.4 Constraints with Conditional Expectations

A formulation that can deal effectively with opümization problems where the extent of violation of u~certain constraints is important, is the Conditional Expectations form [Prekopa, 19731. in the fmulation of this problem, the constraints state that if the Qh uncertain constraint is violated, the expected violation is to be bounded in magnitude by a p d e d positive number 4. The mathematical formulation of the conditional constraints problem is given as:

where: d is the set of nurnbers (vector) that gives the upper bounds on the expected

constraint violations. d can also be d e d the vector of maximum expected violations. In tbis form, there is no bound on the probability or kequency of constraint vi-

olation, but there is a~ expliut bound on the extent of violation. Even though the solution to the conditional constraints problem may violate constraints at a high prob- abüity level (or a high fiequency), the amount by which the constraints are violated is s m d (spedied). For example, comider again the maximum Reid Vapor Pres- sure constraint for Prernium Gasoline in the blend optimization problem (Pmblem 1.1). As in the previous subsection (5 2.2.3), the premium gasoline RVP specification bounds R V P F m to less than or equal to 10.8 psi. If a bal blended RVP of 10.82 psi is considerd to be within acceptable limits, a condition81 constrsint could be fomdated for this case as foUows:

The above inequality states that if the RVP of the premium grade being blended fah above 10.8 psi, the expected value of this off-specification blend should be b a l m 10.82 psi. Thus for this case, the xnmâmum allowed average deviation £rom the R V P F m spedication is 0.02 pi.

Page 38: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Constraints of this type would be usshil in problems where the "distance fkom fdbility" or maximum extent of inféasibili~ of the solution is very important (e.g.,

situations where %malln constraint violations are acceptable).

2.2.5 Combinations of the above for-

The last tkee techniques for treating uncertain constraint parameter problems (§ 2.2.2 -r 5 2.2.4) can a h be combineci to give formulations which specify multiple objectives. Some of these combinations are given below and explainecl bridy.

A Probabiiic Programming problem with Conditional Expectation Constraints can be represented 89:

subject to: (2. il) {h(x, el 2 b} r

EP - h(x, Z)lh(x, €1 < bl I d

In Problem 2.11, joint probabilistic constraints and constraints with conditional expectations are applied to the same set of uncertain constraints Qmultaneody. The 6rst constraint in Problem 2.11 would ensure that the original uncertain conatraints (Problem 2.1) are satisfied at a probabity l e d of at least r. The second constraint in Problem 2.11 above states that if those original uncertain comfiraints are in fact violated, the average violations are limited in magnitude by the vector d. T h , both the fiequency and the magnitude of conirtraint violations in the presence of parametric uncertainv can be limited by a combïmed Robabilistic Programming and Conditional Expectation CoIlStraints formulation.

DBerent Stochastic Programming techniques that handle parametric uncertainty in optimization problems have been discussed in this chapter. The solution to each of these problems requires knowledge of the probabm distribution of the uncer- tain parameters. Some of the more commonly seen characterizatiorts for parametric uncatahty are contunous probability distributions e.g., Normal or GaUSSian and d o m or flat probabilility distributions. M e r possibilities include diacrete distribu- tions where the uncertain parameters are only a l l d to take values in hed, nnite sets.

2.2.6 Perrnanently Feasible Linear Prograrns

In this approach Friedman and Reklaitis, 19751, a solution strategy is d e r i d for LPs, where aome or alI of the constraint parameters are uncertain. It is assumed

Page 39: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

that the disturbances in the comtraint parameters are d o r m l y and independently distributeci wer s m e k n m range of variation fa. This method was proposecl for processes where no information is amilable about the nature of the statistical distribu- tion of the constraint parameters in a linear prognim. The ody description assumeci

available is mean values of the parametem and the expected range of variation in each parameter. In such a scenario the 888umption of a d o m distribution for the uncertain parameters may be appropriate. In this method, a worst case scenario d s sign of the LP is done, where worst case values (the values which would cirive the nominal solution West into infeasibility) are assigneci to ail uncertain parameters. This ensures that the modifiecl LP solution is feasible for the worst case variations in the uncertain parameters. The solution thus obtained is f a b l e over ail possible variations (within the range given) in the uncertain parameters. As an example, a s sume that the Reid Vapour Pressure of the Reformate stream varies by as much as

f 0.3 psi (from a nominal value of 3.8 psi). In this situation, the LP to be solved for feedstock flowrates would use a value of 4.1 psi for the Reformate RVP in the maximum RVP constraint. This woul ensure that the solution (feedstock flows) will not violate the maximum RVP constraint for all values of reformate RVP 5 4.1 psi. The LP so designeci can thus be calleci the Permanently Feasible LP4 (PFLP).

If there is some k n m dependence between variations in the parameters (e.g., if

the M N and MON of any or all feedstoclcs vary together), this dependence can be incorporated into the problem fom and solved to yield a less conservative solution (sometimes) than that for the independent d a t i o n s case.

Consider the following LP:

niin X

c=x

subject to: A x g b

If a is the matrix of the maximum aiiowed variations i e . , av = a, f aij, where all cej are positive and independent of each other, the PFLP formulation for the above problem is given by

min X

cTx

subject to: ( A + a ) x ~ b

Page 40: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

If the disturbances in the parameters of the constraint matrix are lmown ta be col^ dependent (Le., disturbances in some of the parameters in a column of the corutraint matrix are linearly dependent), there is a passibiity of making the PFLP solution less consemative. In this case, a vector p, can be d h e d for each column of the P ma* which represents the dependencies of the elements of that column as:

where j is the collrmn (for OUI purposes the feedstodc) index, and pj # O for di j.

For the column dependent form, the rnoMed LP is given by wedman and .

Reklaitis, 19751:

min X

cTx abject to:

(A++ I b A¶

min(%,j, 1 pk.Jeki 1 , if k j # O where xiJ = k=l

&.J , where M is the number of con- w aij, if pij = O

straints containing uncertain parameters, and aij is the maximum perturbation ai- lowed in the jth dement of the ith constraint. pid is given by equation (2.14).

If the above approach (PFLP) is applied to a problem where the parameter varis

tions are assumeci to be independent and normally distributed, a can be speci6ed as

some multiple, n, of the kno- or estimateci standard dwiations of the parameters: a = nadaUr- . It should be noteci that this does not imply that the resulting con- straints now have a probability of feasibility given by P1(n) , where F is the normal probability distribution function (although the above would be true in the case of there being only one uncertain panuneter in each constraint).

2.3 Discussion

Some important Stochsstic Programming techniques to handle uncertain constraint parameters have been described in the section above (52.2). Solution metho& to solve these problem forms are discussed below and their suitabiiity is examined for application to RTO systems in general and Gasoline Blending ûptimization in par- tidar. The discussio11~ of solution techniques are only valid for problans where the original problem is an LP:

Page 41: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

min X

c=x

subject to: A x z b

where: A and b can have stochastïc elements.

2.3.1 Solution Methods

To solve the Pmbability Mmcimization and Joint Probabiiistïc Programming pmblems (Problems 2.2 and 2.7), a variety of non-linear optimization a1gorithm.s can be used pekopa, 1995) (e.g., generalized reduced gradient (GRG) methods [GU et d., 19811, Interior Point methods utiüPng logarithmic b&er fiinctiok [Wright, 19971 , etc.).

Howwer, the caldation of numerical values for both the objective function and its gradient recpire application of multiwuiate numerical integration methoàs (discussed in some detail in Prekopa [1995]). This in turn means that the solution techniques for hobability Maxirnization and Joint Probabiüstic Progrnmming have to incorp* rate a large number of simulation nuis, multi-dimensional numerical integration, and non-linear propmming making the solution to these problems computationally very expensive. The usual approach [Terwiesch et al., 19981 is to discretize the probability density hctions of the uncertain parameters and numerically integrate to get an approxbmte solution to the original problem where the distribution functions were continuous ( e. g., mdtivariate normal distribution).

The special case of the Probabilistic Progrrimming problem with individual chance constraints for a b e a r Program can be acpressed as:

min X

c=x

subject to:

where: c is the vector containhg economic data, x is the decision variable13 is the coefficient vector for the z* inequaliw constraint, and is the right of the i?h inequality constraint.

(2.17)

vector, hand side

Chance Constrahed RogrammiDg (individual chance constraints) has been used to obtain so1utions mbust to ucertainty in lin= program constraiet parameters in areas as diverse as Optimal Polymer Design and Chicken-feed Formulation. The Poly- mes Design problem consists of using Cornputer-Aided Product Design techniques [Co~lstantinou et d, 19961 to identify possible molecular structures that wi l l have some specined desirecl propdes. Group contribution methoda [vsn Krevelen, 19901

Page 42: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

are used to predict pmperties of diff-t molecular structures. Haaraver, an t k e is dwap unaxtainty in these predictions, an optimal polyma design problem using these methods needs to incorporate this uncertahty into the optimal desip problem paranas, 19971. Similarly, in Animal Feed Formulation, the nutrient concentrations in various types of animal foods can vary. Therefore, the formulation of an optimal animal feed recipe fiom these feedstocks takes the form of an optimization problem (LP) where the constraints parameters are uncertain. The animal feed formulation has also been solved using CCP and the benefits are outlined in Roush et d. [1994]. More recently, Chance Constrained Progranunhg has also been applied in the area of Mode1 Predictïve Control (WC) [Schwann and Nikolaou, 19991. A mical MPC for- mulation is an optimization problem that uses predicted process outputs mer a t h e horizon. These predictions are parameters in the lin= inequality constraints of the opthkation problem fomed. Thus, as illustrateci in [ Schwann and Nikolaou, 19991, the incorporation of probabilistic procas output constraints in an W C f o d a t i o n leads to solutions that are much more robust with respect to the uncertainty in the process model.

Problem 2.17 (with the BSSUrnption 4, bi have a multivaxiate normal distribu- tion) c m be converted to a deterministic, quadratically constrained problem Wajda, 19721 as shown in 53.31 for the blending optimization problem. This deterministic problem c m be solved using any non-linear optimization routine. R,ecently, Boyd and OwOrkem have used Second-order Cone Programming (SOCP) to solve CCP problems. Second-orda Cone RogrBmming [Lobo et d, 19971 uses interior point methods [wnght, 19971 to mlve what they cal1 Robust Linear Programxuing (LPs with uncertainty in coflstraint parameters) problems.

An apprdmate solution to the Joint Probabilistic Programming problem can be obtained by combiig Individual Chance Co-ained Progranunhg with some prob- abiity bounding techniques. Probabiity bounding and approximation techniques based on Boole's inequality, which can be used to get bounds for the joint probabiliw of feasibility level, are given in Appendix C. However, the solutions obtained using this combiition cannot be guarmteed to be optimal because the joint probabilities problem ia addresseci in an indirect mamer. Thus, optimality is compromised in retum for low riak soluti011~. Also, the bounded solutions to the JPC problem thus obtained are non-uniqye, as there are an W t e number of individual probability levels that csn be speûfied to get the same bounds on the joint probabiliw level of feasibili~.

The Conditional Constrahts and P d t y hct ion forms require calculation of mathematid qectations of functions wÏth random parameters. This Bgsm invoives

Page 43: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

integration over mdtivariate probab'ity density functions, which can be highly com- pu ta t iody intensive.

The lsst method preccented in 52.2.5, Permanently Feasible Linear Progrturis, can be solved using reguiar linear pmgramming techniques as the forxxtulaton is that of a standard LP.

2.3.2 RTO Implementation Issues

In closed loop Real-Time ûptünization systems, optimizer solution times are a very important issue because of the direct repercussions on RTO execution fkequency. Solving a problan with a large number of variables with a stochastic progrBmming formulation can be computatiody very expensive. Of the SP formulations discussed in this chapter, only the Individual Chance Constrained Programrning and the Per- manently Feasible LP algorithms are relatively cheap computationally.

For the Gasoline Blending RTO, computational times are a lesser issue because the problem size is small (typically 1@30 optimization variables). Even so, Indi- vidual Chance Comtrained Programming is particularly suited to this problem as: 1) assessing the CO& of producing an infeasible batch is non-trivial thus making the penalty function approach wen more difficult, and 2) even though some leeway is aUowed in the @ty constraints (RON, MON, RVP, etc.), speafying conditional expectation constraints does not seem to justify the aàditional computation involveci.

The PFLF algorithm wedrnan and Reklaitis, 19751 was designeci for constraint parameter uncertainty d&ed by d o m distributions. Although as mentioned in

52.2.5, the algorithm can be appiied (by using two a or three cr limits) for disturbances with normal distributions, this gross approximation of the underlying probabiliw diatribution distorts the problem. For the above reasons, only the Individu81 Chance Constrained Programming is used in this work to design gambe blending optirniaers which incorporate parametric uncertainty exp1icitly.

S~lthcmgh formulation of the diacretized TEKi'O Eorm ($1.3.3) wül maeaaa the nirmbo of opti- mieation tiMaMes to (nuder o f f ' ) x (nt#nber of RTO intatrrrls to the end of the b W ) .

31

Page 44: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Chapter 3

Gasoline Blending O pt imizat ion

In this chapter, strategies to incorporate uncertahty into the folpldations of Real- T h e Optimization for gasoline blending are developed. The chapter begins with a brief description of the sets of blending models, both linear and non-linear, used in this work. This is followed by an amount of the problems caused by uncer-

t ainty/disturbances in blending model parameters. Next , the S tochastic Program- miag techniques used in this work to counter some of the effects of these uncertainties are ducidated upon. FinalIy, the extensions of the above techniques to the case of gasoline blending ElTO under uncertain@ are described.

3.1 Blending Models

There are many properties that are key in characterizing gasoline (e.g., octane num- ber, RVP, ASTM distillation points, olefins and aromatics content, flash point, vis-

cosity, etc. [Gary and Handwerk, 19941). Some of the m& important qualities, and the only ones considered in this work are Research Octane Number (RON), Motor Octane Number (MON) and Reid Vapour Pressure (RVP). In this work, blending modeis are used for two purposes; 1) simulation of the blending process (the plant), and 2) framing the constrainta (the model) of the RTO based b led optimizer.

The main requirements for the blending models to be used in the optimizer are accwacy, sirnplicity and parsimony of (model) structure. The mod& used for the case studiea in this work are describeci below. These models were originaliy used in Sin& [1997] and a more amplete discussion of their characteristics can be found there. A review of the different gasoline blendmg models (for RON, MON and RVP) available in Iiterature can also be found there.

Page 45: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

The lin= modeh used here are the blending octane nimiber method for octane numbers a ~ d the blending index method for RVP blending.

In the blending octane nltmber method, fictitiow blending octane numbers (BO Ns') MON of the feedstocks. These BONS blend the octane ninnber of the blend [Gary and

are used instead of the hue RON and linearly (on volumetric baais) to give Handwerk, 19941:

i=l (3.1)

where: wi is the v01ume faction of component i, ONMd is the octane number (RON or MON) of the blend, and n,, is the number of components in the blend.

In the blending index method for RVP blending, blended RVPs are predicted by using Reid Vapour Pressure Blending Indices (RVPBI). RVPBIs blend linearly and are caldateci as [Gary and Handwerk, 19941:

For the non-linear model, the Ethyl TYT-70 method for blending octane numbers is used dong with the RVP blending indices method for RVP blending.

The Ethyl method is one of the more m a t e and parsimonious models used to caldate blended octane numbers [Singh, 19971. In this method, the blendeci octane numbers are expliut hctions of the octane numbers (RON, MON), component sensitivity (RON -MON), olefm content, and the aromatic content of the feedstocks [Hedy et al., 19591:

wherer r is RON, m is MON, s is sensitivity (RON- MON), O is oI&n content (volume %), A is aromatic content (% by volume), and al, oz, as, ac, as, are correlation coefficients. All qyantities with over-bars represent vo1umetric averages.

Page 46: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

3.2 Uncertainty in Gasoline Blending

h o & ail mode1 parameters in the Gmline Blending IETO problem:

IIi8X X plTx - cTx

subject to:

have some uncertainty associateci with them. Starüng with the objective function, where global and local market forces can cause fluctuations in the selling price of gas*

line ( p ) . Also, the cost data for blend feedstocks (c) is imperféctly h m because it is difficult to assign economic values to streams which are not sold directly as products by the refinery. Cdculation of the CO& incurzed in producing these intenneciiates is nonatrivial. This uncertainty in the dope of the objective (profit) function c m cause the apparent (calculateci) optimum to shiR to a sub-optimal operating point. As seen in Figure 2.1, the calculateci operating point though not violating any constraints, can result in the blender making a costlier final blend.

Parameters in the constraint fusctioos in Problem 3.4 &O have associated uncer- tain@ As seen in Chapter 2, uncertainty in the constraints c m occur either in the constraint function parmeters or, in the right hand side parameters. For the gasoline blending optimization problem, this translates to uncertain feedstock qualities and uncertain demanQ/availabilities respectively. The right hand aide parameters in the quality specification constraints are the specifications themselves and the function parameters for the demand/availability constraints are integral coefEcients. These are defined up front in the formulation of the problem and thus, are certain.

In the gasoliae blend quality specification constraints, the feedstock qualities can be uncertain due to the following reasom:

1. The processes (FCCU, Reformer, Atmospheric Column, and so forth) the par- ticular feedstock cornes kom are subject to continuous disturbaoces, which c m be operation changes by the operators of unit, and/or stochastic (llnmeasured) disturbances entering the process. In Figure 3.1, both the feedstock q d t y tra- jectory and the blend puaiiw trajectory are shm as deviatiom from nominal feedstock and h d qudities. The stochastic disturbances sffecting a feedstock production process can be from many different sources such as: à) composition changes in the crude oil being processed by the refinery, ai) ambient tempe* ture affecting the operation of the separation columns (e.g., main atmospheric

Page 47: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

column, columns in separation trains of the FCCU, Reformer, etc.), iài) 0 t h process upsets in any of the upstream mits. These disturbances becorne ex- tremely important when ninning tanks are used for gaaoline blending feedstocks or when blending ia done in-line. During ininLine blending, the blend feedstodts are fed straight into the blenda manifold without being first routed through a tank. If nmaing feeùstock tanks rue used, any disturbance in the id qdties is nItered through the tank dymmiics befixe it affects the blended gasoline pd- ities. In both -es, disturbances in fesdstock q d t i e s are trammitteci through to the blended gasoline. Infiequent measurement of feedsock qualities (in some cases, the feedstock qualities are mea~lllfed as infrequently as once a week) make the task of tradang these disturbances wen more dif f idt .

2. Meamernent errors from q d t y sensors.

Feedstock qualie disturbmces in the kt category above can have the following disturbance structures (or a cornbition) : z) random steps (e.g., m d e switches and operator intervention), ii) coloured noise and random walk type disturbances, zii) cyclic disturbances ( e.g., daylnight temperature cycling) . In the second category (i.e., measurement errors), the disturbances may be a combination of white noise and instrument birises.

Uncertainty in feedstock qualities implies uncertain parameters in the Q matrix (Mt hand side coefficients in the coflstraints) in Problem 3.4. As the shape of the f&ble region is uncertain, nominal values for the uncertain parameters in the RTO problern c m give solutions (blend recipes) which are infeasible (Figure 2.3) in the sense that implementing the recipe will cause violation of one or more quality specifications. In actuel practise, when a blended batch is found to be off-spdcation it cannot be sold as scheduled. The off'eciiication blend has to be reblended with other feedstocks (&y the more expensive ones) or expensive additives to bring the batch up to specifications. The folIowing costs can be associated with reblendhg [Grosdidiet, 19971: i) demurrage cost from having to hold the batch in inventory while the correction is done, ii) inventory cost kom not having the money in the bank earning interest because the shipment is delayed, and àii) utilities cost, which is the coet of pump &dation required for mkhg the batch after the correction is done. Another cost that can be essociated with reblending is the coet of the feedato&(s) used for correction of the blend. However, these are relatively minor in magnitude compared to the indirect cost inamed due to the loas in the scheduled production rate,

In the demand and adability comtraints, the demands and aV8il~biïties: p in

Page 48: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

@mm */ .- Feedstock Qualities With Disturbances

21 1 A-.

i ' b Reformate 1

.v 1 ; ;v : ; . . . . . . . . . . . . . . . . . . 8lended Gasoline . . . . . . b LSR Naphth- Blendert-b . . . . . . k.. : : :.

- . - . -. . . . . .. " * Feedstock Tanks

.$

Final ~lended Qualities

Figure 3.1: Propagation of feedstock qwlity disturbances through the g w h e blender

Page 49: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Froblem 3.4 (right hand sides in the constraints), can only be known with some degree of uncertainty. Dansnd for any grade of gasoline is ueually projected by the rehery's planning department fiom market data. Such forecsets dmys have some associated uncertainty. The blend feedstock availabilities are based on target production values set again by the planning department. There can be sihtions, however, where it is considered necessary to deviate fiom those production values. One such scenario could be that the price of a certain blend feedstock (or an intermediate) goes up in the market and the r&ery decides to divert some of the scheduled production of this stream for direct s e b g on the market. Another situation with similai effects

could be an emergency shutdown of one or more of the upstream units fiom which the blend feedstocks originate. Situations like the above cause uncertainty in blend feedstock availabilities. This again, can cause the generation-of solutions which when implemented violate one or more of the demandJavailabüity constraints and thus, are infeasible (Figure 2.2).

While the first type of uncertainty (uncertain cost data) c m cause generation of suboptimal solutions, where the solution makes leas money than is possible, the second and third types (uncertainty in the constraints) can actually cause implemen- tation of blend recipes which are infeasible. These infeasibilities could be due to violation of the quaüty spedfmtions or the demand and availabiüty constraints as seen above. This work concentrates on how to minimize constraint violation in the second category (2. e., uncertain feedstock qualities leading to critical spdcat ion violations (see Figures 2.2 and 2.3)), while maximkhg profit.

3.3 Blending Optimizers for Uncertain Feedstock Qualit ies

In this section, Werent blendbg optimizer formulations are ddoped that explic- itly include uncertainty in feedstock qualities in th& formulations. The Stochastic ProgrBmming techniques selected in Chapter 2 to be used in these RTO fomulations are further exphineci before applying them in the blend optirniaers.

3.3.1 GBO using Probabilistic Programming

The objective in gwline blending is to produce the most economic blend while ensur- ing that the spe&cation/demmd/availability constrainta are satisfied. As mentioned earlier, this is not almys possible in the presmce of uncertain gawline feedstock qyal- ities. Thus, Probabilistic ProgBmming is a good candibte technique for use in the

Page 50: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

blending control problem as the risk of making an infeasibIe blend can be specified in the problem formulation (Problems 2.5 and 2.7).

Using Chance Constrained Programmhg (CCP), a minimum probability of feasi- bity can be specified for each uncerfab constraint. In the blendïng problem, where the qyaliq spdcat ion constraints (minimum RON and MON and rmmimum RVP) have uncertainty associateci, individual chance constrainta can be used with a high probability level to get "desirablen or low risk blend recipes. In 0 t h words, CCP cm be used to aisure that most blends obtained are on-specification (qmdity constraints not violateci, and thus no reblending required).

The chauce constrained problem for gadine blending is:

min X

eTx subject to:

(3-5)

where: e = plT - cT, is the vector of economic data, is the vector of uncertain feedstock quality indices for the i* qurùity, Si is the specification for the à" quality in the ha1 blend, n e is the number d uncertain quality constraints and, q is the minimum probability level at with which the t* q d t y constraint must be satisfied. It turns out that there are two ways of converthg the abwe problem to its certainw equivalent C e., an optimization probiem with no -ancertain parameters.

The chance constrained approach Wajda, 19721 replaces the probabilistic con- st~aints with non-hear constrainta and is the classical chance constrained program- ming approsch. For the case where the Ph ffeedstock q u e ' s disturbance is modeled as a N(0, <) pro-, the chance constrained optïmbation problem becomes:

min X

eTx abject to:

( i lT - G)x 2

where ri is defined by:

Page 51: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

where erj is the error function. The right hmd side of the first constraint can be interpreted as -7i x standard deviaticna of gh canstr~int (Appendix B).

A second method for solving the chance constrained LP [De Hennin, 19941, uses

the estimateci variance of the active constraints duectly in d d a t i n g the back-O& fiom active comtraints. The chance constrained LP with the set of active constraints known is converteci to:

min cTx X

subject to: A.x+ 6 = b,

where A, and b, are the expected dues of active comtraint parametas and the coflstraint right hand sides respectively. 6 [deHemin, 19941 is the vector of back- ofIB h the active constraints required to satisfy the probabilistic constraints in the chance constrained program and is given as:

where qg,,,* is the variance of the ith active constrakt function. Unlike the Chance ConstraKied approach describecl in the previous subsection, the

modifieci const~aints (with badt-O&) are linear. Thus, the nature of the original o p timization problem is preserved and LP solvers can be wed to solve the Probabilistic Programning problem. For the blending pmblem:

min X

eTx suaject to:

&* - sàlT)x 5 O if i inactive mty c o e a i n t - si lT)+ f - ( 2 - 1) = O if i active co~mtraint

where gg,i,i = with oi defined in the previous subsection. 3

A major assumption above was that the feedstock flows, ~lutiom of the chance coIlStrained LP, are already k n m This is impossible in practise but, if the flows

Page 52: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

fiom the original solution of the LP with deterministic constraints (the expected values for the constraint parameters used to get the solution) are wed as a first approximation end then iterated through the backsff problem, the fiows (solution) for the chmce constrained problem can be obtained. The computational cost of this itaation process needs to be taken into accomt while evaluating this approach. The other a s m n p t i o ~ ~ include that the active set (asmmed hm) is not altered by changes in feedstock quaüties.

Comparing the above form with the Chance CollStrained Program form (Problem 3.6), it can be seen that in the CCP form, implicit back-off terms are defined for all uncertain chance constraints. In the current approach, however, only the active constraints have the back-off term in them. Thus, if the active constraints are known beforehand, the back-off £rom active constraints method can be used. On the other hsnd, if the set of active constraints at the solution is not hm, back-O& could be generated from all the uncertain constraints giving an over-conservative solution.

The joint probabiüstic constraint prograrnming problem for gasoline blending can be written as:

min X

eTx

a b j e c t to: ~ r o b [ ( Q - s l ~ ) x i O] 2 n

where: T is now the probability level at which the whole set of uncertain constraints

The above formulation implies that r x 100% or more of the solutions of Roblem 3.12 should be feasible (no constraint violated with respect to the model used). Al- though this problem form is more dgirable than individual p robabi ic constraints (§2.2.3), solutions to this problem are much more computationdy intensive* A con- servative, apprachnate solution to Problan 3.12 can ho-, be obtained by using the probability bouding techniques outlined in Appendix C.

3.3.2 Probabilistic Programming for Non-Linear Blending Mode1

Probab i i c ProgrBmming has been discussed thus far only for lin= models and constraint sets. As d i s c d in Chapter 1, it is generdy accepteci that non-linear blending modela for Octane N d e r and Reid Vapour Pressure blending are more B

ccurate and give mole reproducible r d t s . Unfortunately, there is no general method

Page 53: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

for sol* non-linear chance constrained progrmrm pekopa, 19951. One possibiiliity is to l o d y linearize the non-linear cowtraints and iterativdy solve the CCP fomu- lation for the linearized constraint set. This approach however, offers no convergence guaranteea for the solution.

The non-linear mty coTlStraints for the blending contr01 problem can be ob- tained kom the noolinear KI'-70 model, Equations 3.3 and 3.2. These constraints

c m be written in vector form as:

where: r and m are the vectors of RONs and MONs respectively for each feedstock, ae al, (12, as, a4, as, and & are the co&cients of the octane model(& = -), O and

10000 b are the vectors of feedstock olefin and aromatic content respectively, oo, and b, are

vectors of squares of feedstock olefin and aromatic content, v is the vector of blending indices of the feedstock RVPa and x is the vector of feedstock flowrates. After t a h g a first order Taylor Sefies approximation of the above noniinear constraint functions, the system of linearized octane number constraints obtained is:

where: r,, m,,, x. are the nominal RONs, MONs and feedstock flmates, and V,g, V,g and V,g are the ht partial derivatives of the non-linear functions in the Ethy1 model as d h e d in Egustions 3.13 and 3.14.

Page 54: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

The above set of linearized RON and MON coostraints (3.16) dong with the xmximum RVP constraint gives the set of spdcation constraints and can be written as:

where: Q, is the augmented q d t y mstrix (Equation 3.18) and t (Eqmtion 3.19) contains a l l the other terms from the linearization that are either constants (nominal operating point values) or have uncertain feedstock RON and MON dues.

Using these linearized constraints, the static Gasoline Blending Control problem using

CCP becomes:

min X

eTx subject to: (3.20)

P r o b [ ( ~ i - s i l ~ ) x 5 41 2 for i = L,2, ..., n~ = s p

where: q, ïs the i" row of the augmented q d t y matrix (Equation 3.18) and 4 is the ith element of the t vector (Equation 3-19).

The only uncertain quantities in Problem 3.20 are in the elements 4 as the vectors

Q , ~ are compriseci of the nominal qydiw vectors ro and m,,. The above problem formulation is static in nature in the sense that it does not take into account the tirne variation of the feedstock qualities. It is based on the m e n t nominal d u e s for the feedstock quaüties and ody guarantees that the m e n t section of the blend s h d satisfy the constraints at a high probabüity level. It does not project into the future or look back at what has been blended so far. As disnirried in 5 1.3.3, the Thne Horizon formulation for the blend optimizer proposeci in [Singh, 19971 is designeci to mercorne this shortcoming. In the next section, methods to incorporate uncertain@ infomtion into variations of the Timt+Horizon optimiser are describecl.

Page 55: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

3.3.3 Probabilistic Programming for D ynamic Blending

As deedbed in Singh [1997], Tiit+Horizon RTO based b h d optimization consists

of predicting the blend feedstock qualïties over the future and mbimhkg blending cost over the period of the blending. Both the @ty specification as weii as demand comtraints are fiamed such that they are satMed at the end of the blaid. A variation of the above spproach would be to have the flexibility to tune the feasibiliity horizon. In the flexible fdbility horizon approach (referred to as the Feasibiiity Horizon IlTO method in the rest of this document), the optimization problem is forrnulated such that the blend quality constraints are r-ed to meet blend quality specifications at the end of the number of intwals gïven by the feasibility horizon. As in the fidl .

THRTO method, the past blended gasohe quahies and quantities (starthg from the beginning of the blend) are considerd in the optimization. U&e the THRTO method however, feedstock flowrates are only dculated for the number of future K ï0 intenrals specified by the fessibiity horizon. With the assumption that some information is given about the meamernent noise end the feedstock qualities' predic- tion uncertainties, Probabiüatic Programming can be used to d v e Dynamic Blending problems. In this section, the Probabiic Programming approach is extended to the cases of gasoline blend optimization wer a time horizon.

THRTO (feasibility over the blend)

As seen in $1.3.3, the THRTO algorithm proposeci by Singh [1997], predicts feedstock quaüties over the next few optimization intervals and uses these predictions to opti- mize over the remaining portion of the blend. The future f-ock qualit3f predictions enter the problem as constraint parameters and thus, probabiiic constraints can be useà to incorporate the uncertainty in these parameters into the blend optimization problem. h, the mnent measured feedstock q d t i e s wil l always have sume un- certainty associated which cari &O be handled using probabiistic constraints. The resulting formulations for Dynamic Blend Optimization using Probabilistic Rogram- ming are given below.

For the linear blending model:

Page 56: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

min X

subject to:

where: e is the vector of economic data, xt is the vector of feedstock flowrates during the th optimization i n t d , Ot is the matrix of feedstock qualiw indices during past

h

intervals and, 0, is the matrix of feedstock quaIity indices during the tth optimization interval in the future. A h , k is the present RT0 interval. and n is the last RTO intemal (end of blend) .

It has been assumeci that the feedstock q d t i e s remain constant between RTO intervals (slow enough dpamics). The summation terms over the unknown opti- mization variables (curent and future feedstock flowrates) c m be removed korn the constraints in Problem 3.21 to get:

k-l

- s l ~ ~ ) x ~ & - (&plr) xt] > rr (3.22) t=1

where: e L = [ eT eT ... eT 1, is the economic vector eT appended rm-wise, once

for each RTO intend (fiom k to n), QHn = [Q* ~ i + ~ . ~ n ] is the matrix of predicted present and future feed quality indices, H& = [Hk Hk+l ... &] is the mat* for demand and availability constraints, x k h = [ xc xz+, ... < lT is the vector of present and future feed flows, and 1k2n is a vector (size: (n - k + 1) xnumber of f eedstocks x number of grades) whose eiements are ones.

In Problem 3.22, the tenns containing the irnknown optixnization variables are on the ieft hand side in the inequaliw eoaStTaints. The structure of this formulation is that of the simple Chance Constrained Program, Problem 2.17, and given uncertainty info-tio~ for the predicted feedstock quaIities (&%), the det erministic equivalent of this formulation can be obtained. In TirneHorizon Blend ûptimization, the size of the opümization pmblem changes at each RTO interval k, and the number of optimization Vanables (feedstock flm to be caldatecl) is given by the product of

Page 57: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

the number of feedstodrs available, the number of diifment gasoline grades being blended, and the number of nr0 intenrals l a :

For dl the development in this chapter it is LLSSUrned that only one grade of gasoline is being blenàed. The formulations for more than one grade follow easily from this development and are demibed in Chapter 4 with the -study description.

Instead of using lin- octane blending modeIs with blend indices, the non-lin= mode1 (Equations 3.3) can be linearized moud the m e n t operating point (Appendix D) and used in the formulation of the TisKorizon Blend Optirnination problexn. This formulation can be written as:

min X

subject to:

min x t=k &~TX,

subject to:

where: Q=, (Ga,) and 4 (6) are describeci by mations 3.18 and 3.19 respectively for the tth RTO interval. The carats denote predicted quantities.

Problem 3.25 is slightly different lrom the Chance Constrained Rograms discussed up until this point because it has unoertain parameters in the rïght hand side vector

eady be incorporated when the detemhkkic equivalent of this CCP fomul8tion is

Page 58: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

developed (usiqg the mahods d d b e d in Chapter 2). If all the uncertain parameters in a Chance Constrained Program are in right hand side vector, the determizLiStic equident of that CCP is a Linear Program (LP). Thus, even with explicit inclusion of uncertainv into linear constrainta with uncertain right hand sides, those comtraints remab linear in the decision parameters, x [Chatnes and Cooper, 19631.

The Feasibiüty Horizon RTO (FHRTO) approach defines the t h e horizon over which the optimization is done, to be fkom the present EYTO interval to the feasib'ity horizon or the end of the blend batch (wbichever is doser). The feasibiiity horizon can vary .

from zero (feasible over current i n t d ) to the number of intervals in a blend batch (feasible aver blend). This formulation of the Feaaibility Horizon R!I'O problem is given by:

where: m is the lesser of the feasibility horizon and the last EYTO interval (end of blend). In Mode1 Predictive Control terms, the preciiction horizon is the lesser of the feasibiliw horizon and the end of the blend batch. The feedstock qualities are pre- dicted for the feasibiliw horizon and these predictions as well as the past blended gasoline qualities are used to caldate optimal feedstock flowrates over the feasibility horizon. Also, the dernand and availability constrainta have to be fiamed differently than for the original TMlTO approach. This is because, although the actud product demanda are over the length of the blend, the formulation belw can only manipu- late feedstock f lmates owr the feasibility horizon. One possible solution is to split the product demand over the length of the blend and specify limits for each sub- batch (RTO interval). Whiie the resulting demand constraints are simple enough to formulate, they do not dm the optimiir.er the greater flexibility given by demand coIlStrsints over the blend, to x m m m allocated blend amount in each IYrO interval. This is h m the dernand constraints are formed for the Fdb'ility Horizon RTO based algorithms in Chapter 4.

The Chance CoIlStrained form of the Feasibiliity Horizon RTO problem (Problem 3.27) is i s e d snch that the current RTO solution ensures that the blend produced

Page 59: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

by mbhg the caldated guantities of fkedstocks with the blend produced so fer, sathfies esch qyalïty specdication at a minimum probabüity level of z.

min x t=k ceTXt

The problem size, or number of optimization variables in Problemn 3.26 and 3.27, is given by the following:

One of the advantages of ushg the FHRTO Interval formulation is gmaller o p timization problem size, and thus, faster ~cecution tirne. On the other hand, the solutions obtained are more consemative as the formulation requirea that the quality specincations be satisfied earlier in the blend (instead of just at the end of the blend) .

Different formulations designed to handle uncertainty in Gasoline Blending quality constraints have been developed in this chapter. Variations on the The-Horizon RTO formulation [Singh, 19971 are extended to explicitly indude parameter uncertainty in the quality specihation constraints. In the next chepter, these forms are compared against conventional Gasoline Blending Optimizers by using a simple case study.

Page 60: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Chapter 4

Blending Optimization Case Study

The techniques developed in Chapter 3 to counter the ill-dects of uncertainty in gasoline blending optimization quaIity constraints need to be benchmarked against conventional blending optimization formulations. The linear blending models de- scribeci in 53.1.1, the blending octane number model for RON and MON, and the blending indices model for RVP, are used in this case study. This combination of blending models is used for both simulating the blending pro-, as w d as for fiam- ing the qd iw constraints in aU the blending optimization formulations. The non- linear Ethyl ELT-70 modeis describecl in 53.1.2 are not used because the models are non-essociative (Appendix E). One of the conse~uences of thts non-associativity of the Ethyl models is that the blended qualities are different for each different sequence of blending a fixed set of fkdstocks (the quantities and qualities of the feedstocks are fixed). As the same models are useù in the optimization as in the simulation, there is no structuxd mismatch between the actual process and the model of the process used for optimization.

To get a better understanding of the performance of the different ELTO schemes, a benchmark that represents the best possible blender performance is needed. In this work, the best possible blender per6omance is taken to be that obtained when, the blending optimization is done with all blend parameters known &y over the period of the blend [Singh, 19971. For the case of linear blendhg models, this reduces to the solution of :

T at,,tj is the vector of economic data xtet, = [ < ... $ ] * is the

Page 61: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

vector of ail feedstock flows over the blend, where is the vector of f d o c k flowrates LI LI

durhg the opthbt ion i n t d (t t+At). .t).te,t, = [ Q4 ... atf ] where

at is the ma- of f d o c k quality indicm during the above i n t d (at m e d hown for a l l t, present and future). t. is the &art time of the blend while tl is the end time of the blend. H is the co&cient matiix for the demand and avaihbii~ constraints, and p is the vector of blend deman& and f-ock availabilities.

The negative of the objective function value at the solution of Problem 4.1 gives the rnmchum achievable profit for a blend. The profit obtained fiom using different ELTO schemes, when cornpared to this upper limit gives a useful measure of the ability of the RTO scheme to reduce the e f k t of parmetric disturbances on optimality.

4.1 Case Study Description

The b e n b m k problem is baseci on the case studiea in [Singh, 19971 in which, both reguiar and premium gasolines are ta be blended simdtaneously. The number of feedstocks is iimited to five and the number of blends to two (Figure 4.1). The feedstocks to the blender are :

1. Gasoline fraction fiom the Catalytic Reformer or Reformate.

2. Gaoline fraction fiom the Fluidized Catalytic Cracking Unit (FCCU Gas).

3. Light Straight Run Naphtha fiom the Atmospheric Tower (LSR Naphtha).

4. Pure n-Butane fÎom various units.

5. Gaoline fiaction from the Alkylation Unit (Alkylate) .

For the simulation, there are taro blenders working in parallel, one for regular grade gasoline and the other for premium grade gasoline. Both blenders produce batches ove^ a twenv four (24) hour period The blended batches have minimum and rnmcimum demand coxutraints (Table 4.1). Each feedstock hm ~ssociated maximum availability mnstraints (Table 4.2). It is assumeci that dl the f d o c k s are coming to the blender through runnïng (51.3.5 and §3.2), constant volume, feedstock tanks. The demand and availability constraints are applied on each individual FtI'O i n t d instead of over the complete 24 hour batch. The benchmk case study consists of blending one hmdred (100) batches of both grades of gambe to compare the performance of conventional blendmg optimizers to that of the proposed optbîzers. EBch 24 hour batch has Mve (12) KT0 interva&.

Page 62: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Feedstock Tanks I I

t Blendecl Gasoline Tanks

f

L

Feeds from Upslream I

I

I

I - -te

Figure 4.1: Gasoline Blending Flow Diagram

- - -

Table 4.1: Blended Gadine Requiremests

Maximum demand, bbl/day

1 Feeàstock 1 Cost ($/bbll 1 Availabilitw (bbl/davl 1 1 Reformate 1 34.00 1 8000 1

Premium 11000

I LSR Na~htha I 26.00 I 65OKl

Regular 9000

- --

1 n- Butane 1 10.30 1 40001

9000 88.5 77.0 10.8

33.00

Minimum demand, bbl/day ndinimum RON Minimum MON Maximum R W Vaiue, $/bbl

1 FCC Gus 1 31.30 1 6000 1

11000 91.5 80.0 10.8

37.50

Table 4.2: Feedstock Costs and Avahbilities

Page 63: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Table 4.3: Feedstock Quaiitiea

---

MON 0.3 0.3 RVP 0.15 O. 15

Table 4.4: Standard deviations of the uncertain feedstock qualities and associatecl measurernent noise with the feedstock quality sensors

The given feedstock qualities (Table 4.3) will be taken as the mean or expected feedstock qualities in ail the aises studied. The ectual feedstock properties are mod- eled as non-stationary disturbances superimposeci on the nominal (constant) values. In all the R!TO stmctures considered, the RTû is executed every 2 hours, and al- though optimal feedstock flow-rates are generated for the rernnining blend, they are only executed for the current RTO intervai. It is a h assumeci that the execution t h e of the optixnizer is negiigible. The structure of the noise at the input to the ninning tanks is that of a random walk sequence or integrated white noise [Box and Jenkins, 19761. The trader function representation for integrated white noise is:

where u is zero mean, white noise (standard deviations for each quality given in Table 4.4) , and xk is the deviation (at the enhance to the ninniqg tank) of the actud f d o c k quality from the nommal value at the kth FU0 interval.

The tanks themselves are BSSUrned to be w d mixed and to hold a constant lwel at all times. The t r r d k r function representation for aU feedstock tanks is:

where is the deviation (at the entrance to the blender) of the actual feedetock quality fiom the nominal value at the kUL Kï.0 interval. The t r dé r hc t ion for al1

Page 64: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

the feedstock tanks (&ution 4.3) is a M order filter with a time constant of four (4) hours. yk is applied as the distutbance to the feedstock quality at ElTO intemal k. Thus, the quality disturbance at each feedstock inlet to the blender is white noise coming through an integrator and a well mixed, constant level tank.

IR addition to the above mentioned disturbmces, all q d t y sensors (of all feed- stocks) have associateci meatmexnent noise* The measutexnent noise is BSSUrned to have a zero mean, white noise structure. The disturbance term is assumeci to remain corstant during each RTO intervaI (two hours). The m a l l t r d e r functions for the actual and mea~u~ed feedatock qualitiea are thus given by:

where gk is the dwiation of the measured feedstock quality from the nominai value

and wb is the measurement noise term with standard deviations given in the second column of Table 4.4.

The two octane numbers are relate- measures of the same property for gasoline viz., the ability to resist pre-ignition combustion palmer and Smith, 19851. This translates to a st~ong correlation between the RON and MON for any gasoline feed- stock or blend. Therefore, the quality disturbances (a) are designecl such that the RON and MON of each feedstock are correlateci with a correlation coefficient of apprmïmately 0.9. The RVP of a gasoline is a property that may be unrelateci to the octane numbers. Thus, the correlation between the RVP of a feedstock and RON or MON of the same feedstock is statistically insignScant in this case-study.

As the nature of the disturbances is stochastic, a long enough simulation is needed so that "goodn results are obtained, in a statistical serise. For the above reason, all

the optimizers are run on a set of one hundred ( lOO) , twenw four (24) hour blend sim-

ulations. Thus, the benbarking case study consists of one hundred, day long blends produced using the d o u s blending optimization algoritlum. The RTO kequency (as mentioned above) is fixed at 12 &y-'. This d e s aIl the individual q d t y disturbance vectors 1200 elements long. The same disturbance vectors (Meiilent for each feedstock and quaLw) are used in all the caseshies.

Optimizer performance is measured by the profit generated by the particuIm o p tirnizer over one hundred, one day simulations. In the case where the optimizer generates blends whkh are feaSbIe (in the sense that they meet aU the sp&c& tions), profit calculation is ecrsy 8s the cost data is known. If the blend at the end

Page 65: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined
Page 66: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

earb &y's batch is plotted for both grades blended (Figures 4.2 and 4.3). As specified in Problem 4.1, these results are obtained by solving one optimization problem for each day's blend (instead of solving twelve optirnination problem, one every two

hours), with ail feedstock qualities 89sumed known &y. It can be seen in Figures 4.2 and 4.3 that both RON and RVP for repuiar grade as well as premium follow the spedcations &y. ûn the other h d , the blend MON is wdl above the minimum MON constraint for both grades. Studying the Lagrange multipliers for the blend quality specification constrainta (Appendix G) d e s that the minimum RON and maximum RVP constraints are active for all 100 batches whiie the MON constraint is never pushed.

Figure 4.2: ReSults for benchmark algorithm (d qualities known): reguiar

The demmd constraints used throughout the case study were modified from mini- mum and maximum "blend batch" demand constraints (applied owr the whole day's batch) to dernand constraints over each individu81 "subbatch" (FiTO interval). This is because, in the LP + bios and Feasibility Horizon EtTO formulations, the blend period beiiig considerd might not indude the full blend batch, whereas alI feedstock flows to the end of the blend are needed to form Wend batch" constraints.

Page 67: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.3: Results for benchmark (all qualities k n m ) case: premium

4.2.2 Linear Programming & Bias Updating

The simplest formulation of RTO, Linear Programming with bias updates was used to generate blend recipes for the case study describecl in 5 4.1. In the optimization step, only the current feed flowratea are calculateci and as describecl in 3 1.3, the LP + bias algorithm ignores what has been blended so far, as well as any predicted parameters when caiculating feedstodc flowrates for the m e n t R!I'O interval. As the LP + bias approach optimizes over the m e n t RTO i n t d ody, the size of the optimization problem is given by:

Within the LP + bias framework there are two p d b l e a p p r d e s that can be used for the model update phase. If there are no measurements amilable for the uncertain panuneters in the blending modd, nominal or expected values for these parameters (feedstock qydities in our case M y ) are used and the bias update step is

expected to keep the model current. If, howwer, measurements for these p8l:amete.r~ are available, these can be used to update the matrix in Probiem 1.2 in addition to the bias updating (bias model updating is retained as the measurements used are noisy) .

Page 68: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

1 Blend 1 Re-dar 1 Premium 1

Table 4.6: Resuits for the LP + bias updating (nominal feed puaiities) algorithm

Average daily production (bbllday) Average daily profit ($/dsy) Infeasible blends (days)

Blend 1 Reoulur 1 Premium 1

11,kl0.00 30,212.00

70

-- -

Table 4.7: R d t s for the LP f bias updating measured feed qualities) algorithm

11,000.00 67,588.79

67

Average daily production (bbl/day) ' 10,513.33 i 11,000.00

Both these variations to the LP + bias updating algorithm were implemented on the case study and the r d t s are given in the sections that follow.

Average daily profit ($/day) Infeasible blends (days)

LP + bias updating using nominal feed qualities

29,214.82 1 70,105.99 38 1 36

In the hst approach, only blended quaüties are measured (after the fact). Nomi- nal values are used for the feedstock quelities as it is 85sumed that they are not mea~uxed/ rn~able . The measured blended qyalities fiom the prwious IWO pe- r i o d / i n t d are used to calculate the bias (equation 1.3) which is updated. The results obtained by implementing this approach on the case 8hidy are given in Table 4.6,

The blended quaüties and the amount of gasoline blended at the end of each day's batch is plotted for both grdes blended (Figures 4.4 and 4.5). The blended RON and RVP are off-specification for more than half the (regular and premium) batches produced whereas the MON is within specifications for all one hundred days/batches. Thus, wen though all batches for both blends are produced at the rntuchum allowed production rate (11000 bbllday), there is a sipifkant penalty imposeci by reblending costs.

LP + bias updating using measured feed qualities

In this approach, rnamred feedstock qualities are used to update the blencüng model and the me8su1ed blended wtiies are used in bias updating. The results in Table 4.7 were obtained by using this scheme of modd updathg.

Using this modified LP + bias updating approaich, are obtained wi th an inuease of more than $ 1500/&3 compared to the nominal LP + bias updatmg approd.

significantly better r d t s in the average daily profit This inmaseci profitability

Page 69: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.4: Results for LP + bias updating with nominal feedstock qualities: regular

Figure 4.5: R d t s for LP + bias updating with nominal feedstock qualities: premium

Page 70: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.6: LP + bias updating using measured feed gualities: regular grade

Table 4.8: R d t s for the THWO (determinMc constraints) algorithm

is due to the decrease in the production of off-specification blends and inspite of the somewhat decreased regular blend production. The plots of the blended qualities (Figures 4.6 and 4.7) also show a tighter control on RON and RVP.

10,796. l? 69,557.99

26

Average daily production (bbl/day ) ' 10,397.94

4.2.3 Time-Horizon RTO - Deterministic constraint s

Average daily profit ($/day) Infeasible blends (days)

The Thne-Horizon RTO approach (0 1.3) uses current m-ed feed quaïtiis, pre- dicted future feed q d t i e s and merwred qualities for the blend produced thus far to caldate blend recipes over the remahhg portion of the curent batch. This for- mulation looks at the whole batch at each RTû execution to generate an optimal trajectory for the feedstock flowrates. Even though feedstock fimates are d d a t e d for all future i n t d at each step, only the recipe for the current interval is imple mented. This process is repeated until the end of the batch is reached. The results obtained by applying the THIZTO formulation on the ctw+study are presented in Table 4.8.

29,608.54 24

Page 71: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.7: LP + bias updating with mea~u~ed feedstock qualities: premium grade

Rom the blendeci quality and quantity plots in Figures 4.8 and 4.9, some fmtures are observed which were not present in the blend quality plots studied thus far. Although there are leas infwible blends produced with this approach than using either of the LP with bias updating formulations, the infeasible blends produced using the blend over horizon form have relatively larger specification violations (for both RON and RVP). W a t i o n of the optimization r d t s for the subbatches ( redts of each RTO step) for the batchesldays with the infeasible blends, r w d that most of the infeasible blends r d t from optimization problems that have no feasible solution. Thus, in these cases, at some RTO i n t d before the blend is complete, the optimization problem to be dved to obtain blend recipes becornes infeasible. As a result of the above, most batches with blend quality sp&cation violations &O violate the minimum required production/demand constraints (Figures 4.8 and 4.9). This reduction in production r d t e d in the lower total profit seen for this formulation.

4.2.4 Tirne-Horizon RTO - Chance constraints

The chance constrainai time horizon RTO formulation is derived from the tirne hori- zon IYTO form by using probabüistic const~amts in place of the deterministic cpdw

spdcat ion constraints (5 3.3.3). The probabilistic or chance constraints hmed use

Page 72: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.8: Results from Time-Horizon nr0 algorithm: regular

Table 4.9: Results for the THFtTO (chance constraints) aigorithm

Average daily production (bbllday) Average daily profit (S/day) Weasible blends (days)

the quality disturbance structure information and try to ensure that the probability of the q d w constraints being satisfied at the end of the blend is hi&. For the cur-

rent case-udy, the chance constreints use the statistics of both the future feedstock quality predictions as w d as the mea~u~ement noise msociated with the feed qual- ity sensors. Individual chance constraints are used with the minimum probabiliw of constraint satisfBCtion eet at 95%. Thus, in Problem 3.22, * = [ 0.95 0.95 0.95 lT. The results obtained by using this formulation are given below dong with the plots of blended qydities and quantities (Figures 4.10 snd 4.11) for both gasoline grades.

Results for the h c e constrained THElTO approach exhibit behaviour similar to the T m 0 r d t s described above in 5 4.2.3. Howwer, the number of infeaSib1e blends produced is reduced to l e s than a third for a total of 15 Uifeasib1e blends. This dong with increased production rates give an average daiiy profit that is $2,130.84 less than the m81Qmum achiemble average daily profit.

10,375.57 29,153.70

8

10,916.99 72,448.41

7

Page 73: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.9: Results fkom THEiTO algorithm: premium

4.2.5 Feasibility Horizon RTO - Deterministic constraints

The Feasibilify Horizon ElTO (FHIYTO) formulation is a dynamic blending optimiza- tion formulation derived fiom the THKïO form (5 3.3.3). The optimization problem at each interval is done mer a flexible, receding horizon iristead of over the complete blend. Although results were generated for m E [k, k + 1, k + 2, k + 31 in Problem 3.26, only the zercrstep ahead (m = k) Feasibility Horizon ElTO or the Feasible over Currmt Interval results are presented here. R d t s for the one, two, and three step ahead FHElTO f o m applied to the case study are summ&ed in Appendix H.

Feasible over Current Interval

In the zero-step ahead Feasibility Horizon RTO or Feasible over Current I n t d approach, qualîties of the bled produced up to the m e n t RT0 i n t d are used dong with measurements of current feedstock @tia to caldate the blending recipe for the m e n t KïO i n t d . As feedstods 0ow-rates are calculateci ody for the m e n t KïO interval, the a t l y constraints speofy that the blend be f&ble at the end of the m e n t RTO execution instead of the end of the batch/day. The r d t s obtained using the feaSble ovet mrrent i n t d RTO scherne are given in Table 4.10.

The feasble mer m e n t interval approach applied to the csse study d t s in a

datively hi& total profit partly due to the l m number of infeasible batches produced.

Page 74: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.10: R d t s from chance constraînecl THRTO dgorithm: regular

Figure 4.11: Results fiom chance constrained TEKïO algorithm: premium

Page 75: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Table 4.10: Results for the FNElTO (deterministic co~l~traints) algorithm

BIend Average daily production (bbl/day)

1 I 1 1 I 1 ? , + , 0.9'0 10 20 30 4û 50 80 7û ôû 9û th Day l B&nd t

Figure 4.12: Feasible over Current Interval RTO algorithm regular

Regular 10,513.33

This is also apparent fkom the q d t y and productions plots in Figures 4.12 and 4.13 which show the tight spread of the blended RON and RVP wriation. The premium blend production rate plot indicates that it stayed at the demand maicimum constraint throughout the 100 day long batches.

Premium 11,000.00

4.2.6 Feasibility Horizon RTO - Chance constraints

71,623.98 19

Average daily profit (%/day) Infeadble blends (days)

The chance comtrained FMbility Horizon FIT0 formulation extenàs the Ferrsibiliity Horizon IYTO scheme to include chance or probabilistic constraints for @ty speci- fication constraints that use rneasured current feedstock qualities as well es predicted future feed qulities. Although results were generated for the zero-step &ad up to three-step ahead forms of Roblem 3.27, ody the zero-step ahead Feasibiliity Horizon EiTO or the Feasible over Current Interval results are presented here. Results for the one, hm, and three step shead Chance Constrained FHRTO forme applied to the case study are summuked in Appendix H.

29,622.23 17

Page 76: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.13: Feasible over Current Interval al0 algonthm: premium

Table 4.11: Results for û-step ahead F m 0 (chance constraints)

Average daily production (bbl/day ) Average daily profit ($/day) Infeasible blends (dwsl

Feasible over Current Interval

In the O-step ahead Feasibiüty Horizon ElTO form (m = k in Problem 3.27) only the current intervals feedstock flowrates are miables in the optimïzation problem. Thus, the only uncertainty in the formulation of the qualiw constraints cornes fkom measmement noise crssociated with the rn-ed current feedstock qdt ies .

The Ogtep ahead FHRTO + CCP fomdation r d t s (Table 4.11) are the best in the westudy so far. The infkasible batches produced in the 100 day simulation are very few, and the overd daily profit high, as the reblending penalty for infeasible batches is avoided. Thus, even though the average production rate is lower than that for the Fewible over Cment I n t d case (without &ce constraints), the average M y profit is higher by more than 1,500 $/day.

10,>67.19 29,999.16

1

11,000.00 72,751.01

2

Page 77: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.14: Results using chance constraineà 0-step ahead FHRTO algorithm: reg- ular

4.3 Discussions

In this chapter, diaerent Real-The Optimization aigorithms were implemented on a simple gasoline blending case study to observe how these algorithms handle constraint parameter uncertainW. This uncertainty was simulateci in the case study by using noisy meamements of disturbances in feedstock qualities being routed to the blender through running feedstock taaks. The three categories of RT0 algorithms tested

on the case study were: 1) conventional, static LP + bias optimization algorithms; 2) dynamic TimdIoïizon FE0 algorithms with deterministic constraints, and; 3) dynamic TirneHorizon RTO a l g o r i t h with probabilistic constraints.

The LP + biaa algorithma only consider the cul~ent interval and do not consider the blend produced thus far or that to be produced over the blend horizon. As seen in Table 4.12, these factors contribute to the Iow average daily profit seen for the L P + bias forms. The r d t s for the L P + bios algorithm that uses measu~ed feedstock qualities (in addition to bias updatuig) are rnarkedly better than those where the nominal feedstock qualities are used.

The Time-Horizon ItTO algorithm is a specid case of the Flexible The-Horizon RTO scheme discussed in Q 3.3.3 (m = n in Problem 3.26). Results for this fidl Time-Horizon RT.0 algorithm also show a low average daiiy profit; comparable to

Page 78: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.15: Results using chance constrained k t e p ahead FHRTO algorithm: pre- rnium

that obtained by using the LP + bitu algorithm using mecwred feed qualities, even though the number of inféasible blends produced is reduced by a third. The fidl TimsHorizon RTO approach allows the optimizet. some flacibility to sacrifice short term feasibiliw for overd economic gain. In some cases, this strategy can lead to a situation fiom which there are no feasible solutions. It is these situations that l d to the incomplete blends seen in 5 4.2.3 where the optimizer itself fails to fhd a feasible solution at an RTO interd before the end of the blend. By introducing the feasibility horizon as a tunable parameter, the Feasibiliw Horizon FtTO formulation offers an opportuniw to tradesff between aiming for higher profitabiüty and of avoiding the infeasibiliity problems in the full THFtTO approach. Using a shorter f&b0iIity horizon forces the optimizer to follow s more coiiservative solution trajectory. This is because there is less flexibility to tradesff short term feasibiliity for economic gain over the blmd horizon.

R d t s for the zero-step ahead Feasibility Horizon RTO (or Feasible over C m m t Interval) approach reflet the above tradeoff where short term feasibility is chosen

over (possible) long term profitability- As the optimizer is requireà to generate solu- tions that sa* quality constraints over the m e n t ElTO interval itself, the results for this approôch show a significant improvement over the full Trm&Iorizon nr0

Page 79: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

LP + biBs (nominal) 1 LP + bioB (measured)

THRTO + CCP O - step FHRTO $ i - step FHRTO $ 2 - step FHRTû 3 - step FHRTO O - step FHRTO +CCP $ 1 - step FHRTO + CCP $ 2 - step FHRTO + CCP $ 3 - step FHRTO + CCP $

Table 4.12: Results for all nr0 formulations in the gasoline blending case study

approach with less infeasible blends. R d t s for the one, two, and three step FHRTO forms, presented in Appendix H, seem to follow a trend where as the feasibility hori- zon grows from the current intemai to three intervais ahead of the current interval, the profitability decreases. This trend may be a consequence of how the case study problem (the profitability measure in partidar) is formulated and needs M e r in- vestigation.

Resulta for the chance constraiaed form of the full -0 (Problem 3.22) a p

proach show an increase in average daily profit over the THELTO formulation with deterministic constraints. This improvement is expected as the probabilistic con- straints for the bknd qua& spe&cations in the Time-Horizon RT0 f o m allow the Chance Constrained THRTO formulations to compensate for f d t o c k quality un- certain@ directly. Signifiant improvements, especially in reduction of the number of total infeasible blends produced, were noted for each of the chance comtrained fonns of the Feasibility Horizon IYTO formulations. The r d t s for the chance constrained one, two, and three step ahead Feasibbity Horizon EU0 forms also exhibit a trend similar to that seen for their deterministic constraint forms with a dmease in aver-

age daily profit (and inaease in number of infeasible blends) as the feasibility horizon grows fiom the m e n t interval to three intervals ahead of the m e n t interval.

The best performance was o b s d for the chance constrained f o m of the Fea- sible over Current Interval with only three infeasible bleds. EsCamination of the blended quality profiles of the deterministic constrained and chance constrained zero- step ahead THRTO formulatons (Figures 4.12, 4.13, 4.14, and 4.15) shows how the probabilistic constraints face the optimiser to back off fiom ail the constraints that

Page 80: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

have uncertain parameters. On comparing the blended r w a r grade q d t y profla for the above formulatio~m in Fi- 4.12 and 4.14, it cm be o b s d that d the qyality profiles are very similar between the two figures and both the octane number profiles in Figure 4.14 appear shifted upwards with respect to Figure 4.12. Similu1y, the blended RVP profile Q shifted downwmds in Figure 4.14 with respect to Figure 4-12,

The results for the T i H o r i z o n RTO (both with and without chance constraints)

presented in this chapter were generated using minimum and rnmchum demand con- straints mer each FtïO i n t d . AUowing demand over the full blend constraints gives the optimizer additional flexibility/m~~neuverabili@ to aim for higher economic benefk Additional r d t s were generated by using demand over blend constraints (dong with relaxed individuai interval demand constraints) for the deterministic as well as chance constrained THRTO forms. These results, dong with a rnodSed benchmark given by the ideal case Tim+Horizon formulation, are presented in A g pendix 1. On comparing these r d t s to those presented in this chapter, it can be seen that although the new benchmark shows an increased average daily profit (by - $218/day), the T m 0 r d t s using the dernand over blend constraints are in fact worse than the results obtained using only demand over interval constraints. This behaviour seems to be another instance where additionai flexibility to trade-off near term f d b i i t y for incread profit over the blmd leads to the optimizer getting into an urirecoverable situation.

The concept of qualiw give-away where blended qualities exceed specifications is give. a lot of importance in m e n t petroleum refining practice [Rigby and Wmen, 1995; Honeywell Hi-Spec Solutions, viewed 24 September, 2000; Grosdidier, 1997]. A number of conventional gadine blending optimizers f o d a t e the optimization prob lem such that any quaüty give-away is minimized [Anonymous, 19971. The primary reason behind this practice is that giveaway is considered expensive because most of the feedstoh with desirable properties are more expensive. For example, Reformate, which in the case study has high Octane Numbers and an exceptionally low RVP, is one of the most expensive feedstoh. Minuaizing @ty giveaway explicitly in the optimhtion formulation however, can be couter-productive, as it alters the ob- jective function by reducing the importance of p d y econamic fktors. The above statement is supported by the fact that dl the blended q d t y profles, for di the optimisation dgorithms used (induding the benchmarks), show that blended MON exceeds blend grde specifications by a fair nmgin.

The economic pedormance of the different RTO approaches used in this case

study is mmpared gmphidy in Figures 4.16, 4.17, and 4.18. These plots present

Page 81: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure 4.16: Performance (profit/blend) cornparison between LP + bias updating algorithms and the benchmark algorithm

daily profit pro* for each of the Real-The Optimiffers dong with the daily profit profile for the benchmark (dl feedstock qualities k n m ) THRTO ideal case. The daily profit profde for the bencihmark (the upper line in all plots, with dots to represent daily profit) represents the maximum achievable profit on each of the 100 days in

the case study. Thus, the area between these profit profiles represents lost profit. The ability of Probabilistic Programming formulations to reject the negative decta

of uncertain@ in constraint parameters is apparent on comparing the two plots in

Figures 4.17, and 4.18.

4.3.1 Computational Issues

Worst case computation times for a single ELTO interval are presented in Table 4.13 for all nr0 algorithms used. As all deterministic constraints are linear in this case shidy, both of the LP + bias updating algorithme, and both of the T ï e Horizon EYTO schemes translate to LP formulations. The Optimization Toolbox [Coleman et d, 19991 uses an interior point method based on the predictorixrrector algorithm

presented in Mehtotra, 1992 to solve the LP problems posed by the &st four dg* rithms in TabIe 4.13. The RTO formulations with chance comtmhts (algorithms five and six in Table 4.13) r d t in optimjzation prob1ems with non-linear constraints (33.3.1). These NLP problems are solved using a sequential quaciratic programming

Page 82: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

x 10' t l r

7 -

l'o 20 io 4il 5b 6 i ;O blend # or dey

Figure 4.17: Profit profiles for THElTO algorithms

Figure 4.18: Profit profiles for Feasib1e over Current Interval aiporithms

Page 83: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Table 4.13: Worst case computation ümes for the RTO f o d a t i o n s used

Algorithm LP + &os (nominal) LP + Mas (meosured) THRTO O - step FHRTO THRTO + CCP

(SQP) algorithm by the Optimization Toolbcx. AU RT0 fondations d in the ctse study except for the two Time Horizon RT0

(deterministic and chance constrained) require the solution of a fixeci size optimization problem for dl RTO intervals. This is because, both of the LP + bis , as weli as the two Feasibility Horizon RTO forms only optimize for the curent interval's feedstock flowrates, resulting in an optimization problem of size 10 (NICtds- = 5, IVwadcs = 2 in Equations 4.5 and 3.28). In the two T i e Horizon RT0 forms, the size of the optimization problem solved at each RTO interval in a blend batch varies from 120 to 10 (NIecdstockS = 5> Ngrd = 2, while NRTo varies kom 12 to 1 in Equation 3.23) over the period of the blend.

The worst case single RTO computation times are very close for both LP + bias algorithms and the Feasibility Horizon RTO (deterministic constraints) algorithm be- cause, for these three algorithms, each IlTO computation involves the solution of a 10 optimization variable LP. The chance constrained Feasibility Horizon KT0 formu- lation requires solution of a 10 optimization variable NLP problem, which accounts for the inaease in computation t h e . For the T h e Horizon EiTO formulations, the largest cornputetion times were required for the =lier ItTO intervals when the wm-

ber of optimization variables is higher. As seen in Table 4.13, the Chance Constrained THFtTO (NLP) formulation required sigdicantly more computation than the deter- ministic comtrained -0 (LP).

worst case computation times 0.8 seconds 0.8 seconds 1.2 seconds 0.7 seconds

11 minutes, 56.3 seconds O - step FXRTO + CCP 1

, 2.0 seconds

Page 84: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Chapter 5

Conclusions and Future Work

One of the guiding principles behind modem industry has always been achieving maximum possible profitabiüty. In recent times, other principles, such as safety and environmental impact, have gained equal importance, especially in the chernical and petrochemical industries. AU of these ideas lead very naturally to the discipline (and pradice) of C1osed h o p Real-Tie Optimization.

CLElTO involves h g large volumes of information from the process being o p timized, as well as economic and environmental data affecthg the operation of the process, to caldate optimum operating points for the pro-. AU of thia data used

has associated uncertainty, be it the fluctuation in crude oil prices or the unpre dictability of weather systems in the area. This wicertainty can cause the CLRTO system to generate solutions that are suhptimal or infessible with respect to the physical process being optimized. Conventional Kî0 systems either ignore this un- certainv altogether, or try to compensate for it in an indirect manner.

Stochastic P r o g r h g involves using information about the process model's uncertainw in fomulating the optimization problem, euch that the solution minimizes (in some sense) the undesirable effects of this uncertainty. h tbis thesis, ideas fkom a branch of Stochastic Rogramming, Probabiliste Programming, were testeci on the g~soline blending optimization problem. The general gasoline blending optimization problem involves mai0mizing the profit obtained by selling the blend, mbject to blend quality specifications, feedstock: adabiilitie and product (blend) demands. All of the economic f a o r s and constraint parameters that are used in the fornulaton of this optimization problem are uncertain to some degrec The focus of this work was

ushg Robabi ic Programming techniques to address the parmetric uncertainw associated with the blend quaLw spedcation constraints.

A Feasx*bili@ Horizon IZTO formulation, deriveà from the TMiTO approach pre- sented by Singh [1997], was developed in this work. This formukition offers ffexibility

Page 85: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

to specüy a f&biliv horizon for the optimization problem, instead of using the fixed horizon (@va by the end of the blend) used in the earlier work. Feasibility Horizon RIO, with diffbrent f d b i l i w horizons, was applied on a case study problem in two

forrus; 1) F m with deterministic blend qualiw mnstraints, and 2) FEEiTO with

probabilistic constraints. The results from these two forms of the FHRTO formulation were then compareci to the r d t s obtained by applying the fidl THIZTO approach, as well as conventional blending optimization algoritlum.

Results fiom the gasoline blending case study CO& that conventional LP + bios algorithnzs do not handle uncertainty in the constraints very well. The formulations with chance constraints perfomi siepificantly better in the case study than those with det erministic comtraints (expected values used for uncertain paramet ers). Also, the FHRTO formulations (both deterniinistic as well as probabilistic) with longer feasibil- ity horizons have a tendency to àrive the blend being produced, into situations from where the optimizer cannot recover. A longer feasibility horizon requira prdctions further into the future (which leads to higher uncertainty). Thus, although a longer optimization horizon dows the optimizer more flexîbility (more variables) to aim for higher profit, the greater uncertainty in the constraints can lead to these infeasible blend situations. For the case study used, the best performance was obtained by using the zerrtstep Feasibility Horizon EYTO formulation with chance constraints (Chance Constrained Feasible over Current Interval RTO).

AU probabilistic constraints used in this work were individual probabilistic con- straints a. e., each constraint was given a minimum probabüity of feasibility. Although a joint probabilistic constraint where the entire set of inequality conatraints is given a minimum probability of feasibility is a more natural formulation, further work is needed to develop solution techniques needed ta solve that problem. M e r research is also needed to explore the role and effectiveneas of the other Stochastic Program- ming techniques (besides Robabilîstic Progremming) in d&g with the uncertain constraints problem.

Two of the assurnptions used while designing the gasohe blending optimization case study, were that, 1) the structure of the (Octane Number and RVP) blending models is known &y, and 2) the time seines disturbance mode1 is hm ~urctly. As discussed in Singh [1997], it can be very difEcult to determine the tnie structure

of m a t gasoline property blending models (especially Octane Number models). In practice, the disturbance modela would be obtsined by ushg T i e Series Analysis [Box and Jaikins, 19761 and thus would also be uncertain to some extent. The of these uncertainties on the overall optimization problem m e not addressed in this work, and need to be exsrninecl.

Page 86: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Another outstanding issue that needs furfher research is uncertahty in the opti- mization objective function. Objective function uncertaintyt as o p p d to constraint function mcertainty, does not @y itself) lead the optimizer to infeasible solutions. It can, howwer, lead the optimizer to solutions that are subptimal with respect to

the actual process.

Page 87: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Bibliography

Anonymous (1997). Advanceci control and information systems '97. Hydmcorbon Pm- eessing pp. 9û-104.

Avriel, M. (1976). Nonlinear Pmpmming: Analyshp and Methoh. Prentic&Hall. New Jersey.

Bain, M.L., K.W. M d e l d , J.G. Maphet, RW. Szoke, W.H. Bosler and J.P. Kennedy (1993). Gasoline blending and inte ated on-line optimization, schedul- ing and control system. NPRA Comp. ~ o n f ~ o v . , paper no. CC-93-191, 129- 139.

Biegler, L.T., L.E. Grossman and A.W. Westerberg (1985). A note on approximation techniques used for process optimization. Comp. d Chem. Eng. 9(2), 201-206.

Box, G.E.P. and G.M. Jenkins (1976). Tirne Series Anaiysis: Forecasting and Conbol. Holden-Day. Oakland, CA.

Cao, S. and R.R. Rhinehart (1995). An efficient method for on-line identification of steady state. J. Proc. Conhl 5(6), 363-374.

Chames, A. and W.W. Cooper (1963). Deterministic equidents for optimiPng and satisficing under chance constraints. O p e m t z o ~ Reseurch 11, 18-39.

Coleman, T., M.A. Branch and A. Grace (1999). Optimuotion Toolbox User's Ouide. The Mathworks, Inc.

Constantinou, L., K. Bagherpour, R. Gani, J.A. Klein and D.T. Wu (1996). Com- puter aided product desip Problem formulatons, methodology and applica- tions. Comp. d Chem. Eng. 20, 685-702.

Crowe, C.M. 1988 . Recursive identification of gross ermrs in linear data reconcilia- tion. A I hhE 3. 34,541.

Crowe, C.M. (1996). Data reconciliation - progress and challenges. J. P m Conhl 6,89-98.

Dantzig, G.B. (1955). Linear progamming under mcertainQ. Management Science 1, 197-206.

De Hennin, S.R (1994). Structural Decisiom in On-line Rocesri Opthchation. PhD thesis. University of London. U.K.

DeWitt, C.W., L.S. Lasdon, A.D. Waren, D.A. Brenner and S.A. Melhem (1989). Omega: An improved gasohe blending systern for texaco. Interfoces 19, 85- 101.

Page 88: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Edgar, T.F. and D.M. Himmelblau (1988). Optirnization of Chernicd Pmcesses, McGraw-HU. New York.

Fletcher, R (1987). Pmctical Methods of Optimizcrtion. John Wiley & Sons. New York.

Forbes, J.F. (1994). Model Structure and Adjustable Parameter Selection for Opers tions ûptimization. PhD thesis. McMaster UniversiW. Canada

Forbes, J.F. and T.E. Malin (1993). Model updating co118iderations for real-time optirnination. IFAC Workshop PCPI '93. Dusseldorf, kmany.

Forbes, J.F. and T.E. Marlin (1994). Model accuracy for economic optimizing con- trollers: The bias update case. Ind. Eng. Chem. Res. 33, 1914-1929.

Forbes, J.F. and T.E. M a r k (1996). Design cm: A systematic approach to technol- ogy selection for modd based reel-time optimization systems. Comp. El Chem. Eng. 20,717-734.

Forbes, J.F., T.E. Merlin and J.F. MacGregor (1994). Model adequacy requirements for optimizing plant operatiom. Comp. El Chem. Eng. 18, 497-510.

Wedman, Y. and G.V. Reklaitis (1975). F1acib1e solutions to linear prograrns under uncertainty : inequality constraints. A I ChE J. 21 (1) , 77-83.

Garcia, C.E. and M. Morari (1981). Optimal operation of integrated processing sys tems. AICkB J. 27,960.

Garcia, C.E., D.M. Prett and M. Morari (1989). Model predictive control: Theory and pradice - a m e y . Automatica 25,335-348.

Gary, J.H. and G.E. Hmdwerk (1994). Petdeum Refining Tedinology and Ew- nomics. 3rd ed.. Marcel Dekker. New York.

Gill, P.E., W. Murray and M.H. Wright (1981). Pmctical Optirnizution Acadernic Press.

Givens, L. (1985). Modern petroleum refining: An overview. Automotive Engineering 93,69-77.

Grosdidier, Pierre (1997). Economics of blend giveaway. H~ydmcarbon Pmcessàng pp. 55-60.

H d y , W.C. Jr., C.W. Maassen and R.T. Peterson (1959). A new approach to blend- ing octanes. In: Pm. e(th Midyeur Meeting of the Amencon P e t d e w n h t i - tute's Division of Rejinmg. Vol. 39. New York.

Honeyweli Hi-Spec Solutions (viewed 24 September, 2000). Profit.plus: Blend opti- mization. http://uiww..hispec. wm/docs/diqlay. ap?dOdype=l Eld0~=54.

Hyprotech Ltd. (viewed 24 September, 2000). Hyqs.rto+. http://wum. hyprotech. corn/hysys/rt/rto. htm

Kelly, J.D. (1999). Recondiation of process data using 0 t h projection matrices. Comp. & Chem Eng. 23(6), 785-789.

Page 89: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Krishnan, S., G.W. Barton and JD. Pe~kins (1992). Robust parameter estimation in on-he optimisation- part 1: Methodology and simulateci casehidy. Comp. d Chena. Eng. 16(6), 545-562.

Lobo, M.S., L. Vmdenberghe, S. Boyd and H. Lebret (n.d.). Applications of second- order cone progrBmming.

Loeblein, C. (1997). Analysis and Structural Design of On-line Process Optimization Systems. P1iD thesis. Imperid College of Science, Technology and Medicine. U.K.

Maranas, C.D. (1997). Optimization accou~ting for property prediction uncertain@ in polyxner design- Ctmap. dem. Eng. 2l(SuppI.), 1019-1024.

Mehrotra, S. (1992). On the imp1ernentation of a primal-dual interior point method. SIAM J. Opt. 2, 575-601.

Müetic, 1. and T.E. Marlin (1998). Online statistical results analysis in real time operations optimiir.ation. Ind. Eng. Chem Res. 37, 3670-36û4.

Miller, L.B. and H. Wagner (1965). Chance-constrained programming with joint con- strahts. ûpemtions Research 13,93û-945.

Morris, W.E., W.E. Smith and R.D. Snee (1994). Interaction blending equations enhance reformtdated gasoline profitabiity. Oil €4 Cos J. Jan. 17, 54-58.

Palmer, F.H. and A.M. Smith (1985). The performance and specincation of gasobes. In: Ted>nology of Gosoline (E.G. Hancock, Ed.). Blackwell ScientSc Public* tions. London.

Prekopa, Andras (1973). Contributions to the theory of stochastic programming. Mathemutical Pmgmmmhg 4,202-221.

Prekopa, Andras (1995). Stodicistic Pmpmming. Kluwer Academic. Dordrecht, Net herlands.

Rarnsey, J.R Jr. and P.B. Thesdale (1990). Blend optimization integrated into refinery-wide strategy. Oil d Gas J. Mar. 19, 4û-44.

Rigby, A., and L.S. Lasdon and A.D. Warren . The evolution of texaco's blend- ing systems: Rom omega to starblend.

Roush, W.B., R.H. Stock, T.L. Cravew and T.H. D~Alfonso (1994). Using chance- constrained programrning for animal feed formdation at agway. Interfaces 24, 53-58.

Rusin, M.H., H.S. Chung and J.F. Marshall (1981). A Utrdomationn method for caldating the research and motor octane nubers of gasoline blends. Ina Eng. Chem. findum. 20, 19S204.

Schwann, A. and M. NhIaou (1999). Chance constrained rnodel predictive control. AIChE J. 45(8), 1743-1752.

Singh, A. (1997). Modeling and mode1 updating in the real-time optimization of gasoline blending. Master's thesis. University of Toronto.

Stewart, W.E. (19590). Predict octanes for gasoline b1ends. PekDleum Refiner 38, 135-139.

Page 90: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Stewart, W.E. (1959b). Predict rvp of b l e d accurately. Pekoleum RefWier 38,231- 234.

Sullivan, T.L. 1990). Rdinery-wide blend control and optimization. Hydmcarbon Pmceasing (M ey, 9S96.

Terwiesch, P., D. Ravemark, B. Schenker and D.W.T. Rippin (1998). Semi-batch pr* cess opthbation under uncertainty: Theory and experiments. Comp. d Chem. h g . 22 (1-2), 201-213.

The Methworks, Inc. (19990). Matlab version 5.3.

The Mathworks, Inc. (l999 b) . Optimization toolbax 2.0.

Tjoa, I.B. and L.T. Biegler (1990). Simultaneous strategies for data reconciliation and gr- error detection of nonlinear systems. AIChE J. Annud Meeting.

Tong, H. and C.M. Crowe (1997). Detectin pmistent gross mors by sequential analpis of principal components. A I Cd J. 43, 1242-1249.

Treiber, S., R.S. McLeod, Y. Faitakis and R.L. Hutchings (1998). Rfg: the challenge to conventional blending techn010gy. Hydmarbon Pmcessing pp. 101-104.

Vajda, S . (1972). Pmbilistic pmgmmming. Academic Press. New York.

van Krwelen, D.W. (1990). Pmperttes of Polyners: their cornkatton urith chernicol structure; their numeficol estimation und prediction from additive gmup contri- butàons. 3rd ed.. Elsevier. Amsterdam.

Vazquez-Espmagoza, J. J., G.A. Iglesias-Silva, M.W. Mavinka and J. Bullin (1992). How to estimate RVP of blends. Hydrocurbon Pmcessing Aug., 135-138.

White, J. and F. HaIl 1992). Gasoline blending optimization cuts use of expensive components. Oàl d Cos J. Nov. 9, 81-84.

W~ght , S. J. (1997). Primal- Dud Interior-Point Methods. SIAM. Philadelphia.

Zhang, Y. and J.F. Forbes (2000). Extended design cost: A performance criterion for real-time optimization systerns. Comp. d Chem Eng. 24(8), 1 8 2 9 4 4 1 .

Zhang, Y., D. N d e r and J.F. Forbes in press 2000). R d t s analysis for trust constrsined real-the optimization. 5. Pm. ControL

Page 91: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix A

List

al, ---, as

A A b C

d e

fO F g

h H k m n=p

n ~ d O

P PO Q r s t u v w X

Y

of Symbols

Ethyl RT-70 Octane Number mode1 correlation co&cients in Quations 3.3 aromatic content (% by volume) in Equationa 3.3 co&cient matrix for Iinm inequabty constraints right hand side vector for hear inequality constraints objective function cost parameters vector of mmcimum expected violations in Problem 2.9 vector of economic data for the blending optimization problem objective function normal probability distribution function vector of noniinear functions in the blend quality specificat ion constraint s vector of inequality constraints coefficient matrix for the demand and amilability constraints m e n t RTO intenral vector of feedstock MON number of components or feedstock number of quality or property constraints vector of feedstock olefin content (% by volume) seiiinp price of a blended gasoline grade probability of an event matrix of feedstock qualities vector of feedstock RON blend quality spedications vector RTO time interval white noise time series (source for quaIity disturbmces) vecor of feedstock RVP blending indices measmement noise t h e series decision variables; wctof: of feedstock flmates feedstock @ty disturbance time series

Page 92: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

backward shift operator ma& of mmimum variation in inequality constraint parameters in Problem 2.13 bias vector in LP + bias updating and NLP + bias updathg problems vector of back-ofb fiom active constraints in Roblem 3.9 vector orthogonal to aj (Ekpation 2.14) vector of constraint parameters in Problem 2.1 minimum probability of feasibility for a probabilistic constraint, j vector of blend demands and f d o d c av8ilabiiities standard deviation normal distribution constant defineci by Equation 3.8 matrix O, modified for constraints with coltlmn-wise linear dependence (see Problem 2.15) volume fiaction of component (feedstock), i right hand side vector for linearized Wty constrainta (Equation 3.19)

Page 93: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix B

Interpretation of CCP

The 2* blend quality mIlStraint in Problem 3.6 can be expandeci to give:

(in the ~OYIII gi(x < O) the variance of w k 'ch is:

for known x :

where j is the feedstock index and oj is the standard deviation of the ith quality index of the jth ffeedstock (given).

Page 94: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix C

Bounding joint probabilities

For n events, A, Boole's inequslity states that:

taking the complement of both sides and using the identity: if P(A) 5 P(B), then P(A) 1 P(B) , we get:

Inverting the above:

Let the 3 probabilistic constraints be:

i e . , A. is the event that the gh constraint is satisfied. Therefore, for 3 chance constraints with a 95% probability of feasibility each, the

iower limit on the joint probability leveI is given by:

Page 95: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure C. 1: Bounding joint probabilities

The above inequality gives us the lower bound on infeasibility of the joint probab'istic constrahts. Intuitively, it means that there is a chance that all the constraints could be violated 5% of the time and that ali violations codd be independent (only one constraint violated in any one went).

Thus if we want at le& a 95% levd on the joint probability lwd, the individual chance constraints should be at the levd given by:

(C. 10)

The example above is illustrateci in Figure C.1, where the regions of fkbil i ty of each constraint are separateci into swen regiow: X I , 22, . .. , x ~ . The problem of bounding the joint probabiüty that all constraints are satisfied can now be formdated.

C.1 Lower bound The lower bound on the probability that all three constraints are satisfied is given by the solution to the following problem.

The solution to the lower bomd problem is, xd = 0.85. Thus, if there are t h e individual probabüistic constraints with a 95% probability of fhibility, the lowest joint p robabi i of feasibility is 85%.

Page 96: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

C.2 Upper bound The highest joint probabüity of feasibility is given by the solution to:

(C. 12)

The solution to the upper bound problem is, xd = 1. The theorem for n simuitaneous, independent events cannot be used here be-

cause, the theorem assumes the individual constraints to be of the form: P(&-) = ai equaüty constraints). Probabilistic constraints are inequaiities given by P(AJ 1 ai*.

L e theorem for n independent events occutriflg simultaneously states that the prob ab%@ that at least one constraint will be violated is given by:

for independent events Ai, A*, 4. for P(Al) = P(A2) = P(A3) = 0.95 :

P(Al n A2 n A,) = 1 - 0.1426 = 85.74% (C. 15)

using the reverse argument (again for equality probabilities), for P(Ai nA2 n&) = 0.95, P(Al) = (0.95)''~ = 0.98305 = 98.305%

Page 97: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix D

Linearization of the Ethyl mode1

D.l The RON constraint

T T V x g ~ o ~ = rT + al {rTdiag(r - m) - (lTx)-'[rTx(r - m)T + (r - m) xr ]... T T T -1 T -2 T T ... + ( lTx)-l(r - m) xr XI ) + q{oG-2(1Tx) O xoT + ( l T x ) O xo x l T ) ...

-1 T - 2 T T T ... + a3{bG-2(iTx) b xbT + ( l T x ) b xb xi ) (D.1)

V ~ R O N = al{-xTdiag(r) + ( I ~ x ) - ' x ~ ~ x ~ ) (D-3)

D.2 The MON constraint

Page 98: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix E

Non-associat ivity of Et hyl RT-70 models

For the Ethyl IU-70 models, blending of a set of feedstocks is not associative. For an illustration, consider a scenario where three feedstocks, say a, b and, c are to be blended. The quantities of these three feeàstocks are givefl by x,, x b , and xc, while the

T octane number vectors are given by q, , q b , and q,, where qi = [ RONi MONi ] . If the blending function B(n, m, O) = q(,,,) represents the qualities of the blend

obtained by mixing feedstocks n, m, and O, the Ethyl RT-70 blending rules do not obey the following associative blending d e :

where qd = B (a, b) i. e., d is the blend obtained by mWng feedstoda o and 6. This non-associative blending behaviour means that time horizon based blending

optimization approaches wil l not work for the Ethyl EIT-70 octane number models. T h e horizon based blending optimization depends on predicting future feedstock qualities and optimiPng the feedstock flows for m e n t and future RTO intervals. The non-associative behaviour of the Ethyl rnodels implies that, even if the predictions for m e n t and future feed quaiities were exact, the qualities predicted for the end of the blend can be different fiom the actual qualities obtained at the end of the batch.

Page 99: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix

Feedstock quality prediction error variance

The overall trader function for the measured feedstock qualities as given by Ekpation 4.4:

where a = 0.61, 1 = (1 - 0.61 = 0.39, and c = (1 + 0.61) = 1.61. h m the overd t r d e r Lction:

The d a n c e of the me~su~ed feedstock q d t i e s for the cment interval is given by :

The variance for the one-step ahead prediction error of the measwed feedstock qualities is given by:

SimIldy, the two-step ahead through eleven-step prediction mors are given by the f o l l ~ g ~cpresioas:

Page 100: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined
Page 101: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined
Page 102: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix G

Lagrange multipliers for THRTO - Ideal case

Blend qualii constraint lagrange muftipliers , 1 p 21 8 2.5 1 i

RON

I

50 100 RON

Figure (3.1: T i e Horizon RTO - Ideal case; Lagrange multipliers for blend quaüty constraints

Page 103: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Reg ular

0.03 r

. -

Premium

2 0.025

0.02 rr 5 0.015 E - RI 0.01 E

0.005

Figure (3.2: Time Horizon RTO - Ideal case; Lagrange multipliers for blend demand mnstraint s

.

.

OO m 40 60 80 Reg ular

Page 104: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix H

Addit ional results for Feasibility Horizon RTO forms

1 Blend 1 Reuular 1 Premivm 1

Table H.l: Results for 1-step ahead Feasibiliw Horizon IYTO (deterministic con- straints)

Average daily production (bblfday) Average daily profit ($/dey) Infeasible blends (days)

( Blend 1 Regular 1 Premium 1

10,507.88 29,882.23

18

Table H.2: Results for 2-step ahead Feasibility Horizon RTO (deterministic con- straints)

10,990.78 71,426.52

17

Average daily production (bbllday ) Average daily profit ($/day) Infeasible blends (davsl

1 Blend 1 Reador 1 Premiurn 1

10,-412.94 i 10,898.76 29,883.68 1 70,049.38

24 1 24

Table H.3: Results for 3-step ahead F&b'ility Horizon RTO (deterministic con- straint s)

Average daily production (bbllday) Average daily profit ($/day) lnfeasible blends (days)

10&8.10 29,776.68

26

lO,?96.64 '

69,179.88 29

Page 105: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

I Blend I Revlar I Prmium 1

Table H.4: R d t s for 1-step ahead FHFlTO (chance constraints)

Average daily production (bbllday) Average daily profit (Slday) Measible blends (dam)

- - -- - -

Table H.5: Resdts for 2dep ahead FHElTO (chance constraints)

10,402.62 29,732.18

3

Blend Average daily production (bbllday) Average daily profit ($/day) Infeasible blends (days)

10,990.31 72,833.23

3

Table H.6: Results for 3&ep ahead FHIlTO (chance constraints)

Regdar 10,411.76 29,592.90

5

Average daily production (bbllday) Average daily profit ($/day) Infeasible blends (days)

Figure H.1: Quality and amount blended profiles for 1-step ahead F'easibility Horizon RTO; regular

Premium 10,981.36 72,784.70

3

10,409.47 ' 10,953.13 29,529.59

6 72,586.63

4

Page 106: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure H.2: Quality and amount blended profiles for 1-step ahead Feasibility Horizon RTO; premium

Figure H.3: QuaÜty and amount blended profile for 2-step ahead Feasibility IIorizon RTO; reguIar

Page 107: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure H.4: Quality and amount blended profiies for 2-step ahead Feasibiiity Horizon m0; prernium

Figure H.5: Quality and amount blended profiles for 3-step ahead Feasbiity Horizon FtTû; repuiar

Page 108: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure H.6: Quality and amount blended profiles for 3-step ahead Fecrsibility Horizon RTO; premium

Figure H.7: Qusljity and amount blended profles for lgtep ahead flexible Chance Constrained THRTO; reguIar

Page 109: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure H.8: Quality and amount blended profiles for 1-step ahead flexible Chance Constrained THBTO; premium

Figure H.9: Quality and amount blended profiles for 2-step ahead flexible Chance Comtrained THIITO; regular

Page 110: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure H.10: Quality and amount blended profiles for 2-step ahead flexible Chance Constrained THRTO; premium

1 1 1 I t I 1 1 t

t O 2 û 3 0 4 0 5 0 6 0 7 0 8 0 9 0 1 0 0 Day / ûiend #

Figure H.11: QuaÜty and amount blendeci profiles for 3- step ahead flexible Chance Constrsined THFUO; regular

Page 111: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Figure H.12: Quality and amount blended profiles for Bstep ah& flexible Chance Constrained THRTO; prernium

Page 112: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

Appendix 1

Demand over Blend Time-Horizon RTO Results

The results presented are those generated by using both demand over batch (day) as well as demand mer sub-batch (each RTO interval) constraints. The demand over batch or day constraints are:

- - - - -- . - - .

Table 1.1: Blend d-d over day

The demand over sub-batch or RT0 interval are:

Maximum demand, bbl/day Minimum demand, bbI/day

1 ~avimum demand, bbl/interval i 22000/12 = 1833.33 i 4500/12 = 375 l 1 Minimum dernand,- bbljinterval i 22000'/12 = 1833.33 i 4500'/12 = 375 1

Prernium 11000 11000

Table 1.2: Blend demand over each interval

Regular 9000 9000

Thus, the mBfcimum subbatch demand limits are twice the m h u m limits used in 5 4.2 while the minimum subbatch demand limits are half of those used in the case study in Chapter 4.

1.1 Ideal Case (al1 feedstock qualities known)

Table L3: R d t s for the THEM'O (Ideal case) algorithm

' BIend Average daily production (bbllday) , Average d d y profit ($/day)

The average M y profit obtained by applying the THEiTO algorithxn with all feeàstock qualities hown exactly is, $103,951 per day.

Regular 10,664.97 30,719.52

Premium 11,000.00 73,231.50

Page 113: Real-Tome of Gasoline Blending with Uncertain Parameters · Abstract Gesoline is a key revenue generator for the petr01eum rehing industry. Typically, bknd recipes are determined

1.2 Deterministic Constraints The avera e overd daily profit obtained by ushg the T i H o r i z o n RTO formulation where bo demand over batch (day) as weii as danand wa mbbatch (each RTO interval) are considemci is $97,688.

Table 1.4: ResuIts for the TEIRTO (determinisüc constraints) algorithm

B h d Average daüy production (bbllday) Average daily profit ($/day) Iiifeasible blends (days)

1.3 Probabilistic Constraints The avera e overd daily profit obtained by using the Chance Conshainecl Tb* Horizon &O fomulation where both demmd wer batch (day) as d sn damand over subbatch (each flT0 i n t d ) are considemi is $99,571.

Regular 10,126.30 29,061.97

34

Premium 10,627.70 68,626.39

35

Table 1.5: Results for the THRTO (chance constraints) aigorithm

Blend Average daily production (bbllday) Average daily profit ($/day) Measible blends (days)

Regulu~ 10,211.15 28,993.46

21

Ptemivm 10,720.36 70,577.21

20