Workflow to build a continuous static elastic moduli profile from the drilling data using artificial intelligence techniques

Rock mechanical properties play a crucial role in fracturing design, wellbore stability and in situ stresses estimation. Conventionally, there are two ways to estimate Young’s modulus, either by conducting compressional tests on core plug samples or by calculating it from well log parameters. The first method is costly, time-consuming and does not provide a continuous profile. In contrast, the second method provides a continuous profile, however, it requires the availability of acoustic velocities and usually gives estimations that differ from the experimental ones. In this paper, a different approach is proposed based on the drilling operational data such as weight on bit and penetration rate. To investigate this approach, two machine learning techniques were used, artificial neural network (ANN) and support vector machine (SVM). A total of 2288 data points were employed to develop the model, while another 1667 hidden data points were used later to validate the built models. These data cover different types of formations carbonate, sandstone and shale. The two methods used yielded a good match between the measured and predicted Young’s modulus with correlation coefficients above 0.90, and average absolute percentage errors were less than 15%. For instance, the correlation coefficients for ANN ranged between 0.92 and 0.97 for the training and testing data, respectively. A new empirical correlation was developed based on the optimized ANN model that can be used with different datasets. According to these results, the estimation of elastic moduli from drilling parameters is promising and this approach could be investigated for other rock mechanical parameters.


Introduction
The ability of a matter to revert from strain induced by external stresses is known as elasticity, and rock elastic characteristics such as Young's modulus and Poisson's ratio are geomechanical parameters that characterize the stress-strain relationship (Fjar et al. 2008). Young's modulus (E) is an indicator of stiffness and stands for the strain ( ) to stress ( ) ratio as in Hook's law (Eq. 1): where E and are in the same unit.
The design of hydraulic fracturing, wellbore stability and the estimation of the in situ stresses are all influenced by rock elastic characteristics (Hammah et al. 2006;Kumar 1976;Labudovic 1984;Nes et al. 2005). Young's modulus could be determined from experimental tests on rock samples (static) or indirectly derived from well logs (dynamic) using shear and compressional wave velocities using Eq. 2 (Barree et al. 2009).
where E dyn is the dynamic Young's modulus (in GPa), the compressional and shear wave velocities (in km/s) are donated by V p and V s , respectively, while the bulk density (in g/cm3) is donated by ρ.
A continuous profile can be presented using dynamic properties, however, the measurements of static and dynamic parameters differ considerably. Many publications presented empirical models to estimate static elastic values from dynamic parameters because core tests are costly and cannot produce a continuous profile. The models that correlate the static with the dynamic properties are presented in Table A1 in the Appendix A Part of the equations presented in Table A1 were derived with relatively small numbers of samples or for a certain type of rock. They also require the knowledge of dynamic elastic properties which is not always guaranteed.
Artificial intelligence (AI) approaches are increasingly being used to create models in various sectors of petroleum engineering. Different correlations for reservoir fluid properties have been developed using AI tools, namely PVT fluid properties (Khaksar Manshad et al. 2016), petrophysical properties (Moussa et al. 2018), drilling fluid properties (Abdelgawad et al. 2019), enhanced oil recovery (Van and Chon 2018) and geomechanical properties (Elkatatny 2018). Young's modulus was not an exception, various correlations were created using AI, as shown in Table 1. Different techniques were used to develop the presented models such as functional network (FN), adaptive neuro-fuzzy inference system (ANFIS), alternating conditional expectation (ACE) and fuzzy logic (FL).
These models in Table 1 need the acoustic log data, which may not always be available. In contrast, drilling data are easier and earlier to be available. In addition, the drilling data have been reported to be successfully utilized to generate synthetic logs for acoustic wave velocity and bulk density (Gowida et al. 2020;Gowida and Elkatatny 2020). Moreover, the use of drilling parameters in abnormal pressure zones detection and formation pressure estimation is an old technique (Jorden and Shirley 1966;Rehm and McClendon 1971). In this paper, a complete workflow to obtain a continuous static Young's modulus profile using drilling operational parameters is presented using different AI techniques.

Workflow
In this study, the following steps have been followed to utilize the drilling data to build a continuous profile of static Young's modulus. Information from two wells including drilling operational records, static and dynamic Young's modulus has been collected. Correlation between static and dynamic Young's modulus has been built using machine learning methods and presented in a previous publication . Then, this correlation has been used to fill the gap between the static values, and a continuous profile of static Young's modulus is obtained. Afterward, this continuous profile, together with the corresponding drilling parameters for the first well, has been employed to construct the model applying two AI techniques. The machine learning algorithms were blinded to the dataset of the second well, which was then utilized to validate the created model.

Data description
Data from two vertical wells drilled have been used in this study. The lithology of these two wells contains sandstone, shale and limestone. Well-1 has over 2280 data points that were utilized for models' construction, with 70% of this dataset being used for training and the remaining for testing. The machine learning algorithms were blinded to 1667 data points from Well-2, which were then utilized to evaluate the created model. Any data point consists of six drilling records that are used as inputs, in addition to Young's modulus that is set as the intended output. The following drilling parameters were gathered from field data and used in the creation of this model: -Drilling rate of penetration ROP -Weight on bit WOB -Drill pipe pressure SPP -Torque -Drilling fluid pumping rate

