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

Authors: Chen Yang; Zhaohong Wang; Lihui Zheng; Dengtian Mao
Journal: Advances in Materials Science and Engineering
 (2015)

---

## Abstract

A back-propagation artificial neutral network model is built based on 220 groups of PVT experimental data to predict the equivalent static density versus depth for fuzzy ball drilling fluid which is a kind of gas-liquid two-phase material. The model is applied in the Mo80-C well located in Sichuan Province of China; the maximum relative error between calculated results and measured data is less than 2%. By comparing with the multiple regression model, the present model has a higher precision and flexibility. The equivalent static density of fuzzy ball drilling fluid from ground to the depth of 6000 m is predicted by the present model, and the results show that the equivalent static density of fuzzy ball drilling fluid will decrease slowly with the growth of depth, which indicates that the gas cores of the fuzzy balls still can exist as deep as 6000 m.


---

## Body

## 1. 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 ρe(=P/gh, where P is the static pressure, h 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 (Figure1). 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/cm3 according to different compositions. Also, its density can be above 1.0 g/cm3 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.Figure 1
Snapshot of fuzzy ball drilling fluid under 1500 times microscope.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–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.


## 2. 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/cm3 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.


### 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 Figure 2. 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. 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.Figure 2
Measured density of fuzzy ball drilling fluid at each pressure and temperature [12].


### 2.2. BP ANN

BP ANN is a multilayer feed forward neural network by error back propagation which was proposed in 1986 [13]. The learning algorithm can update the weights and thresholds automatically according to the error back propagation. BP ANN can provide several advantages over 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 ANN is divided into input layer, hidden layer, and output layer. The topological structure of the BP ANN is shown in Figure3. In the present study, input data includes pressure P and temperature T, and the output data is the density of fuzzy ball drilling fluid ρ.Figure 3
Topological structure of BP ANN.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(1)tansigx=21+e-2x-1and for output layer is (2)purlinx=x,where x is the input data from the previous layer to the next layer. So, the density ρ could be expressed by the composition of P, T and activation functions, (3)ρout=∑i=1pw1i2tansigwi11P+wi21T+bi1+b12=NETP,T,where NET is the BP network model, p is the number of neurons, P and T represent the input pressure and temperature, wijk is the weight of the ith neurons and the jth input data at the kth layers, and bik is the threshold of the ith neuron at the kth layer. ρout is the output density of the fuzzy ball drilling fluid, for the target output ρr, and an error e(n) can be defined as(4)en=ρrn-ρn.We define the instantaneous value of the error energy for neuroni as 1/2ei2n. So, the total error energy for the entire network is obtained by summing instantaneous values over all neurons in the output layer, as(5)En=12∑i∈Cei2n,where the set C includes all neurons in the output layer of the network. Let N denote the total number of samples contained in the training set. The average squared error energy is obtained by summing E(n) over all n and then normalizing it with respect to size N, as shown by(6)Eav=1N∑n=1NEn.The average error energy Eav is a function of all the free parameters of the network. For a given training set, Eav 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 Eav. To do this minimization, the weights are updated on a sample-by-sample basis for one iteration.The correction of the weightwij(n) could be expressed in the form (7)Δwijn=-η·∂En∂wijn,where η is a positive constant that determines the rate of learning and wij(n) is the value of synaptic weight. Having computed the adjustment wij(n), the updated value of synaptic weight is determined by(8)wijn+1=wijn+Δwijn,where wij(n) and wijn+1 can be viewed as the old and new values of the synaptic weight wij, 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 coefficientR are used to evaluate the performance of the BP network model.The MSE of the BP network model is(9)MSE=1N∑i=1NρoutP,T-ρrP,T2.In order to enhance the generalization ability of the BP network model, the following equation is adopted as the training objective:(10)Obj=1-λMSE+λDW,where D(W) 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 Figure4. 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.Figure 4
Train error, test error, and validation error of the BP ANN during training.


### 2.3. 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(11)P=ρgh+P0,where P0 is the atmospheric pressure and ρ is the equivalent static pressure at depth of h. The derivative of (11) with respect to h is(12)1gdPdh=ρ.Taking (3) into (12) gives(13)1gdPdh=∑i=1pw1i2tansigwi11P+wi21T+bi1+b12=NETP,T.The boundary condition of (13) is (14)Ph=0=P0.Mesh the computational area along the depth direction, and discretize (13) with one-dimensional explicit differential algorithm, giving(15)1gPd+1-PdΔh=NETPd,Td,where Pd and Td are the pressure and temperature at the dth grid. Rearranging (15), the Pd+1 can be calculated by(16)Pd+1=NETPd,TdgΔh+Pd.The equivalent static density at the(d+1)th grid could be calculated by ρe=Pd+1/gh.The temperature of drilling fluid can be approximated as the formation temperature after full heat exchange as(17)Td=T0+aΔhd,where T0 is the ground temperature and a 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(18)ρ′h=αρh,where(19)α=ρ0′ρ0.


