BLEND OPTIMIZATION INTEGRATED INTO REFINERY-WIDE STRATEGY

March 19, 1990
John R. Ramsey Jr. Texaco Refining & Marketing Inc. Houston Patrick B. Truesdale Setpoint Inc. Houston To achieve the highest benefit from the optimization of product blending, the blending support systems should be integrated with the systems that support planning and scheduling functions. Texaco Refining & Marketing Inc. has been extremely active in blend optimization and the integration of this function into the refinery-wide operating strategy at its refineries.

John R. Ramsey Jr.
Texaco Refining & Marketing Inc.
Houston
Patrick B. Truesdale
Setpoint Inc.
Houston

To achieve the highest benefit from the optimization of product blending, the blending support systems should be integrated with the systems that support planning and scheduling functions.

Texaco Refining & Marketing Inc. has been extremely active in blend optimization and the integration of this function into the refinery-wide operating strategy at its refineries.

Here is how Texaco has integrated the blending support system with the off-line upstream functions of scheduling and planning. Also discussed is the use of the system in a real-time, on-line environment, and the relationship between blend optimization and the downstream functions of control and reporting.

WHY INTEGRATE

Before addressing Texaco's work in blend optimization, the functions with which blend optimization must integrate if maximum benefits are to be achieved should be addressed.

The functions necessary for the effective and efficient operation of a refining facility include activities at several levels (Fig. 1). Operations planning, traditionally supported by linear programming models of plant operations, are carried out at the corporate level or at a very high level within the plant.

The objective is to look weeks or months into the future and, based on expected unit performance, crude availability, and product demands, and come up with a plan for operating the refining facility. The net result is production targets which are placed in the hands of the scheduler.

Scheduling is a function carried out at the plant level, and the key word in scheduling has long been feasibility, although technology is now catching up with the scheduler and "optimization" is a word heard more and more in connection with this function.

At the very least, optimization is being used in short-term planning, and the time horizon addressed by this function is usually 1-7 days in the future.

Typically, scheduling is considered to be a weekly function, although major adjustments and even rescheduling may be required during this time frame when operating conditions change. The objective of scheduling is to produce orders for use by unit operators.

Still looking into the future but with a much shorter time frame and conducted at the unit level, is the optimization function. Blending, the subject of this article, is considered as a unit, subject to optimization technology in the same way as the cat cracker or the reformer may be considered candidates for optimization.

Optimization, conducted off-line, may be performed once a day, and perhaps more often as operating changes warrant. On-line optimization is usually performed every 1-2 hr, again according to the dynamics of the operating situation.

The purpose of the optimization step is to produce setpoints for use by the control function within global objectives.

Control is the only function being performed in the present. Therefore, its time horizon must be measured in minutes and seconds.

The objective of control, of course, is to keep units, including blending, in tune with all of the functions which have taken place beforehand: the optimization, scheduling, and planning functions. But an extremely important byproduct of control is also the production of data.

Properly used, data from control can contribute heavily to the integration of functions by a well-tuned reporting function. Some of the subfunctions of reporting are things like data reconciliation, performance feedback, and results analysis.

The reporting function makes it possible to compare actual performance against the performance that was so carefully planned, scheduled, and controlled. This feedback information from reporting is vital to the improvement of all other operating functions.

Keeping all of these functions in tune with each other across months and years of operations is the purpose of integration. So we are talking about consistency in the data and information used at each of these functional levels. And we are talking about coping with events like turnarounds, unanticipated downtime, abrupt shifts in the crude oil and products markets, and a thousand and one other disturbances, large and small, that disrupt the smooth refinery operations which this nice little diagram might imply (Fig. 1).

BLENDING FUNCTION

Now let's narrow our focus and, without ignoring the planning and scheduling functions, examine the blending function specifically (Fig. 2). In this diagram, and in practice, blend optimization is squarely in the middle of everything else that's going on in the refinery.

In the overall picture, the planner has reacted to economic and operational predictions across a month or more. If crude and product prices have remained stable, and if the planning model is an accurate representation of refinery operations, then the blending targets the planner has produced will be feasible and optimal.

