Prediction of drilling pipe sticking by active learning method (ALM)

Stuck piping is a common problem with tremendous impact on drilling efficiency and costs in oil industry. Generally, the stuck pipe troubles are solved after their occurrences by using some standard techniques; here we attempt to predict the causes of occurrence of such problems to eschew risks and excessive drilling costs. If these risks are identified in advance, better solutions can be provided to reduce the associated consequences. Based on the literature, this problem is caused by numerous parameters, such as drilling fluid properties and the characteristics of the mud cake that is formed while drilling. In this study, an attempt is made to develop a model for stuck pipe prediction. To consider all aspects of pipe sticking and behavior of the involved variables, the fuzzy logic and active learning method (ALM) can be used as a primary predictive tool. Active Learning Method is a robust recursive fuzzy modeling without computational complexity. These methods are broadly used in many industries; including oil and gas. This paper proposes a systematic approach for pipe stuck prediction based on ALM. The results of this method are more accurate than other methods and prediction accuracy is close to perfect either in stuck or non-stuck cases. This study presents a case study in which the ALM is used successfully to estimate pipe sticking. Thus, the proposed method possesses reliable results for prediction of pipe stuck, and can be used in order to minimize the risk of pipe sticking.


INTRODUCTION
Over several years oil industry is facing troubles associated with the stuck pipes.Differential pipe sticking is one of the stuck pipe mechanisms with a major impact on drilling efficiency and well costs (Adams, 1977a;Weakley, 1990;Wisnie and Zheiwei, 1994).These occurrences are common everywhere in the world and are estimated to cost the industry hundreds of millions of dollars annually.In some areas, events related to differentially stuck pipe can be responsible for as much as 40% of the total well cost.Differential pipe sticking problems generally result in the significant amount of downtime and remedial costs and well cost and time overruns as a non-productive time in terms of loss of rig days either due to stopping of drilling operations or an attempt to free the stuck pipe.This huge loss is always accounted for in the well budget cost as a contingency factor for the risks associated with the stuck pipe problems in the well planning and drilling performance approach (Adams, 1977b;Beigler and Kuhn, 1994;Wisnie and Zheiwei, 1994;Sharif, 1997;Aadnoy et al., 1999).The recent increase in drilling activity, shortage of experienced personnel and equipment, and drilling in *Corresponding author.E-mail: morteza.naraghi@utexas.edu.
higher-risks areas have increased the risk of stuck pipe events in all drilling operations (Yarim et al., 2007).
The concept of differential pressure sticking of drill pipe was first reported by Helmick and Longley (1957) according to laboratory tests.They stated that pipe sticking results when the drill pipe becomes motionless against a permeable bed and a portion of the area of the pipe is isolated by filter cake.Hempkins et al. (1987) analyzed pipe sticking statistically based on drilling parameters.This was done by comparing the properties of non-pipe stuck wells with the ones that had stuck piping.Then drilling operations were planned according to non-pipe stuck wells' characteristics.In that study, the parameters of 221 wells were investigated in 131 stuck pipes' cases in Mexico's wells and the risk of stuck pipe occurrence in others wells were estimated.Biegler and Kuhn (1994) generated a data base including 22 drilling parameters in 73 non-pipe stuck wells and 54 pipe sticking wells in Mexico's gulf.Recently, some research is being conducted in order to determine the characteristics of stuck pipe such as the depth of pipe sticking.Torne et al. (2011) tried to determine the depth of pipe sticking by means of continuous Free-Pipe logs.These studies were the base of primary comparative analysis that could identify the pipe sticking mechanisms in addition to its probability prediction.Howard and Glover (1994) improved the prediction stuck pipes' models by applying statistical techniques in 100 wells of Mexico's gulf.These models were used for prevention of pipe sticking and operation saving.Siruvuri et al. (2006) recently presented an application of Artificial Neural Network (ANN) methods for understanding the causes of differential stuck pipe.Miri et al. (2007) implemented ANN to predict the pipe sticking in Iranian offshore oil fields.Murillo et al. (2009) did a study to predict and avoid pipe sticking based on adaptive fuzzy logic.Al-Baiyat and Heinze (2012) investigated application of ANN and Support Vector Machines (SVM) in stuck pipe prediction.Jahanbakhshi and Keshavarzi (2012) used SVM with Gaussian kernel function to predict differential pipe sticking.Elahi Naraghi et al (2013) did a comprehensive study to compare the performance of different Neural Networks and Neuro Fuzzy Systems in prediction of pipe stuck.
Differential pipe sticking occurs when a part of the drill string, casing, or logging tool becomes embedded in a mud solids filter cake and is held there by a significant amount of differential pressure.This differential pressure is the pressure difference between the hydrostatic pressure of mud and the formation pore pressure.Usually, because of the excessive differential pressure, the sticking takes place across porous and permeable formations such as sandstone or limestone, where a mud filter cake builds up during drilling.It does not occur in very low permeability formations such as shale, where mud filter cakes normally do not form.Stuck pipe is identified as an impedance of drilling mud flow in the annular space and the difficulty of the pipe movement either in the upward or downward direction.In a complete stuck pipe situation, neither circulation nor pipe movement are possible.
Although these symptoms are similar to Key Seat sticking, they usually occur under different drilling conditions.Significant mud overbalance, as well as an exposed permeable section, must also exist for differential sticking to occur.Clearly, as many reservoirs become depleted, a significant number of wells will be drilled with high overbalance pressures, thereby maintaining the industry's concerns over differential sticking.
The likelihood of differential sticking increases further with the length of the permeable section that is open to the drilling fluid.The continued trend towards extended reach and horizontal drilling means that increasing lengths of permeable formations are exposed.Clearly, the nature of the rock formations encountered certainly cannot be altered.Therefore, if those formations carry a high risk of differential sticking, this has to be accepted.Furthermore, high overbalance pressures may be unavoidable if they are needed to maintain well control or wellbore stability in other parts of the open-hole section.However, mud composition and properties can be modified, within limits, in the prevention of differential sticking.
In the past multivariate statistical analysis techniques and simulated sticking testes using different drilling fluids have been performed to identify and modify parameters that lead to differential pipe sticking in order to prevent or minimize sticking.A review of published literature and laboratory data establishes the importance of mud filter cake properties (thickness, shear strength, and lubricity) on the differential sticking tendencies of mud.
Artificial Intelligence methods, such as Neural Networks and Fuzzy logic, have the ability to represent complex stuck pipe situations, which involve several variables.The methodology enables drilling industry personnel to estimate the risk of occurrences of stuck pipe not only during well planning but also during drilling.A proper prediction of the risk of differential pipe sticking will identify the main causes of the problem and consequently, the best techniques to prevent stuck pipe can be done.
This paper is organized as follows.First, an overview of active learning method is presented.The subsequent methodology section discusses input and output parameters, preprocessing step, and evaluation method are explained.Finally, the implementation results and accuracy of prediction are presented and analyzed in the numerical results part of this work.

