Using Adaptive Neuro Fuzzy Inference System to Predict Rate of Penetration from Dynamic Elastic Properties

Rate of penetration plays a vital role in field development process because the drilling operation is expensive and include the cost of equipment and materials used during the penetration of rock and efforts of the crew in order to complete the well without major problems. It’s important to finish the well as soon as possible to reduce the expenditures. So, knowing the rate of penetration in the area that is going to be drilled will help in speculation of the cost and that will lead to optimize drilling outgoings. In this research, an intelligent model was built using artificial intelligence to achieve this goal. The model was built using adaptive neuro fuzzy inference system to predict the rate of penetration in Mishrif formation in Nasiriya oil field for the selected wells. The mean square error for the results obtained from the ANFIS model was 0.015. The model was trained and simulated using MATLAB and Simulink platform. Laboratory measurements were conducted on core samples selected from two wells. Ultrasonic device was used to measure the transit time of compressional and shear waves and to compare these results with log records. Ten wells in Nasiriya oil field had been selected based on the availability of the data. Dynamic elastic properties of Mishrif formation in the selected wells were determined by using Interactive Petrophysics (IP V3.5) software and based on the las files and log records provided. The average rate of penetration of the studied wells was determined and listed against depth with the average dynamic elastic properties and fed into the fuzzy system. The average values of bulk modulus for the ten wells ranged between (20.57) and (27.57) GPa. For shear modulus, the range was from (8.63) to (12.95) GPa. Also, the Poisson’s ratio values varied from (0.297) to (0.307). For the first group of wells (NS-1, NS-3, NS-4, NS-5, and NS-18), the ROP values were taken from the drilling reports and the lowest ROP was at the bottom of the formation with a value of (3.965) m/hrs while the highest ROP at the top of the formation with a value (4.073) m/hrs. The ROP values predicted by the ANFIS for this group were (3.181) m/hrs and (4.865) m/hrs for the lowest and highest values respectively. For the second group of wells (NS-9, NS-15, NS-16, NSJournal of Engineering Volume 26 July 2020 Number 7 46 19, and NS-21), the highest ROP obtained from drilling reports was (4.032) m/hrs while the lowest value was (3.96) m/hrs. For the predicted values by ANFIS model were (2.35) m/hrs and (4.3) m/hrs for the lowest and highest ROP values respectively.

19, and NS-21), the highest ROP obtained from drilling reports was (4.032) m/hrs while the lowest value was (3.96) m/hrs. For the predicted values by ANFIS model were (2.35) m/hrs and (4.3) m/hrs for the lowest and highest ROP values respectively. Keywords: Rate of penetration (ROP), Adaptive neuro fuzzy inference system (ANFIS), Nasiriya oil field, Dynamic elastic properties.