However, as any scheduler can tell you, there will have been changes. The plan may have used tankage that isn't really available, or a unit may not be operating as expected, or not operating at all.

There may have been major changes in crude oil prices or product demands since production of the plan, and major adjustments may have occurred in the refinery's inventory position. If the changes are drastic enough, another run of the planning model may be necessary to provide realistic blending targets.

In the integrated system, however, these targets must serve as the scheduler's starting point, With a focus on feasibility and an eye on inventory levels for blending components, the scheduler translates targets into orders.

The orders may be constantly improved as the time for actual blending approaches. These orders become the optimizer's starting point.

Now let's focus on the tools for translating the scheduler's orders into blending unit setpoints which represent the optimal blending recipes: the tools of optimization. While optimization has vital functions in planning, and is applied in a limited way to scheduling as well, the focus here is concerned with blending and its relationship to other functions.

At the optimization level, orders are translated into setpoints for control. More specifically, the concern is to optimize the recipes used for blending products, particularly gasolines and distillates.

THE OMEGA SYSTEM

Omega is a state-of-the-art gasoline blending system utilizing a nonlinear programming algorithm, an on-line data base, and an interactive user interface. It is in use at all seven Texaco and Star Enterprise refineries in the U.S., and at several nondomestic refineries. Although it is a state-of-the-art system, it has its roots in the past.

By the early 1960s, Texaco had introduced computers in its refineries, had developed nonlinear equations for blend qualities, and had used linearized versions of these equations in its linear programming planning models.

Unfortunately, plans from these monthly planning LP's often had limited relevance to the blender's problems. The approximations and averages which were satisfactory for planning purposes were not acceptable to the blender.

This left a gap between planning and scheduling, a problem which is only today being seriously addressed.

A major source of inaccuracy in blending models can be summed up in a single word: nonlinearities. Accurate modeling of nonlinear properties such as octane and boiling points is very important.

It has become more so as we use optimization in scheduling and control functions, the activities that are removed from the process itself by a matter of only hours, minutes, and even seconds.

Texaco's first application of optimization techniques in a blending system came in the mid-1960s. This system was called GOP, or gasoline blending optimizer.

It used a successive linear programming optimizer called POP 11 which Texaco obtained from Share. The GOP system was used, with mixed success, in Texaco's refineries until the early 1980s. Speed and reliability were its principal problems.

By the early 1980s, the phase-out of lead additives, changes in the qualities of crude oils, and new profitability pressures on refining and marketing were demanding improvements in blending. Texaco Refining & Marketing undertook the development of a new blending support system.

Equations were taken from the GOP model, from public domain literature, and from internal Texaco studies to create a new blending model. This model was then interfaced to a nonlinear optimizing algorithm called GRG2 which was thoroughly tested for robustness before its inclusion in the new system. The result is the Omega system.

The system was also enhanced with a menu-driven user interface, and it has been implemented on personal computers as well as on mainframes. These enhancements have been highly instrumental in its acceptance at Texaco and Star Enterprise refineries.

The GRG2 nonlinear algorithm and Omega's user-friendly characteristics have also been interfaced with a model containing equations for blending of distillate fuels. The resulting system is called Nomad, and this technology package is also gaining wide acceptance.

SYSTEM BENEFITS

Just the fact that Omega is in use by all our refineries is clear evidence that the system is contributing to overall profitability. The extent of this contribution is not easily measured, however.

A comparison of earnings before and after the implementation of Omega simply won't work. There are too many other factors, things like market demand, profit margins, and even changes in refining equipment, that affect refinery performance.

In an attempt at measurement of benefits, we gathered data on blend recipes used at one refinery before Omega was installed and then went through the same exercise after the system was in full use.

Analysis of the recipe components and application of identical values to those components yielded useful comparative data. In some comparisons of product, the resulting profit increase for the Omega blend was as much as 30% of gross gasoline revenue. The average increase in profits from blends in these studies was 5%.

Two refineries using Omega were asked to make their own estimates of the benefits achieved by the system based on the increased value of product blended. One refinery estimated the increase to be 5% and the other came up with a range of 2-4%. These estimates represent a range between 1 and 2/gal.