MATERIALS AND METHODS
As discussed above, in this paper a novel approach for prediction of pipe sticking which is based on active learning method (ALM) is presented.In this method, our system possesses multiple inputs and one output, which is the probability of pipe sticking.Our model is trained by Active Learning Method.Next an overview of Active Learning Method is presented.

Active learning method
Active Learning Method (Bagheri Shouraki and Honda, 1997) is a robust recursive fuzzy modeling without computational complexity.The main idea behind ALM is to break M. I. S. O. system into some S. I. S. O. subsystems and aggregate the behavior of subsystems to obtain the final output (Mita, 2000;Nishino et al., 1999;Sakurai et al., 2003).This idea is the same as the brain activity which stores the behavior of data instead of the exact values of them.Each S. I. S. O. subsystem is expressed as a data plane (called IDS plane) resulted from the projection of the gathered data on each inputoutput plane (Bagheri Shouraki and Honda, 1997;Bagheri Shouraki et al., 1999;Yuasa et al., 1992).Two types of information can be extracted from an IDS plane.First, the behavior of output respect to each input variable that is illustrated by a curve called narrow path.Second, the level of confidence for each input variable which is proportional to the reciprocal of variance of data around the narrow path.Narrow paths are estimated by applying Ink Drop Spread (IDS) on data points and Center of Gravity (COG) on data planes (Bagheri Shouraki, 2000;Bagheri Shouraki and Honda, 1999).IDS and COG are two main operators of ALM (Bagheri Shouraki and Honda, 1997;Sagha et al., 2008).
It is very difficult for human to memorize the numerical data points but tries to memorize the general behavior function of data points.In addition, for modeling, the human converts a MIMO (Multi Inputs -Multi Outputs) system to some SISO (Single Input -Single Output) systems and then he tries to find the general behavior function in each SISO system and the effects of other inputs are considered as the deviation of data points around of the general behavior function.In addition, human can save the data points on a continuous path which means the general behavior function, but usually fails to save the randomly distributed data points in the space of variable.ALM algorithm uses all of these mentioned constructions of human modeling method . Taheri Shahraiyni (2007) developed new heuristic search, fuzzification and defuzzification methods for ALM algorithm.
In this paper, a fuzzy-based modeling approach is applied.Active Learning Method (ALM) is one of the fuzzy modeling methods which usesa basic level of mathematics.ALM was invented by Bagheri Shouraki and Honda (Bagheri Shouraki and Honda, 1997).ALM has a very simple algorithm that avoids mathematical complexity and its accuracy increases unlimitedly by increasing the number of iterations inthe algorithm.

