Predicting Equivalent Static Density of Fuzzy Ball Drilling Fluid by BP Artificial Neutral Network

Aback-propagationartificialneutralnetworkmodelisbuiltbasedon220groupsofPVTexperimentaldatatopredicttheequivalent staticdensityversusdepthforfuzzyballdrillingfluidwhichisakindofgas-liquidtwo-phasematerial.Themodelisappliedinthe Mo80-CwelllocatedinSichuanProvinceofChina;themaximumrelativeerrorbetweencalculatedresultsandmeasureddataisless than2%.Bycomparingwiththemultipleregressionmodel,thepresentmodelhasahigherprecisionandflexibility.Theequivalent staticdensityoffuzzyballdrillingfluidfromgroundtothedepthof6000mispredictedbythepresentmodel,andtheresultsshow thattheequivalentstaticdensityoffuzzyballdrillingfluidwilldecreaseslowlywiththegrowthofdepth,whichindicatesthatthe gascoresofthefuzzyballsstillcanexistasdeepas6000m.


Introduction
Fuzzy ball drilling fluid is a gas-liquid two-phase material developed by Zheng et al. [1].Because of its powerful leak-plugging ability, high low-shear-rate-viscosity, excellent thixotropy, low formation damage, and convenience of preparing [2], it has been applied to drill more than 40 wells all over the world.Although most of them are very successful, there are still many theories about fuzzy ball drilling fluid which need to be improved, among which how to determine the equivalent static density   (= /ℎ, where  is the static pressure, ℎ is depth) of fuzzy ball drilling at designated depth is one of the most important questions.The drilling fluid with too high equivalent static density will take damage to the formation, while with too low equivalent static density it will make sidewall unstable and even cause well kick and blowout.Especially for underbalanced drilling, the equivalent static density needs to be paid extra attention.
Observed under 1500 times microscope, a lot of different "fuzzy balls" with the structure of "one core, two layers, and three membranes" was found in this material (Figure 1).When it is in the static state, there is an airbag inside the microsphere and there are some fuzzy things which have high gel strength on the outer surface of the microsphere.While it is in the dynamic state, the fuzzy things are cut or scattered and flow ability becomes much better.When dispersed in water, a stable two-phase system of gas and fluid can be formed [3].The density  of the solid-free fuzzy ball drilling fluid in ground condition could be adjusted from 0.8 to 1.0 g/cm 3 according to different compositions.Also, its density can be above 1.0 g/cm 3 by adding inert weighting additives to adapt to near-balanced or underbalanced drilling.With the growth of depth, the pressure and temperature will both increase.Due to the "one core, two layers, and three membranes" structure, the fuzzy ball drilling fluid will compress with the increase of the pressure and expand with the increase of the temperature.The effects of pressure and temperature on the equivalent static density of fuzzy ball drilling fluid are inverse and asynchronous.So, prediction of downhole equivalent static density of the fuzzy ball drilling fluid is a complex and urgent issue.
Methven and Baummann [4] firstly used lab PVT experimental data to calculate downhole equivalent static density of drilling fluid at certain pressure and temperature.Following their research thought, many researchers built models predicting equivalent static density of different drilling fluids at certain pressure and temperature based on lab PVT data [5][6][7][8].They all proposed empirical model based on lab PVT data first and then determined the coefficients of the model by certain mathematical method.Their models were all about density versus certain pressure and temperature; however, depth is the most used variable in field, and pressure and temperature both are the function of depth, so it is more convenient and reasonable to establish numerical model predicting equivalent static density versus depth, instead of pressure and temperature.
ANN (artificial neutral network) is an artificial intelligence system which is modeled after the human brain and how it processes the information.BP (back propagation) ANN is currently the most widely used ANN model for one of its multilayer feed forward neural networks by error back propagation.By comparison between BP ANN and multiple regression method in many areas, BP ANN has a better applicability and higher precision than multiple regression method with respect to multifactor analysis problem [9,10].Moreover, multiple regression model is a rigid model, whose coefficients cannot be changed after the model is built even if more data is obtained, but ANN can adjust the weights and thresholds anytime if there is new data, so ANN is a more appropriate choice for the extrapolation prediction problem.Razi et al. [11] developed a BP ANN model to predict the rheological properties of water-based drilling fluids; however, until now, there has not been a BP ANN model to predict equivalent static density versus depth for a multiphase material.
In this paper, BP ANN is introduced to relate the lab PVT data and density of fuzzy ball drilling fluid; the prediction model of equivalent static density versus depth is established based on the built BP ANN.The model is applied in Mo80-C well located in Sichuan Province of China.The predicted results are compared with measured data and the results by multiple regression method.
This method could also be used to predict density for other gas-liquid two-phase material versus different temperature and pressure.) Measured density of fuzzy ball drilling fluid at each pressure and temperature [12].