Despite our enthusiasm for the system, we have also tried to be conservative in benefits estimation. We realize that the theoretical benefits of a computer optimizer cannot be fully achieved in the real world, and have, therefore reduced the benefit base to 0.5/gal as a realistic figure.

Applying this to the 1987 production from Texaco's seven domestic refineries, the benefits come to $30 million/year.

There are also intangible benefits. With Omega, fewer blends fail to meet quality specifications because blend property specifications are much better. Omega's more reliable gasoline grade split results in better marketing strategies, as well as better refinery production targets.

Better planning numbers and fewer late trading changes are the ultimate result. Omega also provides good gasoline blending estimates which are used in our refinery LP models, thus improving the performance of those models.

WHAT'S NEXT

A memorable moment in the development of the system was in selecting the acronym Omega. At the time it was said, in jest, that we call the system Omega because it would be the last gasoline blending system that Texaco would ever need.

It isn't, of course. The Omega experience has enabled us to concentrate on other aspects of the gasoline blending problem.

A new application, now nearing completion in our shop, integrates motor gasoline, middle distillates, and fuel oil blending with inventory management and scheduling in a single package. This package is not being developed to replace Omega, but to augment it.

BLENDING INTEGRATION

Integration of systems supporting the blending function requires three activities: integration of blending functions at the optimization level, upstream integration with scheduling, and downstream integration with control.

Up to this point, we have covered planning, scheduling, and optimization functions occurring off-line. These functions consider future activities. Off-line optimization, therefore, focuses on expected quality, quantity, and blending values.

Despite all of the technology developed to support off line functions, the blender must still work with what is actually available to meet specification and volume requirements. And what the blender actually has may be somewhat different from what the plan expected the blender to have, what the schedule ordered the blender to use, or even what the off-line optimizer tells the blender what is available.

During hours which elapse between off-line optimization of the recipe and actual formulation of the blend, there may be changes of at least two kinds.

There may be changes in the quality and quantity of blending components. Perhaps reformate has an octane value slightly higher (or lower) than anticipated in off-line optimization, for example.

The other kind of change is in the constraints that could not be considered during off line optimization. The plugging of a filter or the failure of a pump fall in this category of change.

Integration of scheduling and off-line optimization with systems at the control level requires that we consider such things as on-line optimization to address short-term changes in variables and constraints. We should also consider on-line enhancement and enforcement of optimal recipes in the link between on-line optimization and blend-ratio control.

Setpoint Inc., a firm specializing in control technology, has taken Omega and Nomad technology into the on-line arena and addressed integration of blending functions at the control level.

ON-LINE OPTIMIZATION

Setpoint's integrated concept for gasoline, distillate, and fuel oil blending systems is depicted in Fig. 3. As can be seen, this concept closely tracks functions at the planning, scheduling, optimization, and control levels which were mentioned earlier.

The detail on functions at the control level has been expanded in this version of the blending activity. It includes on-line blend optimization for blend recipe enhancement, recipe enforcement through multi-variable quality control, and integration of optimization and recipe enforcement, with the blend-ratio-control and flow-control functions that result in the actual combination of blend components into specification product.

The objective of technology at the control level is to maximize benefits which will accrue from blending, in the short term, and the production of data which will, after blend formulation and shipment, supplement-decision support systems used in planning, scheduling, and optimization as the cycle of blending functions is repeated in support of daily refinery operations.

The structure, from on-line, multi-blend optimization to ratio control, is designed to provide a loose decoupling of the economic variables of the off-line functions and the quality-control functions. These will be of vital importance in enhancement and enforcement of the optimal recipe derived from on-line optimization.

The structure is also designed for consistency of data, models, and optimization solutions developed in each functional block, from planning and scheduling down through flow control.

The structure provides a hierarchy of benefits that are additive at each decision level within the refinery.

Bringing Omega on-line involves use of on-line data at more frequent optimization intervals. While off-line optimization may be performed each day, on-line optimization must shorten this time frame to 1-2 hr, depending on the dynamics of the operation.

This results in the enhancement of the blending recipe from off-line blending by considering quantities, qualities, and constraints that have changed since off-line optimization. This enhancement must also consider the use of tank heels left over from a previous blend, or other mixtures which may have been dumped into a blending tank because of storage limitations.