IDS and COG Method
IDS method breaks down a complicated system into simpler sections the same as the way in which humans act encountering sophisticated subjects.For multi-input single-output (MISO) systems, this is done by dividing the MISO system,y = f(x1,x2,...,xN), into multiple single-input single-output (SISO) systems.From available input-output training data, each SISO builds a pattern which will be utilized in modeling procedure in IDS method.For each MISO system, IDS method creates N 2-dimensional discrete planes which N is the number of inputs in this MISO system.The horizontal and vertical axes of i th plane are respectively xi and y.Then, all the training data is scattered on all of these planes.This step is called "data spread" or "distilling ink drop".As individual data spreads overlap each other, the overlapping regions become exceedingly darker, and eventually result in a pattern on all the Naraghi et al. 175 planes.By implementing IDS method to constructed pattern image of each plane, two different types of information are elicited.The first one is the narrow path and the other is the deviation of the spread data points around each narrow path.Figure 1 depicts a typical result of implementing IDS method to data by radius equal to 1.This figure is a result of implementing ALM steps on data.This figure is a function between output and measured depth in the last step of dividing.The details of the steps are explained in next sections.Each Narrow path illustrates the relationship between its horizontal and vertical axes.For instance, the narrow path of 4 th plane represents the relation existing between the output and the 4 th input (x4).The deviation of spread points from the narrow path reflects the importance degree of the horizontal axes in system behavior.The less deviation of spread data from the narrow path, the higher importance degree the parameter possesses in system behavior.In other words, in this case MISO system can be approximately simplified to the SISO system described by the narrow path in that plane.The next step is to select a representative point in each column of each plane based on COG method.This point is obtained by calculating the weighted mean of all diffused data points in each column.Figure 2 depicts the extracted path of Figure 1 using COG.In order to determine the corresponding output of any new input vector xt = [xt1, xt2, …, xtN] by inference, values of narrow paths and spreads are calculated at this point from the pattern images of the planes.These values are then transferred from IDS units to the upper layer for being used for the inferential process in the ALM.ALM utilizes this information and approximates output value.