Prediction Model
A group of lab PVT experiments was performed to measure the density of the solid-free fuzzy ball drilling fluid with standard state density of 0.85 g/cm 3 under the pressure range of 1-20 MPa and the temperature range of 30-130 ∘ C. Then a BP ANN was established and trained by the 220 density data points and corresponding pressure and temperature.Using this BP network, the prediction model of equivalent static density versus well depth for fuzzy ball drilling fluid was built.The trend of density versus temperature or pressure is nearly linear, but, with the increase of well depth, the temperature and the static pressure caused by the overburden fluid are nonlinear, so the equivalent static density of the fuzzy ball drilling fluid versus well depth is also nonlinear, and a sophisticated model is needed to predict its distribution.conventional regression models.They are claimed to possess the property to learn from a set of data without the need for a full specification of the decision model; they are believed automatically to provide any needed data transformations.They are also claimed to be more robust in the presence of noise and distortion [14].So, BP ANN is a better choice for multiobjective prediction problem.

BP
BP ANN is divided into input layer, hidden layer, and output layer.The topological structure of the BP ANN is shown in Figure 3.In the present study, input data includes pressure  and temperature , and the output data is the density of fuzzy ball drilling fluid .
Different from conventional multiple regression method, not only can polynomial be used to describe the relationship between sets, but also exponential function, logarithmic function, and other functions can be adopted by BP ANN.These functions between different sets are called activation functions in BP ANN.The activation function used in the present paper for hidden layer is and for output layer is where  is the input data from the previous layer to the next layer.So, the density  could be expressed by the composition of ,  and activation functions, where NET is the BP network model,  is the number of neurons,  and  represent the input pressure and temperature,    is the weight of the th neurons and the th input data at the th layers, and    is the threshold of the th neuron at the th layer. out is the output density of the fuzzy ball drilling fluid, for the target output   , and an error () can be defined as We define the instantaneous value of the error energy for neuron  as 1/2 2  ().So, the total error energy for the entire network is obtained by summing instantaneous values over all neurons in the output layer, as where the set  includes all neurons in the output layer of the network.Let  denote the total number of samples contained in the training set.The average squared error energy is obtained by summing () over all  and then normalizing it with respect to size , as shown by The average error energy  av is a function of all the free parameters of the network.For a given training set,  av represents the cost function as a measure of learning performances.The objective of the learning process is to adjust the free parameters of the network to minimize  av .To do this minimization, the weights are updated on a sample-bysample basis for one iteration.The correction of the weight   () could be expressed in the form where  is a positive constant that determines the rate of learning and   () is the value of synaptic weight.Having computed the adjustment   (), the updated value of synaptic weight is determined by where   () and   ( + 1) can be viewed as the old and new values of the synaptic weight   , respectively.After all the new weight is obtained, the training process is finished.
The trained network can be used to predict the density at designated pressure and temperature.Generally speaking, when building a BP ANN, besides the data used to establish the network, there still has to be some other data used to test the model.The BP ANN is not valid until it is tested.The MSE (mean square error) and the relative coefficient  are used to evaluate the performance of the BP network model.
The MSE of the BP network model is In order to enhance the generalization ability of the BP network model, the following equation is adopted as the training objective: where () is the mean error of the weights matrix.Both the train error and test error will decrease with the training process until the preset precision is satisfied.
The error of the present BP network model is shown in Figure 4.The minimum train error and test error were achieved about 10 −5 after 305 steps of training.The final relative coefficients of the BP network are over 0.998, which indicates that the BP network has high precision and strong generalization ability.

Prediction Model of Equivalent Static Density.
The static pressure of drilling fluid at certain depth is equal to its overburden hydrostatic fluid column pressure, giving where  0 is the atmospheric pressure and  is the equivalent static pressure at depth of ℎ.The derivative of ( 11) with respect to ℎ is Taking ( 3) into ( 12) gives The boundary condition of ( 13) is Mesh the computational area along the depth direction, and discretize (13) with one-dimensional explicit differential algorithm, giving where   and   are the pressure and temperature at the th grid.Rearranging (15), the  +1 can be calculated by The equivalent static density at the ( + 1)th grid could be calculated by   =  +1 /ℎ.
The temperature of drilling fluid can be approximated as the formation temperature after full heat exchange as where  0 is the ground temperature and  is the geothermal gradient.
If the density of practical fuzzy ball drilling fluid on the ground is   0 instead of  0 , we have to modify the calculated equivalent static density by where