INTRODUCTION
The developments of oil fields focus on finishing the wells in lowest cost. For that reason, future management of oil field will face obstacles to reduce the overall costs, increase performance and reduce the probability of encountering problems. Drilling wells processes has shown considerable technological advances in recent years. Different methods from different disciplines are being used now in drilling activities in order to obtain a safe, environmental friendly and cost-effective well construction (Anemangely et al., 2018). Drilling parameters relations are complex, thus the efforts is focused on determining what combination of operating conditions result in minimum cost drilling (Dhiman, 2012). The rate of penetration is important in drilling the wells that are required in the development process of the oil field (Alkinani et al., 2018). So in order to implement the optimization concept for drilling parameters and reduce the cost of drilling, the data of the drilled wells in areas that have the same geological properties are gathered and analyzed to start drilling the well in lowest cost as possible (Alsenwar, 2017). The drilling process is a complex process including many factors some of them can be adjusted at a time to enhance the drilling process and they are changeable with time, these parameters called controllable parameters. The other parameters are difficult to control. These parameters called uncontrollable parameters. Predicting penetration rate includes some difficulties because it relies on both the controllable and uncontrollable parameters. Many mathematical models have been proposed by several researchers to predict the penetration rate and to investigate the relationship between different drilling parameters and the penetration rate. Teale (Teale, 1965) presented the concept of mechanical specific energy and the equation concluded in term of the operational parameters as follows: Where MSE is the mechanical specific energy, WOB is the weight on bit (Ibf), N is the rotary speed (RPM), Ab is the borehole area (inch), is bit specific coefficient of sliding friction and ROP is the penetration rate (m/hrs). Bourgoyne and young (Bourgoyne Jr and Young Jr, 1974) developed a model based on the multiple regression analysis of the field data gathered. The model describes the ROP as a function of formation strength, formation compaction, formation depth, differential pressure, bit diameter, bit weight, bit wear, and bit hydraulics. The equation for predicting the penetration rate taking into account various drilling parameters is as follows: Where ( ) is the penetration rate (m/hrs). The constant a1 to a8 are calculated by multiple linear regression.
Hareland and Motahhari (Motahhari et al., 2009) proposed a model based on Hareland model for PDC bit assuming 100% cleaning efficiency: Where G is a coefficient determined based on bit and blade geometry.
Is the wear function calibrating ROP values for a worn bit. Unconfined rock strength (psi). And it's a function of WOB, RPM, and rock strength at the drilling depth.
In the eighties of the last century, intelligent supervision had been raised and coupled between computer assist systems and artificial intelligence concept as important cooperation (Al-dunainawi, 2017). The idea of the fuzzy system came to the public in 1956 by Lotfi A. Zadeh (Zadeh, 1965). The fuzzy system is an important part of fuzzy theory and is designed to deal with mystery and doubts. It can provide a method for making a certain conclusion from not complete information or missing data. In contrast with the concept of classical logic, the fuzzy logic system is designed to model the ambiguous case to do a crucial function like the human ability in making a decision in unforeseeable medium Fuzzy logic system. In present, fuzzy logic 48 is one of the main divisions of artificial intelligence. It has been witnessed prolonged studies since it introduced in 1965. A closer look at the previous researches demonstrates the successful hiring of fuzzy logic in a wide range of branches. The fuzzy inference system is designed and constructed to acquire the wanted input-output. The technique used for learning enables changing the parameters of the membership functions and the consequents in Sugeno system (Abbas, 2019). Takagi-Sugeno fuzzy model is a functional gadget for stating complicated non-linear systems (Kricak et al., 2015). The main idea behind using a fuzzy inference system is to make a decision based on knowledge of the target. Fuzzy inference system can be divided into two models, Mamdanitype and Sugenotype. The major problem related to fuzzy systems is choosing the optimum number of rules and the appropriate type of membership function. Fuzzy clustering is the method of dividing the data into groups based on similarities between the data there are two types of fuzzy clustering: fuzzy clustering method and subtractive clustering (Habeeb, 2018). Adaptive neuro-fuzzy inference system (ANFIS) integrates the artificial neural network (ANN) and the fuzzy logic (Salal, 2019) . ANN capable of learning from the input-output data and organize its own structure and adjust its environment )Ahmed et al., 2019). Sugeno, as shown in Fig (1), can be consist of one or more inputs and one or more outputs. Each input characterized by a fuzzy set. For the example shown in Fig (1) A1 and A2 are fuzzy sets associated with (x) variable. B1 and B2 are fuzzy sets associated with y variable. In ANFIS, the relationship between input and output is shown as if-then rules for example: Rule1: if x is A1 and y is B1; then f1 = p1x + q1y + r1 (4) Rule2: if x is A2 and y is B2; then f2 = p2x + q2y + r2 (5) p1, q1, r1 and p2, q2, r2 are the consequent parameters. A1, B1, A2, and B2 are the linguistic labels which are fuzzy sets as in Fig (1). ANFIS model consists of several layers each layer has a different number of nudes explained as follow:

Layer 1:
This layer is the fuzzification layer. The antecedent parameters of the fuzzy rules performed as nodes in this layer. The parameters of these nodes control the shape and the center of each fuzzy set.

Layer 2:
This layer characterized as rule layer. The output of this layer is a product of all incoming signals from the linguistic labels. The number of nodes in this layer is equal to the number of rules. Each node in this layer measures the firing strength of each rule.
Layer 3: This layer is known as normalization layer. The number of nodes in this layer is fixed as in layer 2. The output of this layer as follows: 49

Layer 4:
This layer is the defuzzification layer the output of this layer is as follows: Where ̅ is a normalized firing strength from layer 3 and the {p, q, r} are the consequent parameters for this node. (f i ) can either be the first-order polynomial or predefuzzified constant.