Heuristic search method
Partitioning of multi-dimensional space is a combinatorial problem.There is no theoretical approach for it; hence, heuristic search methods are used (Taheri Shahraiyni, 2007).The heuristic search is a guided search method.
Consider k inputs (x1, x2, …, xk), and a single output (y)system which is the same as our case with seveninputs and one output as mentioned earlier.The algorithm of the new heuristic search method for this system is depicted in Figure 3.
Step 1.The domain of x1 is divided into two parts (small and big).Using the ALM algorithm, the best continuous path is determined for each part of the x1 domain.Assume these paths are f11(xj) and f12(xm), which are the best paths for the first dividing step and for the small and big parts of the divided variable that are the functions of the j th and m th variables, respectively.Here, the rules for modeling are: Then, the modeling error (e11) is calculated for the above rules.Similarly, the domain of other variables is divided and their modeling errors are calculated and a set of k errors (e11, e12, ..., e1k) are generated.The variable corresponding to the minimum error is the best one for dividing of space.Suppose e1sis the minimum error and it is correspond to xs, then, the xs domain is divided into small and big values.If e1s is more than the threshold error, the dividing algorithm should continue.
e2m and e'2n are the local minimum errors.The suitable global error (e2) can be calculated using minimum local errors (e2m and e'2n).
Dividing continues until the global error is less than the threshold error.In this heuristic search method, the global error decreases simultaneously by decreasing the local errors.Figure 3 depicts the next step of dividing algorithm which is step 3.This heuristic search method uses an appropriate criterion to select a variable for dividing and the median of data is used as the boundary for crisp dividing.Hence, the number of data points in the subspaces is equal.

Fuzzy modeling in ALM
Although, ALM implements either crisp or fuzzy dividing methods, but fuzzy dividing and modeling methods can enhance the ALM performance by: 1 Satisfaction of the continuity condition, 2 Better knowledge extraction of multi-variable non-linear systems, 3 Decrease of ALM sensitivity to noise.
Fuzzy dividing is similar to crisp dividing.In crisp dividing, the dividing point of a variable is the median.However, in fuzzy dividing, the boundary of small values of a variable is bigger than the median and vice versa.Hence, the regions of small and big values of a variable can overlap.
The fuzzy systems are not too sensitive to the dividing points.Therefore, the appropriate points for fuzzy dividing can be calculated by investigating various alternatives to select the most appropriate one.
Since the presented new heuristic method utilizes a complex dividing method, the typical fuzzification methods are not compatible with it.In this paper, a simple fuzzy modeling method is explained and used which is attuned to the heuristic search method.This fuzzy modeling method has been developed by Taheri Shahraiyni (2007).The details of how fuzzy rules are extracted are as follows.
We denote the membership function of a fuzzy set as in which i is the dividing step, j is the number of dividing in each i which has a value between 1 and 2 i-1 ,s is the membership function that is related to small (s=1) and big parts (s=2) of a variable domain.
K denotes the divided variable number and is the m th member of the is a set of n variables.ALM can be implemented by fuzzy modeling with miscellaneous shapes of membership functions and the performance of ALM as a fuzzy modeling method is not sensitive to the shape of membership function.Trapezoidal membership functions are one of the most-used membership functions.Besides, implementation of a fuzzy modeling method using trapezoidal membership functions is very straight forward.As a result, trapezoidal membership functions are applied here.
The truth value of a proposition is calculated by a combination of membership degrees.For example, the truth value of ' is and is ' is expressed as: x is A and In this fuzzy method, the general fuzzy rules are defined as below: Where p is the rule number and has a value between 1 and h (h is total number of fuzzy rules), Rp is the p th rule and fp is the pth onevariable non-linear function for the p th subspace (p th rule).1/P(fp) is considered as the weight of the p th rule (Wrp) where P(fp) is PAE of fp (continuous path in the p th rule).Fire strength or membership degree of the p th rule, is equal to the truth value of the proposition which is: Obviously, the summation of truth values of all of the propositions should be equal to 1 X m(small)

 
The most prominent target followed in this paper is to develop a modeling system by which the probability of pipe stuck can be estimated.As a result, this interference system possesses multiple inputs which are assumed to have a considerable impact on pipe sticking.The output of this system is the probability of pipe sticking; hence, our system has one output, and is considered as a MISO (Multiple Inputs Single Output) system.As a modeling problem, the first step is gathering data and dividing it in two parts which are train data and test data.The train data is utilized to construct the model, and the train data which is independent of train data in used to evaluate the method.Afterwards, it should be tried to find a numerical relationship between the inputs of train data and the outputs.Then, the numerical relationship ought to be explained mathematically.In the next step, the mathematical method is used in order to calculate the output by conducting inputs of test data to the expression.Then, the calculated and actual outputs are compared to calculate the error.Afterwards, the mathematical expression is modified if required.

