Petroleum Refining Process Control and Real-Time Optimization
Petroleum Refining Process Control and Real-Time Optimization
efineries are a complex network of processes that convert crude oil into finished
R petroleum products such as gasoline, diesel, jet fuel, heating oil, fuel oil, lubricants, asphalt,
coke, wax, and chemical feed stocks. Crude oil and these products are complex mixtures
of hydrocarbon molecules as described in “What Is Crude Oil?” and “What is Gaso-
line?” Examples of simple hydrocarbon molecules are shown in Figure 1. The
boiling point curves in Figure 2 [1] characterize the composition of a typical
crude oil without having to determine the precise molecular composition.
While crude oil naturally contains some gasoline-type molecules,
Figure 2 shows there are not enough gasoline molecules to meet
demand. In simple terms, refineries are processes that convert
the crude oil curve to the product demand curve. Expanding
on this simple idea, refineries separate hydrocarbons into
similar oil fractions, convert low-value molecules into
higher value molecules, and blend hydrocarbon frac-
tions into product streams. Additionally, the con-
version step can include processing to remove
environmentally undesirable components such
as sulfur or hydrogen sulfide (H2 S).
C
rude oil is a complex mixture of hydrocarbons with varying because the nitrogen poisons some catalysts used to convert
small amounts of sulfur, nitrogen, salt, and metals such as nick- less desirable components in the crude oil into more valuable
el, vanadium, and copper. Hydrocarbons are molecules that have products. Finally, crudes with higher total acid content are
carbon atoms as their backbone and hydrogen attached to the car- more difficult to process because the higher acid content
bon backbone. The hydrocarbons in crude oil are typically paraf- requires exotic metallurgy, more expensive equipment, and
fins, napthenes, and aromatics. Olefins are not typically found in higher maintenance cost to achieve good reliability.
crude oil but are produced in the refining process. Examples of A distillation or boiling-point characterization is also useful
these hydrocarbon classes are shown in Figure 1, recognizing that for understanding the composition of a particular crude oil or
much larger and more complex molecules are found in crude oil. hydrocarbon mixture. A boiling-point curve shows the volume
Crude oil is primarily produced from oil fields in the earth but fraction of the crude that boils away as a function of tempera-
is also recovered from sources such as tar sands. Crude oil is ture as shown in Figure 2 [1]. These boiling-point curves indi-
transported from the oil fields to refineries by a combination of cate the types of molecules present in the crude because the
marine tankers and pipelines. Supply-chain optimization is per- components in the mixture boil off in the order of their pure
formed by crude traders, transporters, suppliers, and refiners. component boiling points. However, because crude oil and
The most common characterization of crude oils is based most petroleum products are complex mixtures of thousands
on American Petroleum Institute (API) gravity, sulfur and nitro- of individual components, a boiling-point curve is insufficient
gen content, and total acid content (TAN), where API gravity is to describe the molecular structure of the mixture. In the past
a petroleum-specific measure of density that is inversely pro- when refiners had only this limited information to base deci-
portional to specific gravity. API gravity increases for lighter sions on, they earned the nickname “oil boilers.”
crudes and decreases for denser crudes. The API gravity of While useful in general comparisons, these properties do not
water is 10◦ API. Light crudes contain lower molecular weight, provide a basis for billion-dollar decisions. For example, with
higher value products, while more dense heavy crudes contain clean fuels as a critical business driver, low-sulfur crude oils that
material that requires more processing to become gasoline, jet contain hard-to-remove sulfur-containing hydrocarbons can pro-
fuel, or diesel. Sulfur content generally runs from 0.1% to duce higher sulfur gasoline [2]. Advances in laboratory assay
greater than 5%. Crude oil with more than 0.5% total sulfur or analyses along with compositional modeling now permit
high hydrogen sulfide concentration (called sour) requires sig- improved characterization of crude oils and other petroleum mix-
nificant additional processing to make clean products that meet tures on a molecular level. Access to the molecular fingerprint of
environmental specifications. Sweet crudes contain less sulfur. petroleum mixtures including crude oil is changing the practice
High amounts of total nitrogen in crude oil are undesirable of oil boiling to managing molecules.
G
asoline is one of several thousand products produced from The RVP of gasoline indicates how easily the liquid fuel vapor-
crude oil. Transportation fuels, such as gasoline, jet fuel, and izes at 38 °C. Higher RVP is economically attractive because more
diesel, account for well over half the products produced by components can be used in gasoline blending, which improves
refineries. In 2004, gasoline alone comprised 46.8% of the prod- engine starting. Lower RVP prevents engine vapor lock and
ucts produced [3]. Gasoline, which contains hydrocarbons with reduces evaporation of gasoline to the atmosphere. RVP specifica-
between 5–12 carbon atoms, is a blend of hydrocarbons that tions are changed in the summer months because the warmer
boil between 38–205 °C. temperatures add to vapor lock and evaporation issues, resulting in
Early gasoline specifications focused on engine perfor- summer and winter gasoline specifications.
mance, specifically, octane number and Reid vapor pressure More recently, federal and state regulations to improve air
(RVP). The octane number is a measure of how well a fuel can quality and provide cleaner fuel are the primary drivers for gaso-
be compressed without igniting prior to introducing a spark. If the line specifications, bringing about boutique gasoline products as
fuel ignites before the spark plug fires, the engine is said to shown in Figure A [4], [5]. These regulations limit the amounts of
knock. Heptane, a seven-carbon paraffin, compresses poorly sulfur, benzene, and other aromatics in gasoline and, in some
and was designated an octane number of zero. Conversely, iso- locations, mandate or restrict the addition of oxygenated additives
octane, an eight-carbon branched paraffin, performs much better such as MTBE or ethanol. Currently, many refiners are working on
and was assigned an octane number of 100. Consequently, a clean fuels projects to reduce the sulfur in diesel fuels.
fuel with 87 octane performs like a mixture of 87% iso-octane Finally, another key component in gasoline, not part of the
and 13% heptane. Modern engines have sensors to measure refining process, is additives. Fuel additives improve engine per-
engine performance and are designed not to knock by changing formance by preventing buildup of combustion products such as
the ignition control. However, using fuel with a low octane num- carbon deposits and gum in fuel injectors and engine valves.
ber can result in the ignition control advancing the timing, lead- Quality base-fuel stock and fuel additives help keep consumers’
ing to lower horsepower. vehicles performing well.
Maine
Wisconsin
South Dakota Vt.
Oregon N.H
Wyoming Michigan
Idaho New York
Mass.
Nebraska Iowa
R.l
Pennsylvania Conn.
Illinois Indiana Ohio
Nevada Md N.J.
Utah W. Va. Del.
Colorado Kansas
Missouri Kentucky Virginia
Alabama Georgia
Texas Mississippi
Florida
RFG - North RFG w/Ethanol Loulsiana
RFG - South NV CBG
Oxygenated Fuels 7.2 RVP Exxon Mobil
CA CBC 7.0 RVP As of January, 2005
RFG/CA CBG 7.8 RVP, MTBE-No Increase
AZ CBG 7.8 RVP
Oxy Fuels/7.8 RVP 7.0 RVP, 30 ppm S This Map is not Intended to Provide Legal Advice or to be Used as Guidance for State and/or
Oxy Fuels/7.0 RVP 300 ppm S Federal Fuel requirements, Including but not Limited to Oxy Fuel or RFG Compliance
Requirements. Exxon Mobil Makes no Representations or Warranties, Express or
Conventional
Otherwise, as to the Accuracy or Completeness of this Map.
K.W. Gardner
G010080
FIGURE A Boutique gasoline fuel specifications. These specifications vary across the United States to meet local environmental
requirements. This variation increases both the cost of producing fuels and the complexity of ensuring an adequate supply of fuels to
each location. (Reprinted with permission from Exxon Mobil Corporation.)
Paraffins
H H
H H C H H C H
H H H H H H H H C H H H H H H H H H H H
H C C C H H C C C C H H H H C C C C C C C H H C C C C C H
H H H H H H H H C C C H H H H H H H H H H H H
H H H H C H
H
Aromatics
H H CH3
C C C
H C C H H C C H H C C H
H C C H H C C H H C C H
C C C
H CH3 CH3
Benzene Toluene Para-Xylene
FIGURE 1 Common hydrocarbon molecules. These molecules represent various classes of hydrocarbons that make up crude oils and petro-
leum products processed in refineries.
alarms for abnormal situations. To get a sense of scale, a model, which is often a linear model identified from
moderately large refinery system has on the order of process data collected during planned dynamic tests. While
100,000 sensors and 10,000 actuators. Also implemented some predictive controllers are implemented on the DCS,
at this level are advanced regulatory controls such as cas- the computing requirements frequently exceed the capabil-
cade controllers, ratio controllers, constraint controllers, ity of the DCS due to controller size as defined by the num-
and sequencing controls. The design of the distributed ber of controlled and manipulated variables and prediction
control systems allows execution of these controllers horizon length. As a result, predictive controllers are often
nominally once per second. implemented using vendor software on general purpose
At the next level, multivariable predictive controllers computers that communicate with the DCS. An overview
(MPCs) broaden the scope of the control problem. Imple- of the industrial implementation of predictive controllers in
mentation of MPCs permit control of highly interactive the process industry is provided in [11].
multivariable processes that are subject to multiple con- Another advantage of predictive controllers is that, at
straints. These controllers require a dynamic process each execution, optimal steady-state control and
Crude Supply
Product
Demand
Naphthenes
Benzenes
Benzo-Thiophenes
S S S S
Naphthalenes
Di-Benzothiophenes
S S S S
Phenanthrenes
Pyrenes
Chrysenes
Benzo-Pyrenes
FIGURE 2 Boiling-point curves for typical crude oil and refinery products. Refineries convert crude oil molecules into product components
such as those listed above. Hydrocarbons typical of the boiling-point ranges are shown beneath these curves. The conversion process can
operate more effectively with a thorough understanding of the underlying molecular structures. (Reprinted with permission from Exxon Mobil
Corporation.)
Gasoline
Reformate (Regular/Premium)
Hydrotreater Reformer
Naphtha
Jet Fuel
Crude Oil Crude
Kerosene
Unit Hydrotreater Blending
Diesel Fuel
Propylene/
Gas Oil Butene Alkylate
FCC Alkylation
Heating Oil
Gasoline
Gas Oil
Gas Fuel Oil
Kerosene
Coke
FIGURE 3 Process units and interconnecting flows in a typical fuels refinery. The crude unit separates the crude oil into streams to be converted
and purified into blending components. Each process is a complex combination of reaction and separation operations needed to produce fuels
such as gasoline, diesel, jet fuel, fuel oil, and heating oil.
manipulated variable targets are determined. Since these straints associated with reaction rates, product proper-
controllers usually employ linear dynamic models, a lin- ties such as octane number and Reid vapor pressure, and
ear program is used to evaluate the steady-state operat- the thermodynamics that determine the equilibrium in
ing targets. While linear models are useful for small separation processes. As pointed out [10], these nonlin-
regions around the current operating point, the target earities can cause the predictive control to target a
calculations over the operating range of most refineries steady-state operating point that is not optimal when the
involve significant nonlinearities. Examples of common second and third levels of the control and optimization
nonlinearities include tiered pricing discontinuities, con- hierarchy are collapsed into one level. When significant
nonlinearities exist, a nonlinear optimization program is
needed to compute the steady-state predictive control
target values.
When the feed or process changes that excite these
nonlinear process behaviors occur frequently, offline
optimization may not be sufficient to keep the operation
near the most cost-effective operation. In these cases, a
real-time optimizer (RTO) is often implemented to deter-
mine the optimal operating point under changing condi-
tions. RTO implementations make up the third level of
the control structure hierarchy shown in Figure 5. The
RTO is typically a nonlinear program minimizing cost or
maximizing profit subject to constraints derived from
steady-state mass and energy conservation balances,
reaction kinetic relationships, thermodynamic equilibri-
um equations, physical property relationships, and phys-
FIGURE 4 The ExxonMobil Torrance Refinery located in Torrance,
ical equipment constraints. The mass and energy
California. The vessels and piping comprise a complex network of
material and energy flows that convert crude oil into products. conservation balances relate energy requirements to pro-
(Reproduced with permission from Exxon Mobil Corporation and duction, permitting the value of production to be opti-
Joe Carson.) mized relative to the cost of energy.
A typical RTO can be characterized by a large number es. The impacts of operating strategies on blending compo-
of equations and variables with only a few decision vari- nents and products are evaluated using multiperiod linear
ables. The RTO dimensionality gets large with the number programs. Because of the broad scope of the refinery plan-
of balances needed to describe the mass and energy con- ning optimization application, decisions based on this appli-
servation in process equipment multiplied by the large cation occur on a day-to-week time scale. Multiperiod
number of components in the process streams. It is com- nonlinear solvers can also be applied to optimally schedule
mon to find RTO applications with less than 100 decision refinery maintenance activities that may occur only once
variables, more than 10,000 total variables, more than every several years [13].
100,000 constraint equations, and more than several hun- Finally, while not included in the control and optimiza-
dred thousand nonzero Jacobian-matrix entries. Since the tion hierarchy, refineries use PLCs to implement safety
underlying models are steady-state models, these applica- and protective systems. While refinery processes operate
tions operate on the same time
scale as the process steady-state
response time with often several
hours between implemented solu- Refinery-Wide Planning Optimization Product Values
Single- or Multiperiod Linear Program with Operating Costs
tions. The modeling complexity
Linear Model of Refinery Operation Inventories
and difficulties parameterizing Operating Limits
Executed Offline
these large models have motivated
some practitioners to develop (Often Manual)
methods for augmenting the non-
Real-Time Optimization
linear reactor kinetic models with Product Values
High-Dimension Steady-State Fundamental Operating Costs
the linear dynamic models used in
Mass/Energy Balance Models Operating Limits
the predictive controller to collapse Multiple-Hour Execution Period
the MPC and RTO levels into a sin-
gle application [12].
Finally, at the fourth level of the Multivariable Predictive Controllers Relative Product Values
hierarchy, refinery-wide planning Identified Models of Interactive and Operating Costs
and scheduling optimization is Multivariable Processes over Time Horizon Dynamic Response
used to determine optimal targets 1-min Execution Period Weightings/Penalties
for the individual refinery process-
ing units to create the pool of
hydrocarbon materials needed to Base Control System
meet product demand volumes and Flow, Pressure, Temperature, Analyzer Performance-Based
specifications. Traditionally, this Controllers Tuning Parameters
PID, Ratio, Cascade Algorithms
optimization is based on a linear
1-s Execution Period
program with a profit objective
function and constraints relating
product yield shifts to changes in
key operating variables. In addition Refinery Instrument System
to planning overall refinery opera-
tion, these linear programs are used
FIGURE 5 Control-system hierarchy illustrating how refineries simultaneously achieve control
to evaluate both capital-investment objectives on multiple time scales. Fast control actions are required to operate the refinery with-
decisions and crude oil and inter- in safe operating limits. Refinery-performance optimization for changes in market conditions,
mediate hydrocarbon feed purchas- feed quality, and equipment performance is applied at slower time scales.
Cooling
Water
Gas
Crude Oil Plant
Top
Naphtha
Pumparound
Vacuum
System
Mid Kerosene
Pumparound
Light Vacuum
Gas Oil
Bottom Atmospheric
Pumparound Gas Oil
750 – Heavy Vacuum
800 °F Gas Oil
750 to
Steam 850°F Steam
Preheat Heater < 0.1 atm
Exchangers Heater
Atmospheric Coker Feed
Crude Tower Vacuum
Crude Tower
FIGURE 6 Typical crude unit process flow illustrating the two distillation units and the key heat exchangers, fired heaters, and pumparound
circuits. The refinery can trade off energy usage and separation quality by solving the multivariable control and optimization problems.
800 95%
increase a pumparound flow to reduce the fur-
nace fuel usage at the expense of overlap in a Overlap
600
product cut because the downstream require- Vacuum Tower Feed
5%
ments can be met at lower cost. In this case, real- 95% Gas Oil
400 5% 95%
time optimization can be used to characterize
the crude oil composition and model the separa- Kerosene
tion and heat transfer processes to compute tar- 200
Naphtha
gets and optimize unit profits.
The number of equations and variables in a 0
crude-unit RTO is a function of the number of 0 20 40 60 80 100
components in the crude oil, the number of sep- Crude Oil Fraction
aration stages in the towers, and the number of
heat exchangers. Without using model reduc- FIGURE 7 Distillation curves for the naphtha (green), kerosene (blue), and gas
oil (red) overlayed on a typical crude distillation curve. Significant overlap
tion, a typical crude-unit RTO is a nonlinear pro-
between the 95% point of the naphtha and the 5% point of the kerosene indi-
gram with about 500,000 equations for often less cates poor separation. Negligible overlap between the kerosene and the gas oil
than 20 decision variables. Without a significant indicates good separation.
Cooling Water
Gas
Plant
Gasoline
Flue Gas
Reactor
Regenerator
Light Cat Gas Oil
Air
Riser
Heavy Cat Gas Oil
Fresh Catalyst
Gas Oil Spent Catalyst
Feed Cat Slurry Oil
Main Column
FIGURE 8 Simplified flow diagram of a fluidized catalytic cracking unit that converts gas oil into lighter hydrocarbons. The reactions occur in
the riser after the catalyst is mixed with the gas-oil feed. The products are separated from the catalyst in the reactor. The coke produced as
a by-product of the reactions is burned off the spent catalyst in the regenerator providing energy needed for the reactions in the riser. Multi-
variable predictive controllers are often used to control the mass and energy interactions among these vessels and the heat exchange
between main column and the gas-oil feed. Real-time optimizers are often used to account for the nonlinear reaction kinetic effects.