Data analysis
Using MATLAB code, the datasets were cleansed of noise and outliers before being fed into the machine learning methods. Data points that contain any value that is away from the mean of the data with three times the standard deviation were considered as an outlier using a built-in keyword in MATLAB. The outliers detection criteria are described in Fig. 1, out of 4307 data points, 352 points were considered as outliers. Table 2 shows the quantitative analysis of the training dataset used to create the models. As shown by the histogram in Fig. 2, Young's modulus has a distributed range of values between 0.5 and 7.15 Mpsi.

Machine learning algorithms
In this work, two AI algorithms were used, artificial neural network (ANN) and support vector machine (SVM). ANN is a popular machine learning method that mimics the brain's neurons that could be utilized in clustering, classification or regression (Aggarwal and Agarwal 2014;Chen et al. 2019). ANN contains various parameters such as neurons, activation functions, layers and learning functions (Abdulraheem et al. 2009). Many successful implementations of ANN in the oil sector have been reported (Elkatatny  SVM was introduced in the 1960s as a linear classifier and modified in the 1990s for nonlinear problems by using kernel function (Boser et al. 1992;Cortes and Vapnik 1995). Kernel function was proposed by Aizerman et al. (Aizerman et al. 1964), and there are different kernels such as homogenous and inhomogeneous polynomial, Gaussian and hyperbolic tangent. SVM was applied successfully in petroleum-

Evaluation criterion
The models were built using SVM and ANN. These methods use 70% of Well-1 data points to develop the models, and the remaining to test internally, for numerous rounds before selecting the best fit, while Well-2 data were employed as additional validation for the optimized models.
To establish the appropriate tuning parameters inside the algorithms, different runs were performed in each technique. In SVM models, two kernel functions, different values for kernel options, epsilon and regularization were tested. In ANN models, neurons quantity, training and transfer functions were optimized.
Two statistical measures, the correlation coefficient (R) and the average absolute percentage error (AAPE), were utilized to evaluate all of these models' trials. Equations 3 and 4 are used to determine R and AAPE, respectively: where N is the size of dataset, E given and E Predicted are, respectively, the measured and the AI-predicted Young's modulus values.

Results and discussion
Using dataset from Well-1, different machine learning methods were employed to train and test the models. Dataset from Well-2 was utilized for model validation after it had been constructed. This section presents the results obtained using each method and the comparison between them. Additionally, a model that could be used for different datasets is presented as a white box.

Artificial neural network
Several numbers of neurons, training and activation functions have been tested to assure the optimum outcomes from ANN. Using this technique, good results have been obtained. The correlation coefficients for training and testing were 0.97 and 0.92, respectively, while the AAPE values were between 10 and 15%. The given and ANN-predicted Young's modulus are compared in Fig. 3.

Support vector machine
Different trials have been applied using SVM with changing some tuning parameters inside the algorithm, such as kernel function and regularization. The best results were achieved using the Gaussian kernel function. It's noticeable that this method outperformed the ANN in training, however, its performance in testing was lower. The R values for training and testing were 0.996 and 0.891, respectively, while the AAPE values were 1% and 15% in the same sequence. Figure 4 presents a comparison between the actual and the SVM-predicted Young's modulus.

Models' validation
The dataset of Well-2 was completely hidden during the model's construction phase. After the best model has been achieved in each method in terms of R and AAPE of training and testing, the models have been tested with this dataset. Figure 5 ( Fig. 2 Young's modulus histogram shows the actual and predicted profiles for Young's modulus in Well-2.

Models' comparison
In comparison between the models built by ANN and SVM, it could be noticed that while SVM has better results in the training, ANN has better accuracy in the other datasets, which indicates a better-generalized model. Table 3 shows a comparison of the results obtained by the two machine learning methods in terms of coefficient of determination (R 2 ), average absolute relative error and root-mean-square error (RMSE).
Different parameters' combinations have been tested to ensure optimum fit. Table 4 displays ANN and SVM parameters that yielded the best matches between the predictions and actual values.

New empirical equation for Young's modulus
When considering all datasets, ANN provided the best fit as presented in the previous section. Equation 5 represents the ANN-based model, whereas Table A2 in the Appendix A gives the weights and biases of the model. This model has been obtained using the tangent sigmoid transfer function.

Conclusions
In this paper, building a continuous static Young's modulus profile in a real time from the drilling parameters has been investigated by utilizing two machine learning tools. In light of the workflow and tests that have been provided, this study could be concluded with the following statements: 1 + e −2(W 11,i * WOB+W 12,i * Torque+W 13,i * SPP+W 14,i * RPM+W 15,i * ROP+W 16,i * pump rate+b 1,i) Two methods were investigated and resulted in good predictions for Young's modulus with correlation coefficients all above 0.9.
ANN yielded results with correlation coefficients range between 0.92 and 0.97 for training, testing and validation, while SVM outperformed the ANN in training but with lower performance in testing and validation.  Based on the findings of this work, which demonstrate the possibility to construct a continuous static Young's modulus profile from operational drilling parameters, it is recommended that the same approach be investigated for the prediction of other geomechanical characteristics.

Appendix A
See (Tables 5 and 6).