NO YES Gathering input-output numerical data
Projecting the gathered data in x-y planes Applying the IDS method on the data in each x-y plane and finding the continuous path in each x-y plane Implemented algorithm for ALM method is applied as follows: The first step in ALM modeling is to gather the input-output numerical data.The inputs are called 'x' and the outputs are called ' y'.Afterwards, the gathered data is projected in x-y planes.As mentioned earlier, the next step in each ALM modeling process is to apply the IDS method on the data in each x-y plane and to find the continuous path which is the general behavior or implicit nonlinear function in each x-y plane.The next step is to extract the fuzzy rules.Afterwards, the test data is conducted to fuzzy model, and the outputs are calculated.Then, the error based on a comparison between actual outputs and calculated ones is calculated.If the error is higher than required, the data domains of variables using a suitable heuristic search method is divided and the process is done again.The flowchart of the methodology is illustrated in Figure 4.

Data gathering
As discussed earlier, the main target of this paper is to develop a system by which the probability of pipe sticking is determined.This system determines the stuck pipe probability based on some properties of drilling mud and drilling operation characteristics.Following the section, an overview of different parameters affecting pipe sticking is presented.

Mud type
A comparison of generic mud types has shown oil-based muds to have the lowest stickance values and gel-water based mud has the highest.Polymer-water-based muds fall between these two extremes.It was found that the sticking potential also varies greatly within a mud type, depending on the precise formulation tested (Reid et al., 2000).

Lubricant
The addition of certain lubricants for water-and oil-based muds will reduce the effect of differential sticking.If sticking still occurs, then reduce the force needed to free the stuck pipe or tool.

Solids level
Type and amount of solids play a role in cake characteristics and affect the degree of pipe sticking and pull out force to get it free (Isambourg et al., 1999).Increasing the solids level in the mud (both weighting agent and drilled solids) has been found to increase the force needed to free the pipe.This effect depends on the type of mud used.For example, salt muds have the lowest sticking tendency until reactive drill solids are added, which resulted in one of the highest measured forces (Bushnell-Watson and Panesar, 1991).

Fluid loss
Improving fluid loss can reduce the stickance tendencies of a mud.Oil-based muds usually have low fluid loss values.However, reducing the fluid loss does not have the same effect on stickance in all mud systems (Isambourg et al., 1999).It is currently not possible to determine accurately the sticking potential of the mud from a single mud property, such as density, fluid loss, solids content, or lubricity.However, laboratory work has shown that several mud treatment options, including adding a lubricant, can reduce the sticking tendencies of a mud.

Mud cake properties
A mud cake is formed on permeable formations if the formation pressure is significantly lower than the hydrostatic pressure of the drilling fluid.As a result, there is an invasion of the liquid phase into the permeable zone and deposition and/or penetration of the corresponding solids inside and against the formation (Courteille and Zurdo, 1985).After a period of time, equilibrium is reached and deposition is balanced by erosion, resulting in a constant cake thickness.However, when the mud is static, erosion then occurs and the cake thickness increases with time.Increasing the time that the mud is not circulating will increase mud cake thickness and the likelihood of differential sticking.
Cake thickness cannot be used alone to predict the sticking tendency of different types of mud.However, for one particular mud formulation, an increase in cake thickness will increase the force Naraghi et al. 179 required to free the pipe.Darcy's Law predicts that the cake thickness will increase with the square root of time and the increase in the force to free the pipe also follows the same relationship.This suggests that the change in the sticking tendency is a result of increasing contact area.In general, to reduce the chance of differential sticking, the time that the mud is left static in the hole should be minimized (Bushnell-Watson and Panesar, 1991) .
Another parameter that influences pipe sticking is the friction factor.The friction between steel and mud cake varies with changes in mud composition.Previous studies have shown that the friction factor increased with increased barite content of the mud.Carboxymethylcellulose had no effect on the friction factor.Emulsification of oil in the mud had the effect of reducing the friction factor.In summary, the mud composition may be altered to reduce the friction between the pipe and mud cake (Annis and Monaghan, 1962).
Several characteristics of the mud cake have an effect on pipe sticking and on the necessary force to pull out the pipe.The sticking tendency of a mud cake depends on more than one parameter.It will vary as a result of cake thickness (contact area) and mud cake properties (friction/adhesion and surface roughness).The combination of these factors means that predicting the sticking tendency of any mud is not simple.
In this research, after analyzing the general properties of well and drilling fluid, seven most effective ones were selected to be used as input variables in the neural network model; these parameters are defined as follow:

