You are on page 1of 11

SPE-180059-MS

Solutions to the Curve Fitting Problem of Mathematical Correlation and


SCAL Data
I. H. Arief, Lili Xue, and F. Lomeland, Statoil

Copyright 2016, Society of Petroleum Engineers

This paper was prepared for presentation at the SPE Bergen One Day Seminar held in Bergen, Norway, 20 April 2016.

This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents
of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect
any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written
consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may
not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright.

Abstract
Mathematical correlation has been widely used in oil and gas industry to model relative permeability and
capillary pressure from water saturation. The application of mathematical correlation is essential espe-
cially in the absence of laboratory data. Additionally, the correlation is also applied to generate a refined
relative permeability and capillary pressure table as the input to reservoir simulation.
There are several correlations being used in the industry such as Corey, Skjveland and LET
correlation. The focus in this paper is the LET correlation. The correlation offers more flexibility as well
as accuracy in matching the responses from laboratory experiments.
Having a representative correlation is the basic, but the curve-fitting to the experimental data is also
indispensable. In a problem which involves a non-linear correlation, the attempt to find a solution which
fits the experimental data becomes more complex. To overcome this problem, it is fundamental to have
a search method which can fit the experiment data with the lowest possible residual errors.
In this paper, different search methods of curve-fitting are investigated. In the last part of the paper we
will compare the performance of each method. The main evaluation parameters are the residual error and
the computational time. The methods studied in this paper are the Levenberg Marquardt method, particle
swarm optimization and mesh pattern search.
Mathematical correlation and SCAL data
SCAL data is one of the primary inputs in reservoir simulation. It is aimed to model the evolution of
relative permeability and capillary pressure as the fluid saturation changes. As an input to reservoir
simulation it is decisive to have relative permeability and capillary pressure in a small saturation interval.
In the other hand, having refined SCAL data would escalate the time and the cost of the laboratory
experiment.
The solution to the above problem is by modeling the SCAL data with a mathematical correlation.
Lomeland et al. (2005 and 2008) proposed a versatile correlation (LET) to model relative permeability and
capillary pressure. The correlations offer more flexibility and allow more control over a broad range of
saturations (Lomeland et al. 2005).
The LET correlations for oil and water relative permeability are shown in Eq. 1 and Eq. 2. The LET
correlation for secondary drainage capillary pressure is shown in Eq. 3, Eq. 4 and Eq. 5. The structure of
2 SPE-180059-MS

the LET correlation for secondary imbibition capillary pressure is the same as in the secondary drainage
but the spontaneous branch and the force branch are interchanged (Lomeland et al. 2008). The normalized
saturation is defined in Eq. 6.
(1)

(2)

(3)

(4)

(5)

(6)

The LET correlation for relative permeability contains three coefficients (L, E and T) for oil and water
phases. The correlation of water and oil relative permeability is not related. The LET correlation for
capillary pressure is more complex than the relative permeability correlation. It involves seven coeffi-
cients (Lf, Ef, Tf, Ls, Es, Ts, Pth). The parameter Es can be used to estimate the value of spontaneous
saturation (the saturation where the capillary pressure is equal to zero).
Fitting mathematical correlations to the SCAL data
Having a robust empirical correlation to model SCAL data is fundamental but the fitting process of the
correlation to the experimental data is also imperative.
The curve fitting is a process of finding the values of correlation coefficients (z1 to zn) which match
the experimental data (Eq. 7). More coefficients in a correlation would convolute the curve-fitting process.
(7)

Fig. 1 shows an example of relative permeability and capillary pressure data. After the curve-fitting the
data is represented by a correlation with specific values of its coefficients and the value of relative
permeability and capillary pressure can now be determined at any saturation values.

Figure 1Curve fitting of relative permeability data (left) and capillary pressure data (right)
SPE-180059-MS 3