Model Application
Mo80-C well is sidetracking horizontal well located in Sichuan Province of China.The target horizon is at the depth of 2728.00 m, the average formation pressure is 32.61 MPa, and the geothermal distribution is The measured and calculated formation temperatures are shown in Figure 5. From the figure, we can see that the measured and calculated temperatures match well except for the near ground zone.That is mainly because that the temperature sensor is located in the drilling fluid, and the drilling fluid near ground is affected greatly by the ground working condition, so the heat of which does not exchange sufficiently with the formation nearby.The fuzzy ball drilling fluid with solid was used to drill the Mo80-C well.The density on the ground was measured to be 1.02 g/cm 3 and the volumetric percentage of solid is 8%.So the density of corresponding solid-free drilling fluid on the ground   0 satisfies where  solid is the density of solid which is 2.5 g/cm 3 in the present study, so   0 is calculated to be 0.89 g/cm 3 , and  in (19) is The predicted density of solid-free fuzzy ball drilling fluid   (ℎ) has to be converted to density of solid fuzzy ball drilling fluid    (ℎ) with The present model is used to calculate the equivalent static density of fuzzy ball drilling fluid versus depth in the Mo80-C well.The predicted results and measured data are compared in Figure 6.In order to evaluate the advantage of the present model, the results of multiple regression model proposed by Wang et al. [12] are also shown in the same figure.
From Figure 6, we can see that the results by the present BP network are closer to the measured data compared with the multiple regression models.The maximum relative error is less than 2%.The trend of predicted equivalent static density of fuzzy ball drilling fluid is the same as measured data.The difference between them may be caused by the temperature error near ground as shown in Figure 7.
After validation, the model is used to predict the equivalent static density of fuzzy ball drilling fluid as deep as 6000 m.The predicted results are shown in Figure 7. From the results, we can see that, with the increasing of depth, the equivalent static density of fuzzy ball drilling fluid will decrease slowly; this conclusion is very important, which indicates that the gas cores can still exist in fuzzy ball drilling fluid as deep as 6000 m, which means the fuzzy ball drilling fluid can be used in deep well and maintain its excellent performance.

Conclusion
Fuzzy ball drilling fluid is a gas-liquid two-phase material with the structure of "one core, two layers, and three membranes."A BP ANN was built in this paper to relate the density of fuzzy ball drilling fluid with pressure and temperature.Based on this BP network, a numerical model is established to predict the downhole equivalent static density of fuzzy ball drilling fluid versus depth.The model was applied in the Mo80-C well, by comparing with measured data and results by a multiple regression model; the BP ANN was proved to have a higher precision.Moreover, the BP ANN model is a flexible self-adjusting system, which can update weights and thresholds anytime if there is new input data.So, BP ANN is a better choice for the prediction of equivalent static density of fuzzy ball drilling fluid.
Using the present model, the equivalent static density of fuzzy ball from 0 to the depth of 6000 m was predicted.The results illustrate that the equivalent static density of fuzzy ball drilling fluid will decrease slowly with the growth of depth, which indicates that the gas-core still can exist as deep as 6000 m.
Moreover, the method used in the present study also could be used to predict the equivalent static density of another multiphase material which is affected greatly by temperature and pressure.

Figure 1 :
Figure 1: Snapshot of fuzzy ball drilling fluid under 1500 times microscope.

2. 1 .
Lab PVT Tests.The PVT tests were conducted in China University of Petroleum located in Beijing of China[12].The standard solid-free fuzzy ball drilling fluid was put into the PVT instrument after its mass was measured.By PVT instrument, the volume of the fuzzy ball drilling fluid was measured at each 1 MPa between 1 Mpa and 20 MPa and each 10 ∘ C between 30 ∘ C and 130 ∘ C. The experiments results are shown in Figure2.From the figure, we can see that the density of fuzzy ball drilling fluid increases with the growth of pressure and decreases with the growth of temperature.

Figure 4 :
Figure 4: Train error, test error, and validation error of the BP ANN during training.

Figure 5 :
Figure 5: Calculated and measured temperature versus depth in Mo80-C well.

Figure 6 :
Figure 6: Equivalent static density by the present model, multiple regression model, and filed measurement.

3 )Figure 7 :
Figure 7: Predicted equivalent static density from ground to the depth of 6000 m by the present model.