Measured depth
The length of the wellbore is as if determined by a measuring stick.At greater depth, more stresses will be imposed on formation and it could be a major stuck pipe variable.

Yield point
YP is the yield stress extrapolated to a shear rate of zero.YP is used to evaluate the ability of a mud to lift cuttings out of the annulus.A high YP implies a non-Newtonian fluid, one that carries cuttings better than a fluid of similar density but lower YP.YP is lowered by adding deflocculant to a clay-based mud and increased by adding freshly dispersed clay or a flocculant, such as lime.

Plastic viscosity (PV)
PV is the slope of the shear stress/shear rate line above the yield point.A low PV indicates that the mud is capable of drilling rapidly because of the low viscosity of mud exiting at the bit.High PV is caused by a viscous base fluid and by excess colloidal solids.To lower PV, a reduction in solids content can be achieved by dilution of the mud.

Gel strength (Initial and 10 min)
The shear stress measured at low shear rate after a mud has set quiescently for a period of time (10 s and 10 min in the standard API procedure).Some drilling fluids are thixotropic, forming gelled structures when stagnant and liquefying when sheared.The specific gel strength of a drilling fluid is described as low-flat (most desirable), progressive or high-flat (both undesirable) according to its measured gel strength versus time.

Weight on bit (WOB)
Weight on bit is an essential factor in the drilling process, which can affect the rate of penetration as well as natural frequencies of the drill string in the bending mode of vibration.The WOB can also be related to the load carrying capacity of the drill string (buckling load).Increasing the weight on bit will bend the drill collars behind the near-bit stabilizer more, so the rate of build will increase.

