Cutting concentration prediction in horizontal and deviated wells using artificial intelligence techniques

Improper hole cleaning or drilled-cutting transportation impacts drilling operations. To illustrate, inefficient cleaning of the wellbore can lead to many drilling problems such as low drilling rate (i.e. low ROP), early bit wear and, in the severe cases, a complete loss of the well due to stuck pipe. To understand efficiency in cutting transport in drilling and to provide solutions for the problem, many studies have been conducted. In all cases, they provide empirical models based on experimental data. In this study, different artificial intelligence (AI) techniques are employed to estimate the concentration of cuttings present in the wellbore. The purpose of this study is to indirectly measure the hole-cleaning efficiency in order to predict the cutting concentration from drilling parameters using artificial intelligence techniques. The study is based on 116 experimental data records from the studies. Two AI techniques were selected, namely artificial neural network (ANN) and support vector machine (SVM), to estimate the cutting concentration in the wellbore. The input parameters comprise mud density and mud rheological properties (yield point and plastic viscosity) in addition to drilling parameters including the hole inclination angle, pipe eccentricity (i.e. location of the drill pipe from the axis of the well), the rate of penetration (ROP), flow rate (GPM), drill pipe rotary speed (RPM) and temperature. The results obtained show the ability of the two employed techniques to accurately predict the cutting concentration in the wellbore with average absolute errors (AAE) less than 5% and correlation coefficients (R) higher than 0.9. Comparison of these results with a literature model showed that the AI techniques provide better predictions of cutting concentration and higher accuracy than that model. Applying the developed AI technique will help the drilling engineers to assess the hole cleaning in a real time.


Introduction
Oil and gas drilling operations include the process that is aimed at penetrating the earth surface to a subsurface hydrocarbon reservoir through a bore hole called wellbore or well. During this process, small rock fragments are produced and more of these fragments are generated as the hole gets deeper and deeper. Therefore, removing the rock cutting from the wellbore, drilling fluids, also referred to as drilling mud, is used. Drilling fluid basically is a mixture of a continuous phase (either oil or water), weighting agents (e.g. barite) and some viscosifying agents (e.g. bentonite). The ability of the drilling fluid to lift the drilled cuttings off the wellbore is governed by several factors. These factors are related to both the properties of the mud itself such as the mud density (mud weight), mud rheology and to some drilling parameters such as the hole inclination angle, drill pipe eccentricity (i.e. location of the drill pipe from the axis of the well), rate of penetration (ROP), pipe rotary speed (RPM) and more. Inefficient removal of the drilled cuttings may lead to many problems. These problems are costly and may include low ROP, early bit wear and, in some severe cases, a complete loss of the well due to stuck pipe. Therefore, it is very important to put the hole-cleaning efficiency into consideration during the drilling process.
Many studies have been conducted to understand the factors that affect the hole-cleaning efficiency. The first study on cutting transport was by Pigott (1941) in which the parameters affecting the carrying capacity of mud were identified. The first study trying to estimate the least possible annular velocity necessary to remove the cuttings from the hole was conducted by Williams and Bruce (Williams and Bruce 1951). After that, a series of experimental studies were conducted trying to understand and identify the parameters that influence the hole-cleaning efficiency. Other studies were conducted trying to model or correlate the cutting transport during drilling operations. Some studies used computer built-in models and simulators to simulate the drilling operations and monitor the cutting transport. Finally, Nazari et al. (2010) presented a comprehensive review of cutting transport.