Search algorithm
The main tool in the curve-fitting procedure is the search algorithm. The algorithm serves the search
direction and step length in order to find a solution which most fits the data.
The search algorithm is generally classified into two categories; the gradient based and non-gradient
based algorithm. The gradient based algorithm utilizes the gradient information of the function to
determine the search direction and the step length. Some of the methods in the gradient based search
algorithm are gradient descent method, Gauss-Newton method and Levenberg Marquardt method. The
latest method is generally the combination of the two former methods (Lourakis 2005). In this paper we
will study the application of Levenberg Marquardt method in the curve fitting application.
The non-gradient based algorithm is often called as global optimization algorithm. The absence of the
gradient in the algorithm facilitates the searching process to avoid local syncline. In this type of algorithm
there are population based algorithm (e.g. genetic and particle swarm) and non-population based method
(e.g. mesh pattern and simulated annealing). Arief (2013) shows in his study that mesh pattern is superior
to the genetic and simulated annealing method in the application of computer assisted history matching.
Therefore the mesh pattern and the particle swarm method are selected in this study.
Levenberg Marquardt method

The method utilizes gradient calculation to determine the search direction and the step length. Eq. 8
shows the formula to calculate the direction and the step length. Eq. 9 shows the equation to find the new
search position.
The searching starts by having an initial guess and the initial value of lambda (). The lambda will be
increased if the iteration fails and decreased if the iteration is successful (Gavin 2015).
(8)

(9)

Mesh pattern method

The mesh pattern method bases the search on a set of points surrounding (mesh) the current solution.
Fig. 2 shows the illustration of mesh pattern search in a two parameter case. The yellow point is the current
position and the four white points indicate the new possible solutions. The algorithm will evaluate all of
the four positions and decide if any of them give better results than the current position.

Figure 2Mesh pattern search

In order to avoid of being trapped in a local point the mesh size will be increased when the iteration
successes and to prevent from non-convergence iterations the mesh size will be decreased if the iteration
fails (Arief 2013).
4 SPE-180059-MS

Particle swarm method

Particle swarm is a population based search algorithm. A group of individuals perform the searching
through the region. The search direction of each individual is influenced by its own knowledge of the best
position and the groups knowledge as illustrated in Fig. 3.

Figure 3Particle swarm illustration

Eq. 10 shows the determination of the new position of each individual. The equation shows that the step
length calculation contains randomness which can help the searching process to avoid any local minima.
(10)

Objective function
The main task of the search algorithm is to minimize a defined objective function. In a curve fitting
problem there are two types of objective functions; square error (Eq. 11) and relative square error (Eq. 12).
In this study, we will investigate the different searching behaviors as a result of the two objective
functions.
(11)

(12)

Results discussions
In this section we firstly discuss the different search behaviors caused by the selection of objective
function in the searching process. In the second part we evaluate the performance of the three studied
search algorithms in finding the fitting solution of relative permeability and capillary pressure data. At the
end of the discussion we propose a hybrid search algorithm which can eliminate the weaknesses of the
current algorithms.
Table - 1 shows the final outcome of the two different searching processes with two different objective
functions. When the relative square error is implemented in the searching algorithm (Eq. 12), the
algorithm is able to find a solution which gives lower average error (%) but higher residual square error.
While the use of square error objective function (Eq. 11) can minimize more the residual square error but
the average error (%) is high.
SPE-180059-MS 5

Table 1Final search outcome


Objective Function Average Error (%) Sum of Square Error

Square Error 10 1.00E-04


Relative Square Error 5 6.00E-04

The different searching behavior is shown in Fig. 4. When we use the square error as the objective
function the algorithm tends to less prioritize data with low order of magnitude. In the other hand, the use
of relative square error in the algorithm will generate a solution which fits all data with different order of
magnitude.

Figure 4 Fitting results with two different objective functions