## 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 Figure 2. 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. 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.Figure 2
Measured density of fuzzy ball drilling fluid at each pressure and temperature [12].


## 2.2. BP ANN

BP ANN is a multilayer feed forward neural network by error back propagation which was proposed in 1986 [13]. The learning algorithm can update the weights and thresholds automatically according to the error back propagation. BP ANN can provide several advantages over 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 ANN is divided into input layer, hidden layer, and output layer. The topological structure of the BP ANN is shown in Figure3. In the present study, input data includes pressure P and temperature T, and the output data is the density of fuzzy ball drilling fluid ρ.Figure 3
Topological structure of BP ANN.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(1)tansigx=21+e-2x-1and for output layer is (2)purlinx=x,where x is the input data from the previous layer to the next layer. So, the density ρ could be expressed by the composition of P, T and activation functions, (3)ρout=∑i=1pw1i2tansigwi11P+wi21T+bi1+b12=NETP,T,where NET is the BP network model, p is the number of neurons, P and T represent the input pressure and temperature, wijk is the weight of the ith neurons and the jth input data at the kth layers, and bik is the threshold of the ith neuron at the kth layer. ρout is the output density of the fuzzy ball drilling fluid, for the target output ρr, and an error e(n) can be defined as(4)en=ρrn-ρn.We define the instantaneous value of the error energy for neuroni as 1/2ei2n. So, the total error energy for the entire network is obtained by summing instantaneous values over all neurons in the output layer, as(5)En=12∑i∈Cei2n,where the set C includes all neurons in the output layer of the network. Let N denote the total number of samples contained in the training set. The average squared error energy is obtained by summing E(n) over all n and then normalizing it with respect to size N, as shown by(6)Eav=1N∑n=1NEn.The average error energy Eav is a function of all the free parameters of the network. For a given training set, Eav 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 Eav. To do this minimization, the weights are updated on a sample-by-sample basis for one iteration.The correction of the weightwij(n) could be expressed in the form (7)Δwijn=-η·∂En∂wijn,where η is a positive constant that determines the rate of learning and wij(n) is the value of synaptic weight. Having computed the adjustment wij(n), the updated value of synaptic weight is determined by(8)wijn+1=wijn+Δwijn,where wij(n) and wijn+1 can be viewed as the old and new values of the synaptic weight wij, 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 coefficientR are used to evaluate the performance of the BP network model.The MSE of the BP network model is(9)MSE=1N∑i=1NρoutP,T-ρrP,T2.In order to enhance the generalization ability of the BP network model, the following equation is adopted as the training objective:(10)Obj=1-λMSE+λDW,where D(W) 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 Figure4. 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.Figure 4
Train error, test error, and validation error of the BP ANN during training.


## 2.3. 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(11)P=ρgh+P0,where P0 is the atmospheric pressure and ρ is the equivalent static pressure at depth of h. The derivative of (11) with respect to h is(12)1gdPdh=ρ.Taking (3) into (12) gives(13)1gdPdh=∑i=1pw1i2tansigwi11P+wi21T+bi1+b12=NETP,T.The boundary condition of (13) is (14)Ph=0=P0.Mesh the computational area along the depth direction, and discretize (13) with one-dimensional explicit differential algorithm, giving(15)1gPd+1-PdΔh=NETPd,Td,where Pd and Td are the pressure and temperature at the dth grid. Rearranging (15), the Pd+1 can be calculated by(16)Pd+1=NETPd,TdgΔh+Pd.The equivalent static density at the(d+1)th grid could be calculated by ρe=Pd+1/gh.The temperature of drilling fluid can be approximated as the formation temperature after full heat exchange as(17)Td=T0+aΔhd,where T0 is the ground temperature and a 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(18)ρ′h=αρh,where(19)α=ρ0′ρ0.


## 3. 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(20)T=40.134+0.0091h.The measured and calculated formation temperatures are shown in Figure5. 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.Figure 5
Calculated and measured temperature versus depth in Mo80-C well.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/cm3 and the volumetric percentage of solid is 8%. So the density of corresponding solid-free drilling fluid on the ground ρ0′ satisfies(21)1.02=0.08×ρsolid+1-0.08×ρ0′,where ρsolid is the density of solid which is 2.5 g/cm3 in the present study, so ρ0′ is calculated to be 0.89 g/cm3, and α in (19) is (22)α=0.890.85=1.05.The predicted density of solid-free fuzzy ball drilling fluid ρ′(h) has to be converted to density of solid fuzzy ball drilling fluid ρs′(h) with(23)ρs′h=1.020.08+1-0.08×ρ0′ρ′h.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 Figure6. 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.Figure 6
Equivalent static density by the present model, multiple regression model, and filed measurement.From Figure6, 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.Figure 7
Predicted equivalent static density from ground to the depth of 6000 m by the present model.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 Figure7. 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.


## 4. 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.



---

*Source: 340721-2015-06-25.xml*