Revolutions per minute (RPM)
A higher rotary speed will tend to `straighten' the drill collars and hence reduce the rate of build.Increasing the RPM of the bit provides more opportunities to cut the formation in a given amount of time.
In the presented approach, the pipe stuck is assumed dependent to the mentioned parameters, that is, measured depth, Yield Point (YP), Plastic Viscosity (PV), Initial Gel Strength, 10 minutes Gel Strength, WOB and RPM.The output is pipe stuck prediction.The block diagram of the system is depicted in Figure 5.

Data processing
The next step in gathering data is preprocessing data.In our study, 245 daily drilling reports of the field are utilized to train and test the method.194 of them are used to construct and train the model, and 51 of them are utilized in order to assess the method.At first, the used data is normalized based on following equation in order that all variables are in the interval [0 1].Where Xn , X , min X , and max X are normalized parameter, original parameter, minimum used parameter, and maximum used parameter.After the data is processed, the data is projected on x-y planes, and ALM steps are applied on them, and the inference system is constructed.Then the method ought to be assessed.The next part explains the evaluating process and its criteria.

Evaluating method and error calculation
The next step, after constructing a fuzzy model, is to evaluate the model, and calculate the error.As mentioned earlier, as a modeling problem, the data is divided in two parts.The first part which is the training data has been used to construct the fuzzy rules, and train the ALM model.The test data which is independent of training data is utilized in order to assess the method.The details are as follows.
The test data is conducted to the model, and the outputs are calculated based on the constructed model.The next step is to calculate the error.As discussed earlier, the main target followed by this study is to predict the pipe sticking while drilling.The data can be divided into two parts.Stuck data which is the data that pipe sticking has occurred while drilling, and none stuck data which is the data that no pipe sticking has occurred while drilling operation.In this study, the output of stuck data is assumed 1, and the output of none stuck data is assumed 0. The most important target of this study is to construct a model to determine whether pipe sticking will occur while drilling operation or not.Thus, our study is to classify the data into two parts which are stuck data and none stuck data.
In order to calculate the error, the test data is conducted to trained model, and the output is calculated.The output is a real number in [0 1] interval.If the output is greater than 0.5, the data is considered as stuck data.Otherwise, the data is considered as none stuck data.Then, the error based on a comparison of actual output and determined one is calculated.The error is defined as follows: The number of stuck data considered as nonestuck+The number of nonestuck data considered asstuck error= total number of test data

Error
After the error is calculated, if the error is higher than required the procedures based on Figure 1 are reiterated.

RESULTS
Afterwards, when the model is constructed, it requires being assessed.As discussed in previous section, the test data is conducted to the constructed model in order to assess the proposed method.As explained earlier, in this study, the same as all classification and modeling studies, the data is divided in train and test data.In this study, 150 data of daily reports of The field have been considered as train data, and the drilling reports of well number 129 of The field is used as test data.After the test data is conducted to the model, the output is calculated based on the fuzzy rules.The details of constructing the model and extracting the rules are explained earlier.Then, the error has been calculated according to previous section, and the confusion matrix is calculated.Each array of the confusion matrix is calculated as follows: = number of case that has been identified as case where the ij c is the element of row i, and column j.For example, the array of first row and second column of the Table 1 is the number of none stuck data that has been considered as stuck one.As it can be seen in Table 1, there exist no error in data, and all the test data have been predicted precisely.
As mentioned earlier, the inputs of the method are measured depth, plastic viscosity, yield point, initial gel strength, 10 min gel strength, Weight on Bit (WOB), and Revolution per Minute (RPM), and the output is the probability of pipe sticking.In order to evaluate the the number of data predicted correctly accuracy= total number of data

Accuracy
As mentioned before, artificial intelligence has been used for pipe stuck prediction (Al-Baiyat and Heinze, 2012;Jahanbakhshi and Keshavarzi, 2012;Murillo et al., 2009;Miri et al., 2007).Table 2 shows a comparison between the results of the existing methods and the proposed method.Afterwards, the relative importance of each parameter in pipe sticking is calculated as follows: accuracy of the method relative importance accuracy of the method without selected parameter 

Relative importance
The numerator of the previous equation is the accuracy of the method by means of all inputs which is 100% based on Table 1. Figure 3 depicts the relative importance of all input parameters.

Conclusion
In the ALM method, the constructed modeling system accepts seven inputs and one output which is the probability of pipe sticking.The 150 data of drilling daily reports of the field have been considered as train data.The interference system and corresponding rules have been constructed.Afterwards, in order to evaluate the proposed method, the method is implemented on the data of well number 129 of the field.Each case, which has the output less than 0.5, is considered as none stuck, and each case that has the output value greater than 0.5 is considered as stuck.The confusion matrix has been calculated which shows the method is accurate to predict the pipe stuck.In order to find the relative importance of each input parameters on pipe sticking, sensitivity analysis has been done.The result of sensitivity analysis shows that RPM and gel strength are the most important parameters in pipe sticking occurrence.

Figure 2 .
Figure 2. Extracted narrow path by Center of Gravity.

Figure 3 .
Figure 3. Algorithm of the new heuristic search method for dividing the space.
corresponding output (y m ) to m th set of input dataset is calculated as:

FindingFigure 4 .
Figure 4.The flowchart of the proposed methodology.

Figure 5 .Figure 6 .
Figure 5.The block diagram of the proposed method.

Table 1 .
Confusion matrix by ALM method.

Table 2 .
Comparison between proposed methods and existing ones.