This is where some of the characteristics of Omega, particularly the GRG2 nonlinear optimizer, become extremely important. GRG2 has what is called a feasible-path-search feature.

The algorithm first finds a feasible solution to the blending problem and then optimizes. It does not present unfeasible solutions.

Furthermore, Omega with GRG2 uses the Kuhn-Tucker evaluation of results to assure that the optimum solution is found.

GRG2 is very robust, and has demonstrated excellent solution times, even on fairly large problems. It can handle up to seven blends, each with 20-25 components, plus recipe constraints, minimum-maximum inventory constraints, and 1-12 specification constraints.

At this point, we start to worry about blend trim to specification because there is no guarantee that changes have not occurred between the on-line optimization intervals.

Also extremely important at this point are matters of gross error detection and data reconciliation. These are performed with a statistical process control (SPC) support facility for on-line data treatment.

MULTIVARIABLE QUALITY CONTROL

Changes in the real-time environment become the parameters for recipe enforcement.

Setpoint uses predictive, multivariable control for this purpose. It is here that we adjust our priorities.

This is the decoupling of the economic and quality control variables and constraints mentioned earlier. In multivariable control, we are first concerned about meeting all critical qualities of the blend, usually three to five, with little or no quality giveaway.

Second, we are concerned with cost minimization or profit maximization as determined by the optimizer. In other words, we first have to meet specifications at the blender, and second, we have to maintain minimum deviation from the optimum recipe.

Here again, we are shortening the time frame in which we're working from the 1-2 hr intervals between optimization runs to the minutes and seconds involved in keeping the blend trimmed to specification, in spite of changes that take place in the real-time environment.

In predictive control, we are obtaining quality information about blending components, considering lag times between there and the blender, and adjusting valve positions to enforce the optimal recipe without unacceptable excursions from inventory requirements. Thus, if the reformate being blended into a gasoline grade turns out to be better than expected, it is detected by the control system, which is also monitoring on-line analyzers to gain information about blend qualities.

The predictive control feature of the multivariable analysis package may, for example, cut back on the reformate and make up the volume shortfall with a different, less expensive component such as cat gasoline or straight-run naphtha in time to capture the economic benefits involved.

For predictive, multivariable control, Setpoint uses a technology package called Idcom.

Use of Idcom involves an interface with the multifunction blend-ratio controllers and the flow control system within the distributed control system (DCS).

REPORTING

Data from the control function becomes a vital integration factor among the planning, scheduling, optimization, and control functions. This involves aggregation and reconciliation of data and exchange of data among the various systems which support decisions at every supervisory level involved with blending.

What is possible in the blending unit is perhaps even more possible in the on site units. The capture, reconciliation, and exchange of data among planning, scheduling, optimization, and control functions makes it possible to have a complete refinery information system with its data-gathering roots firmly implanted in a real-time data base.

A suggested architecture for integrating product blending with key upstream process unit control and optimization strategies is presented in Fig. 4.

ON-LINE BENEFITS

Benefits are always difficult to measure with precision. However, Setpoint's experience in on site and off site control suggests cumulative benefits at every control level.

Fig. 5 illustrates the magnitude of benefits available within a total refinery processing sequence. In the crude handling area, a loss of value is always incurred through pipeline contamination or other mixing of crude oil.

The two lines emanating from the point where we are dealing with on site process units and unfinished components depict value appreciation available from control with basic instrumentation and advanced control and on-line optimization.

The benefits available from advanced control and optimization are in the range of 0.05 units, as measured on the scale of factors we've chosen to represent refinery margin.

In the off sites area, where we are dealing with product blends into finished products, divergent lines or levels of control are displayed. At this point, the refinery has plenty of opportunity to lose money through suboptimal blending recipes and quality giveaway.

Benefits are available, however, from the various control functions which reduce quality giveaway, provide on-line quality certification, optimize blending recipes, and provide global optimization of on sites and offsites.

The principal point is that opportunities for improved refinery performance in the off sites control area are as large, and perhaps larger, than those available from on site unit control.

Copyright 1990 Oil & Gas Journal. All Rights Reserved.