Applications of arti cial intelligence in petroleum industry
Artificial intelligence (AI) techniques have been widely used in the oil and gas industry. AI techniques have been applied in reservoir characterization, drilling and production processes. For example, a model to identify the flow regimes in the wellbores was developed by El-Sayed (Osman 2004) using the artificial neural networks. Abdulraheem et al. (2007) used the fuzzy logic (FL) for estimating the Middle East permeability. The AI was also used by Al-Shammari (2011) to predict the pressure's drop in the bottom-hole and tubing head in two-phase flow systems in an oil-producing well. In 2012, Al-Marhoun et al. (2012) presented an AI model for predicting crude oil viscosity. Alakbari et al. (2016) also used different artificial intelligence techniques for the prediction of bubble-point pressure (P bp -). Elkatatny et al. (2016) used the ANN technique for real-time prediction of drilling fluid rheological properties. Elkatatny (2017a) also used the same technique for drill-in fluids, which is used to drill the reservoir section. It has been also demonstrated that, based on drilling fluid properties and the drilling mechanical properties, the ANN technique can be used to determine the ROP with a high accuracy (Elkatatny 2017b). Elkatatny (2017b), Elkatatny et al. (2017) developed a new empirical correlation based on ANN for predicting porosity and permeability based on well log data and showed that the black box of the ANN can be changed to a white box by developing this empirical correlation. A new correlation for permeability determination from well logs has been also developed based on the same technique, Moussa et al. (2018). Abdulhameed et al. (Mahmoud et al. 2017) predicted the total organic carbon based on conventional well log data using ANN. The ANN was also used to predict the bubble-point pressure (P bp -) and oil formation volume factor (B o -) with a high accuracy based on surface measurements (Elkatatny and Mahmoud 2018a, b). In reservoir geomechanics, ANN has also been applied successfully to estimate the geomechanical parameters based on well logs data. For example,  implemented ANN with high accuracy to predict the static Young's modulus based on well log data. Static Poisson's ratio was predicted for the first time using ANN by Elkatatny (2018). Finally, Elkatatny et al. (2018c) developed a mathematical model for the prediction of the compressional and shear sonic times using ANN from log data including gamma ray, bulk density and neutron porosity.
Nevertheless, few researchers have used the AI techniques for studying the hole cleaning during drilling operations. The first AI study on hole cleaning was done by Ozbayoglu et al. (2002) in which they used the feed-forward neural networks with back-propagation learning algorithm (BPNN) to investigate the cutting bed height in horizontal and highangle wells. In their study, they used Reynolds number (N Re ), Froude number (N Fr ) and cutting concentration (C C ) as the input parameters, whereas the cutting bed height was the output parameters. These dimensionless numbers are functions of inclination angle, feed cutting concentration, fluid density, fluid viscosity, average velocity, pipes dimensions and the wellbore. Rooki et al. (2014) and Rooki and Rakhshkhorshid (2017) used the BPNN and the radial basis neural networks (RBFN) for hole-cleaning prediction in foam drilling. In both studies, the authors used experimental data containing the foam quality, foam velocity, eccentricity, pipe rotational speed (RPM) and subsurface conditions (e.g. pressure and temperature) as the input parameters, whereas the cutting concentration was the target (output) parameter. Al-Azani et al. (2018) concluded that SVM can be used to predict the cutting concentration in the wellbore with high accuracy. The purpose of this study is to develop artificial neural networks (ANN) model to indirectly predict the holecleaning efficiency by estimating the cutting concentration in the wellbore from other drilling parameters and compare the results with the SVM which was developed by Al-Azani et al. (2018). In addition, the results from these techniques (ANN, SVM) will be compared to a correlation presented in the literature.

The parameters a ecting hole-cleaning e ciency
The following subsections show how the different parameters affect the cutting transport efficiency. These observations were taken from the literature in which experimental studies were conducted to understand these parameters and their influence on the hole-cleaning efficiency. Tomren et al. (1986) in their experimental work, and depending on several conditions, showed that there is no significant difference in the cutting concentration when the tests were conducted at 10° of inclination than those conducted in vertical holes. They also showed that at wellbore inclinations, between 10° and 30°, the formation of cutting bed is induced mainly at low flow rates. The tendency for the cuttings bed to slide downwards was observed at inclinations of 40° and 50°. Finally, at higher angles, the build-up of cuttings on one side of the annulus was observed due to the drill pipe rotation which caused the tangential "sway" of the cuttings bed. Moreover, various degrees of cuttings build-up are resulted at higher angles of inclinations. This leads to the need for higher flow rates than those recommended for safely cleaning the vertical holes. Finally, the cuttings bed is more likely to slide downwards for 35-50 degrees of inclination (Tomren et al. 1986).

E ects of pipe/hole eccentricity
It was observed that in vertical holes, the behaviour of the cuttings was almost the same for different eccentricities.
However, for inclined drill section, it was observed that cutting build-up was least when the inner pipe was co-cantered (i.e. zero eccentricity) with the outer pipe (Tomren et al. 1986).

E ect of mud rheology and density
Experimental investigations on the effect of the mud rheology on the hole cleaning by Hussaini and Azar (1983), Okranji and Azar (1986) showed that the carrying capacity of the mud increases by increasing the ratio between the yield point (YP) and the plastic viscosity (μ p ). They also showed that the lower the viscosity of the mud, the more effective hole cleaning is. Moreover, the lower the mud viscosity is, the higher the tendency of the cuttings to roll, Ford et al. (1990).

E ect of ow rate
The works of Tomren et al. (1986), Li and Walker (1999), Cho et al. (2001) and Ravi and Hemphill (2006) showed that the cuttings beds height decreases by increasing the flow rate and, hence, the annular velocity.