Layer 5:
This is the output layer. The output of this layer is the summation of the outputs from the layer 4. The output is given by (KOraee, 2012): Figure .1 Adaptive network and fuzzy system.
The linguistic variable in the fuzzy system represents the fuzzy variable, for example, the statement "John is tall" consist of linguistic variable "john" and linguistic value "tall". The linguistic variables are hired in the fuzzy rules and fuzzy systems. Another example if the temperature is defined as a linguistic variable then the linguistic value of the temperature is represented in degrees. The temperature is demonstrated as (Suparta and Alhasa, 2013): "Cold" if the temperature less than 15º C "Moderate" if the temperature about 15º C 50 "Hot" if the temperature more than 15º C The membership in the fuzzy systems can be represented as a curve to describe the degree of membership for each input in the fuzzy system. Its value ranged from (0 to 1) there are different types of membership function to be chosen to fit the data. The fuzzy logic contains 11 different membership functions. It's denoted by the symbol ( ). The easiest membership function type is triangular which is coded as (trimf) and consist of a three-point forming triangle. This type is characterized by its lower limit and upper limit. Another membership function is the trapezoidal membership function which consists of four points. Coded as (trapmf) and has a flat top and a triangle curve. This type is defined by its four limits, the lower limit and upper limit, the lower and the upper limits of its nucleus respectively (Buragohain, 2009).

