Professional Documents
Culture Documents
A Robust Gasoline Recipe Under Nonlinear Mixing Rule
A Robust Gasoline Recipe Under Nonlinear Mixing Rule
UNCERTAINTIES
A THESIS
In Partial Fulfillment
May 2020
I, THE UNDERSIGNED MEMBER OF THE COMMITTEE,
UNCERTAINTIES
BY
May 2020
ii
ABSTRACT
UNCERTAINTIES
By
May 2020
for gasoline productions that suffer from significant variability in feedstock quality. The
proposed method considers nonlinear correlations to estimate the octane number of gasoline,
uses Monte Carlo method to simulate variations in properties of feedstocks, and develops a
sequential approach with reduced relative gap threshold to obtain a near-global optimal solution.
This framework offers three advantages: First, introducing nonlinear functions into the
optimization provides a more realistic representation of the blending process, which in turn
improves prediction on key properties of the blend. Second, accounting for uncertainty in model
parameters obtains a solution with best expected quality under several possible conditions,
therefore reducing the probability of re-blending for off-specification gasoline. Third, the
sequential algorithm determines the near-global optimal solution faster than directly using a
state-of-the-art optimization software. A case study with 9 feedstocks and 2 desired grades of
iii
ACKNOWLEDGMENTS
To my parents, thank you for your undying love and support. I hope I can continue to
To Dr. Yu Yang, thank you for giving me the opportunity to work with you on this
project, as well as several other projects. I am also grateful to you for making my doctoral
To Jared Jetter, thank you for always believing in me, even at times when I did not
believe in myself. You taught me to never settle for anything less than what I deserve. Because
To the CSULB Office of Research and Sponsored Programs, thank you for granting me
the highly competitive and prestigious 2019 CSULB Summer Student Research Award, and for
allowing me to compete in the 2020 CSULB Student Research Competition. You have given me
To the CSULB Chemical Engineering faculty, thank you for giving me the tools that I
need to become a successful chemical engineer. It has been an honor learning from you and
To the CSULB Engineering Honors Program and University Honors Program, thank you
for allowing me to share my research work with the public. May my honors thesis inspire people
to pursue STEM careers and engage in scholarly research, so that they may be properly equipped
iv
TABLE OF CONTENTS
Page
ABSTRACT.................................................................................................................................. iii
ACKNOWLEDGMENTS ............................................................................................................ iv
CHAPTER
1. INTRODUCTION ............................................................................................................ 1
2. PROBLEM FORMULATION.......................................................................................... 3
5. CONCLUSION ................................................................................................................. 16
REFERENCES ............................................................................................................................. 17
v
LIST OF TABLES
TABLE Page
vi
CHAPTER 1
INTRODUCTION
for the oil industry. It is produced by mixing several feedstocks in accordance to a pre-defined
recipe in a blender system. With increasingly stringent fuel standards, the gasoline produced
must have optimal engine performance and satisfy all environmental regulations. Producers must
achieve a good balance between product quality and expenses to prevent unnecessary costs that
can significantly reduce their profitability. Hence, optimization techniques must be applied to
gasoline blending operations to effectively determine how much of each feedstock must be
allocated to each blend so that product specifications are met, and total profit is maximized.
In the last decade, linear programming (LP) and mixed-integer linear programming
(MILP) have been used to determine robust gasoline recipes for gasoline blending processes.
Despite LP and MILP’s ability to reduce computing efforts, these methods rely on linear
blending assumptions to predict gasoline properties [1]. Because of this, they may not be
applicable to the prediction of gasoline’s octane number, which has non-linear dependence on
blend composition. Therefore, nonlinear blending models must be used instead of conventional
must also be considered in the optimization to reduce the probability of re-blending for
unqualified products. The uncertainty in feed properties is caused by fluctuations that occur in
refinery operating conditions, such as temperature, pressure, and catalyst activities. Furthermore,
feed properties are difficult to measure in real time due to inherent variability of measurement
devices [3]. If uncertainties are not considered in the blending model, such that the model solely
1
relies on nominal parameters, then a mismatch between the process model and practical
production occurs, and the resulting gasoline could be off-specification [4]. Several approaches
have since been proposed to handle uncertainty in blending optimization. For example, chance-
constrained programming (CCP) guarantees that constraints under uncertainties are satisfied to a
high probability [5],[6],[7]. CCP is non-conservative, but is difficult to solve, especially when it
has nonconvex terms. Robust optimization (RO) is another methodology that can handle
the uncertainty inputs. The robust optimization community is currently investigating ways to
In this paper, a gasoline blending recipe that satisfies probabilistic quality constraints are
achieved as follows: First, the nonlinear octane prediction model is incorporated in the gasoline
blending model. Second, Monte Carlo simulation is used to generate stochastic constraints,
which are then integrated with the nominal model to resemble fluctuations of feedstock
properties. Third, a sequential optimization algorithm is proposed to reduce problem size and
The rest of this paper is organized as follows: the problem formulation is outlined in
Chapter 2. The proposed solution is discussed in Chapter 3. The case study is presented in
2
CHAPTER 2
PROBLEM FORMULATION
Refinery blending is the final opportunity to maximize production profit and ensure that
the resulting blend will satisfy all product specifications. In this paper, the nonlinearity of
blended octane and uncertainty in feed properties are accounted for in the blending model.
where 𝑥 is the decision variable, and is used to represent the volume of the gasoline blend; 𝐾𝑖,𝑗 is
the profit acquired from gasoline 𝑖 that was prepared using feedstock 𝑗; there are 𝐿 products and
parametric uncertainty 𝜽; both g and h can be non-convex; z is the total profit, which is desired
to be maximized.
when determining the optimal gasoline blending recipe. Blending optimization is subject to
Product Property Constraint – this refers to fuel standards that the gasoline must
comply to. Specifications may be imposed on the gasoline’s density, Reid Vapor Pressure
(RVP), sulfur content and octane number, among other things [11].
3
Component Volume Availability Constraint – this refers to the finite volume of
Blend Volume Constraint – this requires the total volume of the gasoline to be above
Among all gasoline properties, the octane number shows significant nonlinearity in the
blending. Let 𝑟𝑗 , 𝑚𝑗 , 𝑠𝑗 , 𝑜𝑗 and 𝑎𝑗 denote the research octane number (RON), motor octane
number (MON), sensitivity, olefin and aromatic content of feedstock 𝑗, respectively. Then, the
RON of the gasoline blend is calculated using the formula below [12]:
∑𝑗 𝑥𝑖,𝑗 𝑟𝑗
where 𝑅 is the RON of the produced gasoline; 𝑅1 = ∑𝑗 𝑥𝑖,𝑗
is the volume average of RON; 𝑅2 =
∑𝑗 𝑥𝑖,𝑗 𝑟𝑗 𝑠𝑗 ∑𝑗 𝑥𝑖,𝑗 𝑠𝑗
∑𝑗 𝑥𝑖,𝑗
is the volume average of product of RON and sensitivity; 𝐽𝑋 = ∑𝑗 𝑥𝑖,𝑗
is the volume
∑𝑗 𝑥𝑖,𝑗 𝑂𝑗 2
average of sensitivity; 𝑂1 = ∑𝑗 𝑥𝑖,𝑗
is the volume average of squared olefin content; 𝑂2 =
∑𝑗 𝑥𝑖,𝑗 𝑂𝑗 2 ∑𝑗 𝑥𝑖,𝑗 𝑎𝑗 2
( ∑𝑗 𝑥𝑖,𝑗
) is the square of volume average olefin content; 𝐴1 = ∑𝑗 𝑥𝑖,𝑗
is the volume average of
∑𝑗 𝑥𝑖,𝑗 𝑎𝑗 2
squared aromatic content; 𝐴2 = ( ∑𝑗 𝑥𝑖,𝑗
) is the square of volume average aromatic content;
4
∑𝑗 𝑥𝑖,𝑗 𝑚𝑗
where 𝑀 is the MON of the produced gasoline; 𝑀1 = ∑𝑗 𝑥𝑖,𝑗
is the volume average of MON; 𝑀2
∑𝑗 𝑥𝑖,𝑗 𝑚𝑗 𝑠𝑗
= ∑𝑗 𝑥𝑖,𝑗
is the volume average of product of MON and sensitivity; 𝐺1 , 𝐺2 , and 𝐺3 are the MON
equation coefficients.
The first term of Equations (1) and (2) represent linear blending, with three correction
terms added to account for the deviations that occur from linear mixing. The first additional term
is called the sensitivity function, and it serves as a correction of octane due to the change of
compression ratio after blending. The second and third additional terms account for the chemical
The RON and MON coefficients were determined from a regression analysis of RON and
MON data from actual laboratory blends. The average of Equations (1) and (2) represents the
octane number of gasolines, which is required to be above specific values depending on the type
5
CHAPTER 3
The solution to Problem (P) that satisfies constraints under all possible scenarios may be
too conservative or not exist [13]. To alleviate this conservatism, chance-constrained program
where 𝜖 is the risk level, which indicates the probability of constraint violation and is normally
determined by refinery operators. Problem (CCP) solves the blending problem, with the resulting
Using chance constraints can significantly increase refinery profitability while keeping the
quality loss within a tolerable range. Solving (CCP) is nontrivial, especially when it contains
6
where N is the number of scenarios generated; 𝜃𝑘 , ∀𝑘 ∈ {1,…,N} are independent and
identically distributed samples of uncertain parameters 𝜃. Before we can solve problem (SP1),
we need to determine the minimum value of N. Assuming that problem (P) can be convexified,
Lemma 1: The following condition for N must hold to guarantee that the near-global
where 𝐷𝑥 is the dimension of the decision variable; 𝐷𝑦 is the number of newly introduced
variables for convex relaxation; 𝐷𝐸 is the number of equality constraints which can be eliminated
through substitutions; 𝛽 is the confidence parameter, which has a value of 10-6. In order to solve
the nonlinear nature of blended octane and uncertainty in feed properties. To reduce the
complexity of the problem, and to acquire the near-global optimal solution in a relatively short
7
where Ω is a set that contains only a few scenarios from N. The rational is that only a few
constraints are active at the local optimal solution. If these constraints can be identified, then we
could disregard other constraints to substantially reduce the time to find the near-global optimal
solution. The sequential approach starts by finding a solution to (SP2) that satisfies all of its
normal constraints, and one constraint that has arbitrarily been chosen to be in set Ω, referred to
as α0 . Initially, only α0 is present in Ω. The solution to (SP2) is then evaluated for all N
scenarios. The scenario with the largest constraint violation is added to Ω, and therefore become
active in (SP2). Every time a new scenario is added to Ω, a new solution for (SP2) will be
calculated until a solution that satisfies all N scenarios is found. The near-global optimal solution
to (SP2) is also the optimal solution to (SP1). However, it takes a shorter amount of time to find
the solution to (SP2) since it only considers a few scenarios in the optimization, compared to
simultaneously searches for the upper and lower bound solutions. The near-global optimal
solution is enclosed by these bounds. The relative gap is also calculated to characterize the
A satisfied solution of (SP2) must have a relative gap that is smaller than a pre-specified
threshold 𝛾.
8
Step 3: In phase-I, solve (SP2) to find a local optimal solution that satisfies all of its nominal
Step 5: Find the scenario with the largest constraint violation, denoted by 𝛼ℎ ,
Repeat steps 3-5 until a solution that meets all constraints of N are found and the threshold 𝛾
reaches a value equal to or smaller than 10%. Compared to previous works [3],[14], this paper
develops a two-phase optimization method. Although our main objective is to determine the
near-global optimal solution, it is not necessary to find it in the early iterations because the active
scenarios are still being fully identified and global optimization for nonconvex programs is time
consuming. As more scenarios are added to set Ω, the threshold is decreased to force the solver to
search for a high quality solution. We found that the reduced threshold can substantially reduce
9
CHAPTER 4: CASE STUDY
A multi-product blending problem is solved using the proposed method. The problem is
9). The nominal feed properties are listed in Table I, feedstock availability is listed in Table II,
and product specifications are mentioned in Table III. The blending optimization problem is
solved using GAMS 24.9.1 with global optimization solver SCIP 4.0, and local search solver
IPOPT [17]. The effectiveness of the proposed method is determined by comparing its results to
10
The total profit acquired from the production of the two gasoline products can be
where 𝐾𝑖,𝑗 is the profit acquired from gasoline 𝑖 that was prepared using feedstock 𝑗.
The gasoline products must fulfill constraints on product specification and volume
availability. Before we develop the constraints, it must be noted that the following assumptions
̶ Although most mixing operations are nonlinear, we only consider the nonlinear blending
constraints in the optimization. All other mixing processes are assumed to follow linear
mixing rule.
̶ Despite most property prediction models being prone to parameter uncertainty, the
density and RVP constraints will be based only on nominal parameters to simplify the
problem, while the prediction models of octane number and sulfur constraint will account
̶ There are 26 independent variables and nonconvex terms, which tell us that 𝐷𝑥 + 𝐷𝑦 +
𝑘
where (𝜃𝑠𝑢𝑙 )𝑗 is normally distributed. The mean of its Gaussian distribution is the nominal value
of the sulfur content, and the standard deviation is specified to be 3% of the nominal value.
Here, 𝑅𝑘 refers to the RON of the blend using feedstocks from sample 𝑘; 𝑀𝑘 refers to the MON
of the blend using feedstocks from sample 𝑘. 𝑅𝑘 and 𝑀𝑘 are computed using Equations (1) and
12
(2), respectively. The uncertainties for Equations (1) and (2) are modeled by 𝑟𝑗 = 𝑟̅𝑗 +
(𝜃𝑜𝑐𝑡 )𝑗 and 𝑚𝑗 = ̅̅
𝑚̅̅𝑗 + (𝜃𝑜𝑐𝑡 )𝑗 , where 𝑟̅𝑗 and ̅𝑚
̅̅̅𝑗 represent the nominal value of RON and MON
of feedstock 𝑗, respectively. The uncertainty (𝜃𝑜𝑐𝑡 )𝑗 is Gaussian distributed with a mean of zero
0.01(𝑟̅𝑗 + ̅̅̅̅̅
𝑚𝑗)
and a standard deviation: .
2
13
The solution obtained for (SP1-EXAMPLE) by the proposed method and the direct use of SCIP
are compared. For the sequential method, the initial threshold 𝛾 = 0.2. As the threshold reduced
to 0.1, eventually a solution that satisfies all constraints has been found, and the algorithm
terminates. For the method where SCIP is directly used, we let it run for an hour and recorded its
results. Comparison of results between the sequential optimization approach and direct use of
SCIP is shown in Table IV. For both methods, the same lower bound solution ($424,789) was
found by both methods fairly quickly. The majority of the solution time was spent searching for
the upper bound solution and reaching the threshold 𝛾. Referring to Table 4, it shows that SCIP
was not able to reduce the relative gap within an hour, whereas our sequential method achieved
10% relative gap in about forty minutes. In general, if the relative gap cannot be reduced, then
the quality of the solution cannot be guaranteed. It is worth noting that for each iteration, we
solve a near-global optimization problem with reduced 𝛾. The objective value for each iteration
14
The resulting solution of the sequential approach is shown in Table VI. Finally, we need to verify
that the solution in Table VI meets the chance constraints. To do this, a set of 100,000 scenarios
have been generated and the solution in Table VI is substituted for each of these scenarios to
check the constraint violation. The test empirically verifies that the optimal blend recipe only has
0.41% chance of producing off-specification gasoline, which is far smaller than our desired risk
level 𝜖 = 5%.
15
CHAPTER 5: CONCLUSION
and a scenario-based method was used to acquire its deterministic approximation. Then, the
sequential approach with reduced relative gap threshold. A multi-product blending problem is
presented and used to demonstrate the superiority of our proposed method over the immediate
use of a state-of-the-art optimization software. A set of 100,000 scenarios have been generated to
test the robustness of the solution. The solution is substituted for each of these scenarios, and we
found that only 410 were violated. This implies that our solution is empirically verified to
produce off-specification gasoline by only 0.41%, which is much lower than our specified risk
level 𝜖 = 5%. The future work will investigate how the proposed solution can handle non-
16
REFERENCES
[1] S. Jiang, “Optimisation of diesel and gasoline blending operations”, PhD thesis,
Manchester, 2016.
[2] P.A. Castillo, P.M. Castro, and V. Mahalec, “Global Optimization of nonlinear blend-
[3] Y. Yang, P. Vayanos, and P.I. Barton, “Chance-constrained optimization for refinery
blend planning under uncertainty”, Industrial and Engineering Chemistry Research, vol.
[4] D. Wang, Z. Li, Q.E. Chang, and Y. Li, “On-line optimization model design of gasoline
[5] F.E. Curtis, A. Wachter, and V.M. Zavala, “A sequential algorithm for solving nonlinear
optimization problems with chance constraints”, SIAM Journal on Optimization, vol. 28,
[6] J. Luedtke and S. Ahmed, “A sample approximation approach for optimization with
probabilistic constraints”, SIAM Journal on Optimization, vol. 19, pp. 674-699, 2008.
process optimization under uncertainty”, Computers & Chemical Engineering, vol. 32, pp.
25-45, 2008.
[8] Z. Li, Q. Tang, and C.A. Floudas, “A comparative theoretical and computational study on
Industrial and Engineering Chemistry Research, vol. 51, pp. 6769-6788, 2012.
17
[9] A. Ben-Tal, L. El Ghaoui and A. Nemirovski, Robust Optimization. Princeton University
Press, 2009.
[10] D. Bertsimas and M. Sim, “The price of robustness”, Operations Research, vol. 52, pp.
35-53, 2004.
[11] A. Purohit and T. Suryawanshi, “Integrated Product Blending Optimization for Oil
Refinery Operations”, IFAC Proceedings Volumes, vol. 46, pp. 343-348, 2013.
[12] S. Parkash, Refining Processes Handbook. Burlington, MA: Elsevier, 2003, pp. 308-309.
[13] E. Roos and D.d. Hertog, “Reducing conservatism in Robust Optimization”, 2018.
using scenario-based methods”, ISA Transactions, vol. 90, pp. 157-168, 2019.
[15] C. Sutanto and Y. Yang, “A scenario-based approach for smart system control and
optimization”, 2017 IEEE Green Energy and Smart Systems Conference, Long Beach,
[16] S.J. Maher et al., “The SCIP Optimization Suite 4.0”, ZIB-Report 17-12, Zuse Institute
[17] A. Wachter and L.T. Biegler, “On the implementation of a primal-dual interior point
18