We propose to use the relative square error (Eq. 12) as the objective function in the case where the
fitting data are in different order of magnitude e.g. SCAL data curve - fitting. It is aimed to ensure that
the algorithm find a solution that would fit all fitting data.
In the next part we will discuss the performance of the three search algorithms in finding a fitting
solution of relative permeability and capillary pressure data. The relative square error is selected as the
objective function to ensure that the algorithms find any possible solution that fit all data.
The performance test is divided into two cases; fitting relative permeability data and fitting capillary
pressure data. As mentioned in the previous parts, the more coefficients in the equation would add the
complexity of the searching. In the case of fitting relative permeability data the search algorithm will only
need to find the values of 3 coefficients (L, E and T). In the second case the algorithm must find the value
of seven coefficients (Lf, Ef, Tf, Ls, Es, Ts, Pth) to fit the capillary pressure data.
Each of the algorithms will be tested to fit 200 sets of relative permeability data and 100 sets of
capillary pressure data. The boundary of the coefficients is shown in Table 2 and Table 3. In order
to eliminate the effect of the initial guess then initial guess is set to be a random value within the
boundaries. Each of the algorithms is given 100 attempts to find the best fitting solution. The aim is to
see which algorithm that is independent of the initial guess. The algorithm will stop the searching process
if any of the conditions in the Table 4 are reached.
6 SPE-180059-MS

Table 2The parameter boundary of the relative permeability


curve - fitting
Parameters Min Max

L 0 10
E 0 100
T 0 10

Table 3Parameter boundary of the capillary curve - fitting


Parameters Min Max

Ef 0 1000
Tf 0 50
Ls 0 50
Es 0 1000
Ts 0 50
Pth -5 5

Table 4 Stopping criteria of the relative permeability curve - fitting


Parameters Value

Maximum number of evaluated functions 1000


Minimum changes of the objective function 0.000001

Table 5Stopping criteria of the capillary pressure curve - fitting


Parameters Value

Maximum number of evaluated functions 5000


Minimum changes of the objective function 0.000001

The first evaluation parameter is the average error (%) of the proposed solutions. The best algorithm
is the one with the lowest average error (%). Fig. 5 and Fig. 6 show the outcome of the searching process
of the three algorithms. Particle swarm method is the most superior method in both of the curve fitting
cases even though there is a slight quality reduction in the capillary pressure curve fitting due to the
additional complexity of the case. Mesh pattern and the Levenberg Marquardt method works well in the
relative permeability curve fitting but poor in the capillary pressure case. It is mainly due to the problem
of local minima and their dependency on the initial guess.
SPE-180059-MS 7

Figure 5Average error (%) distribution of the relative permeability curve - fitting

Figure 6 Average error (%) distribution of the capillary pressure curve - fitting

The second evaluation parameter is the computational time. In this study we represent the computa-
tional time with the number of evaluation of the objective function. Fig. 7 and Fig. 8 show that the price
of the robustness of particle swarm method is high number of evaluated functions. Mesh pattern requires
almost as many numbers of evaluated functions as the particle swarm and yet the performance is not
comparable. The Levenberg Marquardt method is the most efficient method as it requires the least
number of evaluated functions to obtain the solutions.
8 SPE-180059-MS

Figure 7Average number of evaluated functions for relative permeability curve - fitting

Figure 8 Average number of evaluated functions for capillary pressure curve fitting

We have seen from the above explanation that particle swarm method is the most robust algorithm but
computationally expensive and the Levenberg Marquardt method is the most efficient algorithm but it
cannot always find the best solution due to the local minima problem. Therefore, we propose a hybrid
algorithm which is the combination of the particle swarm and the Levenberg Marquardt method. The
idea of the hybrid algorithm is to inherit the robustness from particle swarm and the efficiency of the
Levenberg Marquardt method.
Fig. 9 and Fig. 10 show the performance of the hybrid algorithm in both relative permeability and
capillary pressure curve fitting. The hybrid algorithm works significantly better than the Levenberg
Marquardt method (especially in capillary pressure curve fitting). The performance is close to the
particle swarm method but the computational time is significantly reduced (see Fig. 11 and Fig. 12).
SPE-180059-MS 9

Figure 9 Average error (%) distribution of the relative permeability curve - fitting

Figure 10 Average error (%) distribution of the capillary pressure curve - fitting