Area of case study
Nasiriya oil field is located on the Arabian platform in Dhi-Qar governorate, southern of Iraq. A zone with a gentle fold. The field is about 38 kilometers northwest the Nasiriya, west of the Zagros fold belt. The area of the field is located on an unstable shelf close to the Arab platform (Mesopotamian zone). This zone characterized by the presence of subsurface anticlines and domes with variable extension. Arabian shield suffered from erosion that put in a lot of clastic sediments (Zubair formation). Nasiriya oil field has reserves in the late cretaceous (Mishrif limestone formation) and early cretaceous ( Five exploratory wells drilled in the Nasiriya oil field with in the period 1978-1987. All the picked wells are production wells and scattered to overlay wide area of the Nasiriya oil field. This distribution gives a high stiffness in the field data. All logs are present for these wells (INOC, 2007). Core samples were used in this research. Laboratory measurements were conducted on the core samples to compare log reading and lab measurements. James Instrument V-Meter Mark IV Ultrasonic device used for measuring the compressional and shear waves' velocities. Fig 2. shows the core sample between the device poles while measuring the transit time. The samples dimensions were (1) inch in diameter and (2) inches in length. After the samples preparation process, the dynamic elastic properties which include bulk modulus, shear modulus, and Poisson's ratio are computed. Then, the data were used to build an intelligent model using fuzzy inference system to predict the rate of penetration.

3.FUZZY INFERENCE SYSTEM (FIS)
Fuzzy inference system characterized by fast learning due to use hybrid learning algorithm which is a combination of backpropagation and gradient descent. Also backpropagation can be used alone but sometimes it's slow and may not give the desired results. The data set selected and organized in a certain form that the program can accept it before building the model. Then the (FIS) system is generated by selecting the number of membership functions. Next, either hybrid or backpropagation learning algorithm selected to model the results. Also, the number of epochs as well as the error tolerance between the predicted and the actual must be selected before the training begin. After the training finished, the model can be tested against the desired outputs. The input data set which includes the dynamic elastic properties and the penetration rate was fed to the software as a vectors. The target formation is the Mishrif formation which its top and bottom are not the same in all wells. The values of the dynamic elastic properties and the rate of penetration were averaged and used against depth. Four membership functions selected for each input to generate the fuzzy inference system and the type used is Gaussian membership function. This type of membership function gave better results and fitted this data better than the other types. Linear membership function was chosen for the output. The error tolerance and the number of epochs were 0 and 3 respectively. The training algorithm used was the hybrid training algorithm. The system continuously change the antecedents and the consequent parameters during the training phase. Also, the shape of membership functions changed at each epoch until the minimum percentage error reached. In prediction stage, each input passed throw its four membership function to assess its degree of membership and single value will be provided as output. The structure of the fuzzy model is shown in Fig.3

4.RESULTS AND DISCUSSION
The first step in calculating the dynamic elastic properties is identifying which type of lithology is present in Mishrif formation. Second, the clay volume must be calculated to be used as input in calculating dynamic elastic properties. Then, Shear wave velocity was obtained by using Greenberg Gercek (Gercek, 2007). The average values of (VP/VS) ranged from (1.865) to (1.905) where the velocity was in (ft/s) which is nearly (1.9) for limestone. These values agree with Pickett (Pickett, 1963), Fadhil (Fadhil, S, 2016) and Zinszner and Pellerin (B. Zinszer, 2007) results for (VP/VS) values for limestone. Sample of elastic properties results were plotted in Fig .6 and Fig.7 for the wells NS-3 and NS-9 respectively.
waves. James instrument V-meter mark IV device used for these measurements and it has an advanced microprocessor and equipped with the S-wave response (shear wave transducers). The results showed good agreement between laboratory measurements and log records with maximum absolute percentage error (APE) 20% and the minimum (APE) was 1%. The results obtained from the model were close to the data from drilling reports. The Table (1) illustrates the values of the dynamic elastic properties for the selected wells. . Standard deviation gives an idea about how the data are spread out around the mean (average). Low standard deviation means that most of the numbers are close to the mean. Higher standard deviation was obtained from NS-21 with a value of (9) for bulk modulus. In the other hand, the minimum value of standard deviation was obtained from NS-15 which was (4.7). The deviation around the mean was smaller for the shear modulus. Largest deviation around the mean was (4.1) from NS-3. NS-15 gave low standard deviation around (2.5). In case of Poisson's ratio, the highest value of standard deviation was (0.019) gained from NS-16. While the lowest value of standard deviation obtained from NS-21 was (0.009). Average values of dynamic elastic properties were plotted with average values of rate of penetration. For the first group of wells . The ROP was supported as average value for each interval. Linear regression was used to generate the ROP for each meter. The correlation coefficient was (0.91). Fig. 8 shows a plot between the bulk modulus and shear modulus with the rate of penetration. As the values of the bulk modulus and shear modulus increase, the rate of penetration starts to decrease. This is due to the increase in rock resistance to pressure applied with increasing the bulk modulus value. Also the rock resistance to shear forces will be high when the shear modulus values are high. This mean that the rocks will be harder to penetrate. Fig. 9 demonstrates the relationship between the Poisson's ratio and the rate of penetration. Higher Poisson's ratio means that the rock has lateral deformation higher than the axial deformation. In result, lower rate of penetration.    Fig .8, as the bulk and shear modulus increase the ROP decrease. Fig .11 presents the relationship between ROP and Poisson's ratio. As the Poisson's ratio increase, the ROP decrease.   Poisson's ratio vs rate of penetratio

CONCLUSIONS
As shown in Fig (8), (9), (10) and (11) when the values of dynamic elastic properties decrease the ROP values rise up. Low rate of penetration was obtained which was between (3.9) and (4.1) in Mishrif formation. Based on the values of (VP/VS), sonic-neutron, and neutron-density cross plots the lithology of Mishref formation was limestone with some shale point scattered. Also the values of dynamic elastic properties in Table 1. revealed that the change in elastic properties was within the limestone values range. The average values of dynamic elastic properties for the ten wells ranged between (20.57) and (27.57) GPa for the bulk modulus and from (8.63) to (12.95) GPa for the shear modulus. Also was between (0.297) and (0.307) for the Poisson's ratio. Low rate of penetration was expected in carbonate formation due to high elastic properties. The ANFIS model mean square error was about (0.015). As a result, the model gave a close results to the real data and can be used in (ROP) prediction in similar areas. Fig .12 and Fig. 13 display Convergent results between the predicted and the actual ROP. Because bulk modulus is a measure for rock resistance to the pressure applied in all directions, so as the bulk modulus increase ROP decrease. From Fig  8. the highest rate of penetration was (4.074) m/hrs at low bulk modulus which was (5.57) GPa and low shear modulus (2.7) GPa. As shown in Fig 9. the highest ROP value was (4.074) m/hrs at low Poisson's ratio (0.1). The highest ROP was (3.74) m/hrs at bulk modulus value of (9.14) GPa and shear modulus value (4.15) GPa as demonstrated in Fig.10 And for Fig .11, the highest ROP was at low Poisson's ratio (0.123). The Bulk modulus showed high distribution of the values around the mean. The highest value of the standard deviation was (9) obtained from NS-21. In case of shear modulus, the highest value of standard deviation was (4.1) from NS-3. For the Poisson's ratio, the values were close and the distribution was not major. Highest value of standard deviation was (0.019) obtained from NS-16. No clear trend was obtained between dynamic elastic properties and ROP in Mishrif formation. This is due to the carbonate reservoir, which is characterized by high heterogeneity. And also there are other factors can effect on ROP.