www.4dgeosteering.
com
Machine Learning for
Real-Time Lithology
Prediction
Introduction
[Link]
[Link]
Geosteering is a crucial technology in horizontal well drilling, relies on real-time
adjustments to well trajectory using geological and LWD data.
❖ Despite LWD's long-standing presence since The Nineteen Nineties, a persistent
challenge is the "zero length" which is the gap of 6 to 10 meters between the LWD
tool and the well bit. This gap delays implementing geosteering decisions as real-
time information is collected at the LWD tool, not directly at the bit. So, accurately
predicting lithology at the bit remains difficult.
Zero length
History of LWD
[Link]
[Link]
➢ In Nineteen Ninety Eight
Dugas pioneered the use of MWD data for real-Time Formation Dip Prediction to prevent
drilling outside the formation boundary
➢ In Two Thousand Four
• The introduction of an ultradeep resistivity LWD tool to detect reservoirs by
identification of fluid contacts and lithological characteristics.
• Concurrently, Rohler applied imaging logging technology to analyze formation
characteristics, providing accurate borehole positioning within the reservoir.
• Liu developed a mapping method by integrating LWD interpretation with formation
analysis, and wellbore trajectory descriptions to visualize the relative position between
the current well trajectory and the reservoir.
[Link]
➢ In Two Thousand Ten
Chemali introduced the concept of the geographic signal, a horizontal electrical signal
utilized for measuring azimuth resistivity for ensuring the trajectory stayed within the
reservoir.
➢ In Two Thousand Twelve:
• Pitcher's proposal for novel sonic logging technique utilizing changes in drilling speed
data to determine the distance between the wellbore boundaries to improve geosteering
accuracy.
• Concurrently, Li established a physical and mathematical model of "probing and
ranging" to determine this distance between the drilling tool and the reservoir boundary
in horizontal well drilling with high accuracy, minimizing error rates to less than 5
percent.
[Link]
➢ Then Yang proposed a fast-forward method of azimuth gamma LWD and carried out the
inverse calculation of the distance between the bit /reservoir interface and Ye used wavelet
transform and beta distribution to automatically identify formation boundaries and
accumulation patterns in logging.
❖ These studies can be categorized into two methods to predict the formation lithology at bit:
• One is to invert the log curve and then forward it to predict the logging information at
the bit.
• The other is to predict the distance between the wellbore and reservoir boundary by
using LWD data and engineering parameters.
[Link]
❖ Logging interpretation is fundamentally a classification problem, seeking
correlations between logging feature parameters and interpretation targets. With
advancements of artificial intelligence and data mining, these problems become
manageable
❖ In lithology identification, scholars have explored machine learning algorithms,
including artificial neural networks and support vector machines for predicting
the distance between the wellbore and reservoir boundary merging with LWD
data for enhanced recognition accuracy.
❖ This combination used to establish the relationship between D-MP-VRB which is
the measurement point and vertical reservoir boundary distances and the lithology
identification at the drill bit to overcome zero length challenge which cause
delays in geosteering
[Link]
❖ Establishment of database of distance between measurement point and vertical
reservoir boundary:
1. Utilizing logging data for the target layer in the study area
2. Identifying reservoir boundaries based on lithological interpretations
3. Defining dual distances from upper and lower boundaries assuming horizontal
continuity and low vertical complexity of rock properties
4. Categorizing various sandstone types into a unified category termed sandstone.
5. The sandstone reservoir D -MP -VRB database was constructed
[Link]
❖ The shape of the well log changes obviously with the change
in lithology. When the log is far from the lithological
boundary, the curve shape of each measurement point in the
reservoir remains basically unchanged but there is a change
in the well log near the lithology boundary and this part of
the data will affect the establishment of the D-MP-VRB
model.
❖ The collected D-MP-VRB data are categorized based on
different values, Division that is too fine may reduce
prediction accuracy due to small differences between
adjacent categories, while overly wide division renders the
data impractical. Therefore, selection of appropriate
distances is crucial, with intervals of 0.25 m,0.5 m, 1 m, and
2 m from the vertical boundary of the reservoir considered.
[Link]
❖ Assumption of Construction D- MP-VRB prediction model
1. The first assumption assumes a continuous stratum without lithological changes
horizontally. So, this approach is not suitable for strata with discontinuities and
fault structures.
2. The second one is to declare The distribution of sample quantities for each
lithology shows minimal differences to prevent weakening the generalization
ability of the prediction model and the risk of overfitting.
3. The third one to assure that logging data used for building the model are
considered accurate and reliable.
[Link]
❖ The Scope of application:
The D-MP-VRB prediction model can only predict the side with a
relatively small distance. Sandstone
➢ When the sandstone reservoir is thick , if the distance between the
Non- Sandstone
LWD tool and the upper reservoir boundary which is h1 is less
Sandstone
than the distance to the lower boundary which is h2, the method
Non- Sandstone
can only predict the distance to the upper boundary, which may
LWD tool
h1
not be necessary if already drilled. Conversely, if h1 is greater h2
Sandstone
than h2, the method can predict h2, but the zero length distance
may make accurate prediction challenging. Non- Sandstone
[Link]
➢ When the thin sandstone reservoirs appears , regardless of the Sandstone
distances h1 and h2, if the drill bit has already drilled out the
Non- Sandstone
sandstone reservoir, the model becomes inapplicable. This
Sandstone
situation is common due to the presence of interlayers,
rendering the model unsuitable for vertical wells. Non- Sandstone
LWD tool
h1
h2 Sandstone
Non- Sandstone
[Link]
➢ In horizontal wells within a sandstone reservoir . When h1 is less than h2, the D-MP-VRB
model can predict h1. Subsequently, the prediction formula for the distance between the
bit and the reservoir boundary can be derived, allowing calculation of h3 to determine the
lithology at the bit. Therefore, the model proves suitable for horizontal wells.
1
ℎ1𝑚𝑎𝑥 = ℎ2𝑚𝑎𝑥 = (ℎ1 + ℎ2 )
2
Non-sandstone
h1 h3
Sandstone
h2
Non-sandstone
[Link]
❖ The potential of machine learning in interpreting reservoir characteristics during
drilling and highlights that the effectiveness of algorithms depends on factors such
as sample data quantity and feature parameter types. For D- MP -VRB prediction
used algorithms including:
• One Versus-One Support Vector Machines (OVO SVMs)
• Random Forest (RF)
• Neural Networks (NN)
• Extreme Gradient Boosting Trees (XGBoost algorithms)
[Link]
1. One Versus-One Support Vector Machines (OVO SVMs)
• Based on the concept of an optimal classification surface, especially for linearly separable
cases, aiming to accurately separate two sample types while maximizing classification
intervals.
• Originally designed for binary classification
• Used when encountering multi-classification problems
• Depend on two parameters : C and γ=1/σ^2
• Kernel functions like polynomial, Gaussian, and linear are considered, choosing Gaussian
for its flexibility.
➢Gaussian kernel function :
‖𝒙𝟏−𝒙𝟐‖𝟐
K(x1, x2) = exp( 𝟐𝝈𝟐 )
[Link]
2. Random Forest (RF)
• In 1980, Breiman introduced the classification tree algorithm. Then integrated classification
trees into Random Forest in 2004, marking a significant development in ensemble learning
techniques.
• RF builds upon the bagging concept, using the Classification and Regression Tree
• It selects an optimal feature subset to partition decision tree subtrees, thus enhancing
generalization ability.
• RF is efficient in classifying or regressing data and reducing computation time.
• It is robust to missing data and unbalanced datasets, with strong processing capabilities for
high-dimensional data, leading to high calculation accuracy.
• Trained RF models exhibit low variance and strong generalization, with highly parallelized
training processes for faster speed.
• Key parameters for RF include n_estimators, determining the number of trees in the forest,
and max_features, specifying the maximum number of features considered for splitting to
balance variance and bias.
[Link]
3. Neural Networks (NN)
• Neural Networks represent mathematical or computational models functioning as nonlinear
and adaptive information processing systems.
• They consist of interconnected nodes forming multilayer nonlinear functions, creating
complex and adaptive models.
• The critical component of neural networks is the activation function
• the sequential model is used for constructing highly complex networks with careful
selection of activation functions for input, hidden, and output layers.
• Setting a reasonable number of iteration rounds ,If the number of iteration rounds is too
small so the model underfit the data .on the other hand Excessive number of iteration
rounds lead the model overfit the data
[Link]
4. Extreme Gradient Boosting Trees (XGBoost algorithms)
• XG Boost is a boosting algorithm that integrates multiple tree models into a robust classifier.
• During sample prediction, each tree generates a score and the predicted value is the sum of
all scores.
• It offers fine control over model complexity, supporting parallelization for faster
computation.
• In establishing the prediction model there are three key parameters prioritized: number of
decision trees, maximum tree depth, and step size for weight updates which consider as
learning rate.
[Link]
Calculation of distance between
the bit and the vertical reservoir
boundary
[Link]
❖ Assume that the “zero length” is s, the distance from the LWD tool to the upper boundary of
the reservoir is h1, the distance to the lower boundary is h2, the distance from the bit to the
upper boundary of the reservoir is h3, the distance to the lower boundary is h4, the formation
dip is β, the well inclination is θ, and in the range of “zero length”, the change in azimuth can
be ignored, so the angle between the well trajectory and the horizontal direction is α = 2π − θ
Non-sandstone
h1 s h3
Sandstone
α
h2 h4
Non-sandstone
[Link]
❖ If h1 < h2, the D-MP-VRB prediction model is used to predict h1, the distance between the
bit and reservoir boundary h3 = h1 − s × sin(α − β) = h1 − s × cos(θ + β), After calculating
the distance h3 by using this formula, the relative position of the bit and the reservoir
boundary can be determined to identify the formation lithology at the bit.
Non-sandstone
h1 s h3
Sandstone
α
h2 h4
Non-sandstone
Case Study
[Link]
[Link]
❖ Using logging data from a sandstone reservoir in the Zhonghua Oilfield, located
within the Huadong Basin, China (ranging approximately between 112.456°–
112.678° east longitude and 34.789°–35.012° north latitude), an analysis was
conducted to evaluate reservoir characteristics and lithological properties
❖ the D-MP-VRB prediction models are established using the OVO SVMs, RF, NN,
and XGBoost algorithms and uses the 10-fold cross-validation method to
optimize the objective function and find the best parameter values to provide high
accuracy and avoid overfitting
❖ Eight wells logging data are utilized to delineate the D -MP- VRB within the
sandstone reservoir, excluding distances exceeding 12 meters. the distribution of
various label data is not uniform. The farther the measuring point is from the
boundary, the less the sample data is. Therefore, in the process of using 10-fold
cross validation, random sampling cannot be selected, stratified-shuffle split
should be chosen.
[Link]
❖ The feature parameters for each dataset include true formation resistivity, acoustic , density ,
spontaneous potential , shale content , gamma ray , and caliper. The feature parameters
undergo min-max standardization processing. Partial data from the D -MP -VRB database
are used for this purpose.
Features Rt(Ωm) AC(μs/m) DEN(g/cm3) SP(MV) SH(%) GR(API) CAL(cm)
Minimum value 2.026 170.735 1.799 - 88.075 2.500 28.120 19.108
Maximum value 1562.577 310.843 2.732 40.418 99.900 252.384 30.491
[Link]
❖ After employing a Python-based data analysis and processing module to cleanse the
acquired data, correlation analysis of the feature parameters reveals that only gamma ray
and shale content exhibit a strong correlation.
[Link]
0.25m 0.5m 1m 2m
Rt AC DEN SPC GR CAL
step step step step
1 1 1 1 0.0503 0.4213 0.7149 0.5850 0.2408 0.3291
❖ The rest of the feature parameters are
1 1 1 1 0.0504 0.4309 0.7149 0.5862 0.2427 0.3230
selected for model training . In the step size
2 1 1 1 0.0509 0.4476 0.7181 0.5879 0.2191 0.3191
column of the database, numbers indicate
the corresponding number of step distances 2 1 1 1 0.0531 0.4613 0.7245 0.5898 0.1977 0.3196
between the measurement point and the 3 2 1 1 0.0583 0.4646 0.7363 0.5918 0.1833 0.3268
boundary, with 0.25m steps the number 4
3 2 1 1 0.0664 0.4575 0.7556 0.5938 0.1883 0.3460
indicates that the distance between the
4 2 1 1 0.0313 0.6805 0.3666 0.5204 0.2338 0.3627
measurement point and reservoir boundary
4 2 1 1 0.0270 0.5835 0.4673 0.5152 0.2190 0.3687
is 0.25m times 4 equal 1 m.
4 2 1 1 0.0242 0.5326 0.5627 0.5112 0.2271 0.3525
4 2 1 1 0.0231 0.5130 0.6409 0.5088 0.2280 0.3212
[Link]
Establish D-MP-VRB
prediction model
[Link]
Establish D-MP-VRB Database
Data cleaning and standardization
Correlation analysis of feature parameters
Establish OVO Establish RF Establish NN Establish XGBoost
SVMS model model model model
Model parameter optimization
[Link]
1. D-MP-VRB prediction model based on OVO SVMs algorithm
➢ Initially, 25 combinations of parameters (C
and γ ) were tested, ranging C from 1, 10,
100, 500,1000 and γ from 0.01,0.1,0.5, 1, 0.1437
10.
➢ The initial search provided optimal parameter
values tailored to the four target categories
within the database. Subsequently, conducted
fine searches.
➢ For example, for a step size of 0.25m, then
narrowed down the search space to yield
refined optimal parameter values and select
the best parameter value: (100,0.1).
[Link]
1. D-MP-VRB prediction model based on OVO SVMs algorithm
➢ Similar fine searches were performed for
step size of 0.5m resulting in optimal 0.4092
parameter values of (50, 3)
0.2578
➢ In the third category with step size 1 meter
resulting in optimal parameter values of (1,
10).
[Link]
1. D-MP-VRB prediction model based on OVO SVMs algorithm
➢ but In the fourth category with a step size
of 2 meters, fine search was conducted
using specific parameter ranges, resulting
in 200 combinations. (13, 0.3) selected as 0.6242
the best parameter value.
➢ This systematic optimization process
ensured accurate prediction outcomes
across all target categories within the
D-MP-VRB database.
[Link]
2. D-MP-VRB prediction model based on RF algorithm
➢ In the classification study, it's determined
0.150
that max_features should be set to 2, 0.1489
considering there are 6 feature parameters. 0.145
The main parameter as n_estimators are
yielding approximate optimal values of 10,
Accuracy
0.140
100,1000, and 500 for the four step target
categories in the DMP-VRB database, 0.135
respectively.
0.130
➢ Following this, fine searches are
0 100 200 300 400 500
conducted around these optimal values for
Value of n for model
each target category. For the category with
a step size of 0.25m result an optimal
n_estimators of 70.
[Link]
2. D-MP-VRB prediction model based on RF algorithm
0.3475
0.3473
➢ Similarly, for the category with a step size 0.3470
of 0.5m, a fine search in the same range
0.3465
leads to an optimal n_estimators of 90.
Accuracy
0.3460
0.2375 0.2375 0.3455
0.2350 0.3450
0.2325 0.3445
Accuracy
0.2300
0.3440
0.2275 600 800 1000 1200 1400 1600 1800 2000
0.2250 Value of n for model
0.2225
➢ For the category with a step size of 1m, a
0.2200
fine search over n_estimators values from
0 100 200 300 400 500 500 to 2000 (in steps of 100) results in an
Value of n for model optimal value of 1100.
[Link]
2. D-MP-VRB prediction model based on RF algorithm
➢ Lastly, for the category with a step size of
2m, a fine search over n_estimators values 0.593 0.5928
from 100 to 1000 (in steps of 100) yields
an optimal value of 300. 0.592
0.591
Accuracy
➢ This systematic approach ensures that the 0.590
n_estimators parameter is finely tuned for
each target category, optimizing the 0.589
performance of the classification models
across different step sizes in the D-MP- 200 400 600 800 1000
Value of n for model
VRB database.
[Link]
3. D-MP-VRB prediction model based on NN algorithm
0.17
0.16
➢ Using the sequential model, Activation 0.15
Accuracy
functions are selected based on the four 0.14
target categories in the database: for 0.25m 0.13
0.12
the training set accuracy equals 16.11 and 0.11
Training acc
verification set accuracy equals 16.51 0.10 Validation acc
0 10 20 30 40 50
Epochs
0.30
➢ For 0.5m the training set accuracy equals
0.28
29.42 and verification set accuracy equals
Accuracy
0.26
28.79
0.24
0.22
0.20
Training acc
0.18 Validation acc
0 20 40 60 80 100
Epochs
[Link]
3. D-MP-VRB prediction model based on NN algorithm
0.42
➢ for 1 m category the training set accuracy
Accuracy
0.41
equals 41.90 and verification set accuracy
equals 40.47 ,target category model 0.40
training process after over 15 iterations 0.39
obvious overfitting occurs. 0.38 Training acc
Validation acc
0 10 20 30 40 50 60 70
➢ for 2 m category the training set accuracy Epochs
equals 62.07 and verification set accuracy
equals 62.21 0.62
Accuracy
➢ Choosing sigmoid for the input layer, 0.61
LeakyReLU for the hidden layer, softmax 0.60
for the output layer. The optimizer rmsprop
0.59 Training acc
is chosen during compilation, with cross- Validation acc
entropy loss function for multi-classification. 0 10 20 30 40 50
Epochs
[Link]
3. D-MP-VRB prediction model based on XGBoost algorithm
➢ The XG Boost prediction model was established by optimizing three main parameters:
n_estimators, max_depth, and learning_rate, using grid search and 10-fold cross-validation.
Initial optimization yielded approximate optimal parameter values for the four-step target
categories in the database:(1500, 50,0.01), (800, 15,0.05), (200, 100,0.1), and (500, 50,0.1),
respectively. Fine searches were conducted around these optimal values for each target
category.
➢ For a step size of 0.25m, 21 combinations were calculated, obtaining the optimal parameter
(1900, 30,0.01).
0.335 0.3351
0.334
Accuracy
0.333
0.332
0.331
0.330
1000 1200 1400 1600 1800 2000
Value of n for model
[Link]
3. D-MP-VRB prediction model based on XGBoost algorithm
➢ For a step size of 0.5m, 18 combinations ➢ Similarly, for a step size of 1m, 27
were calculated, obtaining the optimal combinations were calculated, obtaining
parameter (800, 50,0.05). the optimal parameter (200, 50, 0.1).
0.6195 0.6194 0.8000 0.79986
0.6190 0.7975
0.6185 0.7950
Accuracy
Accuracy
0.6180 0.7925
0.6175 0.7900
0.6170 0.7875
0.6165 0.7850
0.6160 0.7825
500 600 700 800 900 10000 100 200 300 400 500
Value of n for model Value of n for model
[Link]
3. D-MP-VRB prediction model based on XGBoost algorithm
➢ for a step size of 2 meters, 30 combinations were calculated, obtaining the optimal parameter
is (800, 50,0.1). These steps enhance the predictive accuracy and adaptability of the model
across different step sizes in the D-MP-VRB database.
0.9065 0.90615
0.90600
0.90575
Accuracy
0.90550
0.90525
0.90500
0.90450
0.90425
200 300 400 500 600 700 800
Value of n for model
[Link]
Comparison of Identification
results of each prediction
model
[Link]
❖ The accuracy comparison of prediction models (OVO SVMs, RF, NN, and XG
Boost) trained on four different step size target categories in the D-MP-VRB
database revealed varying performance trends. Generally, as the target category
step size decreased, model accuracies on both training and validation sets
decreased as well.
❖ XG Boost displayed high training set accuracies, but overfitting was evident
with smaller step sizes. However, with a 1-meter step size, its validation accuracy
improved, and with a 2-meter step size, both training and validation accuracies
exceeded 90%.
❖ OVO SVMs consistently showed low accuracies across all step sizes, struggling
to reach 70% accuracy.
❖ RF exhibited high training set accuracies but low validation set accuracies,
indicating overfitting, NN demonstrated low accuracies on both training and
validation sets but avoided clear overfitting.
[Link]
❖ Qualitatively, XG Boost required the most time for training, followed by OVO SVMs and
RF, with NN being the fastest.
35000
30000
25000
20000
TIME (S)
15000
10000
5000
0
First Second First Second First Second First Second
optimization optimization optimization optimization optimization (1 optimization optimization (2 optimization
(0.25m) (0.25) (0.5m) (0.5 m) m) (1m) m) (2m)
XG Boost OVO SVMS RF Sequential
[Link]
❖ Despite XG Boost's longer training time, its superior accuracy led to its selection as the most
suitable model.
❖ To expedite prediction on new data, retraining and parameter optimization are recommended
once sufficient new data accumulates, rather than frequent retraining with small datasets, to
enhance accuracy and adaptability.
❖ The optimized XG Boost prediction model was tested on a dataset consisting of 1234 logging
data sets, categorized into target categories of 1 meter and 2 meters steps.
parameter parameter parameter
Prediction model Sequence test set accuracy (%)
n_estimators max_depth learning_rate
1 200 100 0.1 57.65
XGBoost(1 m)
2 200 50 0.1 57.65
1 500 50 0.1 89.62
XGBoost(2 m)
2 800 50 0.1 89.62
[Link]
❖ The distribution of D-MP-VRB samples in the test set revealed concentration within 5
meters, with distances of 2 meters and 4 meters comprising the majority of data.
❖ A confusion matrix for the 2 meters step category showed varying prediction accuracies
across different distances, with some inaccuracies attributed to indistinct recognition
features and unidentifiable interlayers in the reservoir.
❖ Overall, the model achieved 90.98% accuracy for D-MP-VRB less than 6 meters. it
decreased for greater than 6 meters due to interpretation errors, reduced sensitivity of
parameters, and unidentifiable interlayers in the reservoir.
[Link]
800
700
600
500
400
300
200
100
0
1 2 3 4 5 6
Distance between measurement point and boundary
2 4 6 8 10 12
(m)
Number of samples (sets) 787 234 88 65 47 13
[Link]
Lithology prediction at the
horizontal well bit in the
reservoir
[Link]
0 55 190 242 314 489 534 694
❖ The method validated with a horizontal
well, positioned parallel to the effective
reservoir. The distance obtained from the
formula of h3 aligns with D-MP-VRB,
facilitating real-time lithology prediction at
the bit using the prediction model.
❖ Distances between the horizontal section
and interlayers are described, with
intervals of 0 to 55 meters, 55 to 190
meters, 190 to 242 meters, 242 to 314
meters, 314 to 489 meters, and 534 to 694
meters predominantly spanning 1-3 grids
(vertical grid step: 2 meters).
[Link]
❑ The statistical outcomes of the distance prediction between the bit and the vertical
reservoir boundary in the 0 to 694 meters horizontal section.
• At 0 to 55 meters is primarily predicted as 2 meters
• At 55 to 190 meters, it is mostly predicted as 2 meters and 4 meters.
• At 190 to 242 meters, 2 meters is the predominant prediction
• At 242 to 314 meters, it is mainly 4 meters and 6 meters.
• At 314 to 489 meters, the predictions are primarily 2 meters and 4 meters
• At 534 to 694 meters, they are 4 meters and 6 meters.
• Beyond 694 meters, the horizontal section essentially enters mudstone. Consequently,
when the horizontal section is drilled within 489 to 534 meters, the lithology is
mudstone, obviating the need for utilizing the D-MP-VRB prediction model.
[Link]