E ect of pipe rotation (rpm) and rate of penetration (ROP)
It has been shown that the rotation speed (RPM) is more effective in high-angle wells than vertical wells. The hydraulic requirements for effective cleaning also increase with increasing the ROP (Tomren et al. 1986) and Sanchez et al. (1999).

Arti cial neural networks (ANN)
The artificial neural network is an information-processing system that tries to mimic the performance characteristics of human nervous system. The system is adapted as a computer model that can develop associations, transformations or mappings between objects or data. ANN is also the most popular AI technique for recognizing patterns of data. Furthermore, any ANN is built-up of basic elements called neurons; that is, the ANN is collection neurons with specifically arranged formations. What is more, correlations that depend on large number of inputs can be found using the ANN. In this technique, set of operations in which the outputs and the inputs are combined are made by the essential parts of the network, which are the neurons. Nonlinear equations are also used to obtain the results for prediction problems.
There are different ANN models. These include the feedforward neural networks with the back-propagation (BPNN) learning algorithm and the radial basis functional networks (RBFN) which are implemented in this work. In the BPNN, the input parameters and the corresponding output parameters are used to train the network so that a function can be approximated, and a specific output is associated with a specific input(s) or a classification is made as assigned by the user. In this technique, and depending on the type of the problem, several activation functions are used for solving the problem. The log-sigmoid activation function is used in this study. This function is shown in Fig. 1. In contrast, the RBFN uses the radial basis transfer function shown in Fig. 2. This type of network is useful in approximating functions and making classifications.
In this technique, more neurons are required than those in the BPNN approximation (Demuth and Beale 2002).

Support vector machine (SVM)
The support vector machines were first added to the computer learning community in the mid-1990s, Cortes and Vapnik (1995). SVM is most commonly used to solve very large classification problems. It has been extended to be able to solve nonlinear regression problems, in which they show excellent performance, Zhao et al. (2010). In support vector machine, the basic idea of solving the problems is mapping the data into high dimension feature space. Then, the relationship between the input and the output in a new space is found. The data are classified by the construction of a hyper-plane in which the data are separated into two categories. The models of SVM are related to the neural networks in which the SVM uses the sigmoidal kernel function which is equivalent to a two-layer perceptron neural network. Yu et al. (2007) conducted an experimental study of hole cleaning at the University of Tulsa. They conducted their experiment under simulated downhole conditions. The total number of tests were 116 in which pipe rotation (RMP), mud density (ρ), mud rheological properties (yield point (YP) and the plastic viscosity (μ p )), pipe eccentricity (ε), temperature (T), flow rate (Q), rate of penetration (ROP) and inclination angle (θ) were varied to investigate their effect on cutting concentration (C C ). The test matrix of the experiment is illustrated in Table 1. Their data are used in this work.

Data description and analysis
For sensitivity analyses of the relationship between the input parameters and the output parameter, the correlations coefficients (R) between the independent (input parameters) and the dependent (output) parameter are shown in Table 2 and Fig. 3, and these data were obtained using the EXCEL program by selecting the data analysis function. As shown in Fig. 3, Q, RPM, ρ, T, YP, μ p , θ, ε and ROP, respectively, have the more negative effect on the C C . This negative correlation agrees with what have been previously presented regarding the parameters affecting the hole-cleaning efficiency.
The data were divided into two parts in which 70% of the data was used for training and the remaining 30% of the data was used for testing. The selection of training and testing data was done randomly in the MATLAB code during the implementation of the techniques.
For training and testing using the SVM technique, the inputs parameters were normalized in the range [− 1, 1]. For this purpose, the following equation was used (Demuth and Beale 2002):  (Demuth and Beale 2002) where x n is the normalized parameter, x is the actual parameter, and x min and x max , respectively, represent the minimum and the maximum values of the actual parameters.
Finally, for performance evaluation, the correlation coefficient (R) and the average absolute error (AAE) are used and they are defined by the following equations, respectively: where y iact represents the measured (actual) value, y ipred represents the predicted (estimated) value, and N denotes the number of samples. Higher values of R with lower values of AAE indicate higher accuracy and better performance of prediction.

Cutting concentration estimation using BPNN
In this technique, a feed-forward neural network with backpropagation (BPNN) learning algorithm was applied. Several trials were applied to perform a sensitivity analysis for the number of the hidden layers, the number of neurons in the hidden layer(s) and the appropriate transfer function. The final network consists of three layers as follows: one input layer with nine input parameters, one hidden layer with nine neurons and the log-sig transfer function and one output layer with one output parameters. Figure 4 shows the ANN topography.