Figure 11Average number of evaluated functions for relative permeability curve fitting
10 SPE-180059-MS

Figure 12Average number of evaluated functions for capillary pressure curve fitting

The combination of particle swarm and Levenberg Marquardt method can significantly reduce the
local minima problem faced by the latest method. It also curtails the expensive computational time
required by the particle swarm method.

Conclusions
This study concludes the following:
The application of mathematical correlation to fit SCAL data is aimed to overcome problems of
limited data from laboratory experiments.
The use of square error as the objective function has led to less prioritization of data with low order
of magnitude.
It is recommended to use the relative square error as the objective function in SCAL curve fitting
because it treats all data equally important to be fit.
It is critical to implement a robust search algorithm in the curve fitting of SCAL data. It is aimed
to ensure that the best solution is found.
Particle swarm method is the most robust method among the mesh pattern and the Levenberg
Marquardt method. However it is computationally expensive.
Mesh pattern method gives a fair results in a simple case but it works poorly in a more complex
case beside it is also computationally expensive.
The Levenberg Marquardt method is the most efficient method and yet it cannot always find the
best solution. It is mainly because of its dependent on the initial guess.
It is always recommended to utilize particle swarm method as the search algorithm in the SCAL
curve fitting problem.
In the case where computational time becomes the main concern then the hybrid algorithm serves
well for an optimization problem.

Nomenclature
Ex Empirical parameter of LET relative permeability correlation for phase x
Empirical parameter of LET capillary pressure correlation for phase x and phase y and
other information z
LET oil water capillary pressure of force function for drainage
SPE-180059-MS 11

LET oil water capillary pressure of spontaneous function for drainage


hlm Searching step of the Levenberg Marquardt method
I Identity matrix
J Jacobian matrix
krow Oil relative permeability
Oil relative permeability at irreducible water saturation
krw Water relative permeability
krwr Water relative permeability at residual oil saturation
Lx Empirical parameter of LET relative permeability correlation for phase x
Empirical parameter of LET capillary pressure correlation for phase x and phase y and
other information z
Pcow Capillary pressure of oil and water system, bar
Maximum capillary pressure, bar
Minimum capillary pressure, bar
Threshold pressure, bar
r Random number
Swn Normalized water saturation
Sw Water saturation
Swir Irreducible water saturation
Sorw Residual oil saturation
Tx Empirical parameter of LET relative permeability correlation for phase x
Empirical parameter of LET capillary pressure correlation for phase x and phase y and
other information z
ws Individual confidence factor, usually 1.5
wt Team confidence factor, usually 2.5
xnew New position
xcur Current position
ycal Calculated values
yob Observed values
xs Distance different between the individual best position and the current position
xt Distance different between the team best position and the current position
Objective functions
Algorithmic parameter

References
1. Arief, I.H. 2013. Computer Assisted History Matching: a Comprehensive Study of Methodology. Master Thesis,
University of Stavanger, Norway. http://hdl.handle.net/11250/183563
2. Gavin, H.P. 2015. The Levenberg - Marquadt Method for Nonlinear Least Squares Curve-Fitting Problems.
Department of Civil and Environmental Engineering, Duke University. http://people.duke.edu/~hpgavin/ce281/lm.pdf
3. Lomeland, F., Ebeltoft, E., Thomas, W.H. 2005. A New Versatile Relative Permeability Correlation. Presented at the
International Symposium of the Society of Core Analysts, Toronto, 21 25 August.
4. Lomeland, F., Ebeltoft, E. 2008. A New Versatile Capillary Pressure Correlation. Presented at the Inter national
Symposium of the Society of Core Analysts, Abu Dhabi, 29 October 2 November.
5. Lourakis, M.I.A. 2005. A Brief Description of Levenberg-Marquadt Algorithm Implemented by levmar. Technical
Report, Institute of Computer Science, Foundation for Research and Technology, Hellas.
6. Mathworks. 2015. Global Optimization Toolbox: User Guide.

You might also like