Cutting concentration estimation using RBFN
In this study, the RBFN algorithm was also used for estimating the cutting concentration. This algorithm is designed using newrbe code in MATLAB®. In training the RBFN, the proper value of spread must be determined. Therefore, different values of spread were tested until the minimum AAE

Cutting concentration estimation using SVM
Support vector machine technique was also implemented as a regression tool to predict the cutting concentration from the aforementioned input parameters. For better performance of the tool, a sensitivity analysis of SVM parameters was performed until the minimum AAE and maximum R were obtained.

Results from BPNN model
The cutting concentration was estimated using the BPNN technique. In this technique, the model was trained and tested, and the best results are outlined and discussed here. Figures 5 and 6 show the plot of the actual (experimental) and predicted cutting concentration versus the test number as obtained from the training and testing stages after implementing the BPNN. Figures 7 and 8 also show the regression plots for both stages between the actual and predicted data. The figures show the closeness of the predicted C C to the actual C C . The training correlation coefficient and the average absolute error (AAE) in this stage are 0.9017 and 3.3079%, respectively. The correlation coefficient for the testing stage is 0.8691 with an AAE of 4.5692%. The training and testing results indicate that the model performance is very satisfactory. Table 3 summarizes the results obtained from implementing the BPNN technique for estimating cutting concentration. The overall correlation coefficient is 0.89 with an AAE of 3.686% which also indicate a satisfactory performance of the model.

Results from RBFN model
The cutting concentration was estimated using the RBFN technique. In this technique, the model was trained and tested, and the best results are outlined and discussed here. Figures 9 and 10 show the plot of the actual (experimental) and predicted cutting concentration versus the test number as obtained from the training and testing stages after implementing the RBFN. Figures 11 and 12 also show the regression plots for both stages between the actual and predicted data. The figures show the closeness Each neuron in the input la yer is connected to every neuron in the hidden layer and each neuron in the hidden layer is co nnected to the output layer neuron.    Yu et al. (2007) presented an empirical correlation for cutting concentration in the wellbore. This correlation is  based on dimensional analyses and dimensionless numbers. Table 6 shows the correlation coefficient and the average absolute error obtained from their model compared to the results obtained from the AI techniques discussed above. The performance of the artificial intelligence techniques implemented in this study is much better than the empirical correlation presented in Yu et al. (2007). Figure 17 shows that the performance of the AI techniques implemented in this study is much better than the empirical correlation presented in the literature.

Conclusion
In this study, the cutting concentration in deviated and horizontal well was estimated using several AI techniques. The first technique was the BPNN which has three layers: one input layer with nine parameters, one hidden layer with nine neurons and sig-sigmoid activation function and one output layer containing the target cutting concentration. In BPNN model, the correlation coefficients between the measured  The AAE for both stages are 3.308% and 4.5698%, respectively. The overall correlation coefficient and AAE from this approach were 0.89 and 3.686%, respectively. Moreover, the second technique used is the RBFN. This technique uses the same inputs and output as the previous technique. The radial basis function is the activation function used in this technique. In RBFN model, the correlation coefficients between the measured and the estimated values in the training and testing stages are 0.96 and 0.856, respectively. The AAE for both stages are 2.3356% and 4.344%, respectively. The overall correlation coefficient and AAE from this approach were 0.93 and 2.938%, respectively. SVM model yielded correlation coefficients between the measured and the predicted values in the training and testing stages of 0.94 and 93, respectively. The AAE for both stages are 2.255% and 3.644%, respectively. The overall correlation coefficient and AAE from this approach were 0.93 and 2.672%, respectively.
Amongst all the techniques implemented in this work, SVM gave a better prediction of the results as indicated by the higher overall correlation coefficient and the least overall prediction error. However, there is no much difference in the prediction between all AI methods; it is recommended to use SVM in field application.
A comparison of the AI model results to the results obtained from published empirical model shows that the predictions of cutting concentration from the AI techniques are much better than that obtained by the published one in terms of accuracy and simplicity of application. Applying the AI technique will enable the drilling engineers to evaluate the hole cleaning in a real time with a high accuracy.

Compliance with ethical standards
Conflict of interest The authors have no conflicts of interest to declare.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creat iveco mmons .org/licen ses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. Abdulraheem A, Sabakhy E, Ahmed M, Vantala A, Raharja PD, Korvin G (2007) Estimation of permeability from wireline logs in a middle eastern carbonate reservoir using fuzzy logic. In: SPE middle east oil and gas show and conference