Parameter Identification of Multistage Fracturing Horizontal Well Based on PSO-RBF Neural Network

In order to more accurately identify multistage fracturing horizontal well (MFHW) parameters and address the heterogeneity of reservoirs and the randomness of well-production data, a new method based on the PSO-RBF neural network model is proposed. First, the GPU parallel program is used to calculate the bottomhole pressure of a multistage fracturing horizontal well. Second, most of the above pressure data are imported into the RBF neural network model for training. In the training process, the optimization function of the global optimal solution of the PSO algorithm is employed to optimize the parameters of the RBF neural network, and eventually, the required PSO-RBF neural network model is established.,ird, the resulting neural network is tested using the remaining data. Finally, a field case of a multistage fracturing horizontal well is studied by using the presented PSO-RBF neural network model.,e results show that in most cases, the proposedmodel performs better than other models, with the highest correlation coefficient, the lowest mean, and absolute error. ,is proves that the PSO-RBF neural network model can be applied effectively to horizontal well parameter identification. ,e proposed model has great potential to improve the prediction accuracy of reservoir physical parameters.


Introduction
Reservoir description is an important means of estimating the physical properties of a reservoir in the petroleum industry. ese reservoir physical parameters require better methods to improve the prediction accuracy to further enhance the subsequent success rate of exploration and development. Multiphase flow in oil and gas fields usually refers to the simultaneous flow of multiple fluids in a reservoir, which generally occurs during oil and gas production [1,2]. For the old oilfields, oil and gas development has experienced stages such as self-spraying, secondary, and tertiary oil recovery, which makes the process of the oil and gas production complex and challenging. In order to deal with this complexity, a lot of studies have been done at home and abroad, and the reservoir numerical simulations have been introduced to estimate the multiphase flow characteristics of oil, natural gas, and water [3,4].
In the petroleum industry, well-logging data have been commonly used to predict formation parameters such as permeability, formation boundaries, and fracture length. Permeability is defined as a measure of the ability of a porous medium to allow fluid to pass through it. e concept of permeability is important for determining accurate reservoir description, simulation, and management. erefore, prior to any modeling or calculation, the permeability of porous media must be determined. e earliest method of permeability prediction is the empirical correlation between permeability and other petrophysical properties such as porosity and water saturation. ese correlations have made some successes in sandstone reservoirs. However, it is not applicable to heterogeneous formations.
In recent years, the artificial neural network (ANN) has been applied to the reservoir field, solving many highly complex nonlinear problems [5]. e ANN is considered to be a nonlinear tool that can predict complex nonlinear system behavior well. It is also used to solve many different types of problems in petroleum engineering, such as reservoir characterization, permeability prediction, vertical multiphase flow downhole pressure prediction, and dissolved gas driven flow prediction [6][7][8].
e ANN is considered to be a method that can effectively replace traditional techniques of predicting permeability from well-logging data. e disadvantage of the ANN application is the requirement to identify the structure of the network. In order to overcome the shortcoming, in this study, an MFHW parameter identification model based on the PSO-RBF (particle swarm optimization, PSO; radial basis function, RBF) neural network is proposed. e main purpose is to seek a better prediction of reservoir properties. e parameters of the radial basis neural network are designed by using the particle swarm algorithm to obtain higher prediction accuracy. e parameter identification model based on the PSO-RBF neural network has high learning ability and flexibility when encountering complex problems, which makes the proposed model applicable to most engineering practices.

Review of Related Works
In the past few decades, researchers have done a lot of work to study reservoir parameter estimation problems, such as permeability, porosity, and fracture length. Taking the estimation of permeability as an example, there are currently three main methods: core analysis, well test analysis, and artificial intelligence methods. e most accurate method of permeability prediction is to perform core analysis in the laboratory by applying Darcy's law. Among the different techniques, the permeability obtained from the core analysis is more efficient than that obtained by other methods, and the permeability from the core analysis can be used to verify other estimation models. However, the core analysis process is time consuming and difficult to use widely.
Another method of obtaining reservoir permeability is well test analysis. e analytical solution is solved by using the porous flow equation, and some rock properties such as permeability and porosity can be then obtained inversely from the pressure curve. e data available after well testing help petroleum engineers calculate formation permeability, skin factor, and wellbore storage [9]. Due to the cost of testing, well testing is not a good solution for any reservoirs that have been developed.
ANNs are increasingly being employed to predict reservoir properties based on geophysical well-logging data [10,11]. Mohaghegh et al. pointed out that neural networks are powerful tools for identifying the relationship between permeability and well-logging data [12]. In addition, Aminian et al.'s research shows that artificial neural networks can be used to predict formation permeability, even in highly heterogeneous reservoirs [13,14]. Based on the artificial neural network and particle swarm optimization algorithm, Ahmadi et al. proposed a method for predicting horizontal well productivity in a pseudosteady state, and the experimental results achieved a high fitting accuracy (<0.82%) [15].
Zhang et al. proposed a hybrid algorithm that combines a particle swarm optimization algorithm with a back-propagation algorithm to train the weights of a feed-forward neural network. e results show that the hybrid algorithm is superior to the adaptive particle swarm optimization algorithm and backpropagation neural network (BPNN) in both convergence speed and convergence accuracy [16]. Based on the RBF and BPNN, Chen developed two water treatment models. e model has been trained and checked separately from actual data from the water plant. Compared with the model based on the BPNN, the model based on the RBF neural network has the characteristics of better approximation and faster convergence [17]. Based on the models of the BPNN and RBFNN (the radial basis function neural network, RBFNN), Yang et al. proposed a model for cement decomposition and calcination process. e results show that the model based on the RBFNN can achieve very high fitting results [18].
Saemi et al. improved the predictive performance of neural networks by using the GA to optimize the network parameters of the ANN [19]. In addition, Kaydani et al.'s findings indicate that the GA and ANN network structures designed by subregion can predict the permeability of a heterogeneous reservoir in Iran [20]. Tahmasebi et al. proposed four methods for predicting permeability of different neural network structures and statistically compared the results obtained. Finally, a new method of the modular neural network (MNN) was obtained [21]. By combining cuckoo optimization algorithm (COA), particle swarm optimization algorithm (PSO), imperialist competitive algorithm (ICA), and Levenberg-Marquardt algorithm (LM), Kaydan et al. proposed a new method to estimate the permeability [22].
Rough set theory can be successfully applied to the prediction of permeability of porous media [23][24][25][26][27][28]. By establishing a rough set model, Ilkhchi et al. successfully predicted the permeability of an offshore gas field in Iran [29]. Support vector regression (SVR) based on the principle of structural risk minimization is a promising machine learning method. rough experimental comparisons, Gholami et al. found that the SVR method has faster speed and higher accuracy in predicting reservoir permeability [30].

Optimized Design.
After fracturing tight sandstone reservoirs, the physical properties of the reservoirs are characterized by extremely low porosity, a wide range of permeability changes, and complex pore-permeability relationships. erefore, conventional production prediction models often fail to meet the requirements in terms of prediction accuracy.
Effective algorithms for complex nonlinear problems are essentially optimization problems. e so-called optimization refers to the problem of seeking the maximum or minimum value of the given objective function according to the change of design variables under the condition of 2 Scientific Programming meeting some certain constraints. It can be described by the following equation: where x ∈ S and S is the design parameter space that meets the limiting conditions, called the solution space.
. . , are the equality constraints, and h j (x) ≥ 0 or h j (x) ≤ 0 denotes the inequality constraints.
Taking MFHW as the studied object, the PSO-RBF neural network was used to predict permeability and fracture halflength. e optimization objective function is the minimum RMSE (root mean square error) value of permeability and half-length of fracture. e input variables of the network are the formation pressure, the number of fractures, stratum thickness, the well storage constant, the well storage skin, and so on, and the output variables are the RMSE values.

Data Set.
e data set describes the characteristics and behavior of the reservoir's input and output parameters and is the training data set for the reservoir model. It is obtained using static and dynamic data such as porosity, permeability, pressure, and reservoir production values. For a given source unit, according to the line source superposition principle, the pressure distribution at any point (x D , y D , and z D ) in the formation space shall be (2) e coefficient matrix is expressed as follows: As for the definitions of various symbols appearing in equations (2) and (3), the reader can refer to our previous paper [31]. Note that, the formation pressure data of MFHW are obtained by the GPU parallel calculation method proposed in the reference [31]. All training data sets are divided into two parts before the PSO-RBF training begins. One is the input data set, and the other is the output data set. e input and output data sets are normalized within a specific range. Before the training begins, a standard normalization function is used to limit the range of the input and output data sets between −1 and 1, and the mathematical function is given in the following equation: During PSO-RBF training, the training data set is divided into three parts: training, validation, and testing. Training data are used in the training, and validation data are also used during training. However, it should be mentioned that validation data are used to check the network learning instead of training the network.

PSO-RBF Model
e advantage of ANNs over other conventional techniques is the ability to perform complex and highly nonlinear tasks accurately and swiftly. In most previous works related to reservoir models, the researchers used the BPNN to construct reservoir models. However, the BPNN has a problem of falling into local minimum during training time. In most cases, the network does not reach the global minimum to find the minimum error value. e global optimization ability of the PSO algorithm makes the radial basis neural network model based on the PSO algorithm have no local minimum problem.

PSO Algorithm.
Inspired by the movement of the birds, the PSO algorithm was developed by Kennedy [32]. In this approach, every possible solution is considered as a particle. Each particle is characterized by its position and velocity. e position of the particle is defined in the hyperspace, and its dimension is equal to the number of nonoptimized parameters. Several particles are initially defined in hyperspace, which iteratively change their positions to determine the best position. e fitness of a particle is determined by a fitness function such as RMSE. is algorithm is similar to how birds search for food in a wide area.
During the iterative execution of the algorithm, the values of p best and g best are constantly updated. p best is defined as the optimal position of the particle in the hyperspace, determined by the fitness value. g best is the overall best position for all particles. In each iteration step, the speed is updated first and then the location is updated. e particles are accelerated to p best and g best by updating the speed: where v i k+1 is the speed of the next iteration, w i is the inertia weight, v i k is the current speed, r 1 and r 2 are random numbers, and p i k is the current position of the particle. Update the position of the particle using the following equation: e initial position and velocity of each particle are randomly distributed. After initializing the position and velocity of all particles, the fitness is calculated. In the subsequent steps, the position and velocity are iteratively Scientific Programming 3 updated by the local best parameters and the global best parameters, as shown in Figure 1. e entire flowchart can be divided into four parts, namely initialization, fitness calculation, status check, and updating of speed and position.

Radial Basis Function Neural Network.
RBFNN has a small number of hidden layer neurons and are used to develop networks with good generalization capabilities [33]. RBFNN is considered to be a special type of artificial neural network because its architecture requires only a hidden layer, which allows the input space to be represented in new spaces of different hidden layer neurons. e structure is shown in Figure 2. In the training process of RBFNN, it appears as a linear model because all hidden neuron centers and calculations are fixed. e RBFNN hidden layer neurons perform a nonlinear transformation and map all inputs into the new input space. e output layer is considered as a linear converter and is applied to the new input space. e performance of RBFNN can be determined by adjusting the center (width) of the hidden layer neurons, and there is no specific formula to choose the width of the radial basis function [34]. RBFNN has been widely used in system prediction, pattern recognition, speech recognition, and adaptive control. It has also been used to solve the problems of oil and gas fields, e.g., oil and gas ratios of reservoirs, electromagnetics, resistivity, log data inversion, log data prediction, seismic properties, and nonlinear relationships between reservoir properties and seismic properties [35][36][37]. e growth and overall structure of RBFNN is affected by the RBF. e RBFNN input is directly connected to each of the basic functions and produces an output. at is, where x represents the input data of the network, u is the center of the radial basis function, and σ is the width of the RBF (σ > 0). First, the hidden layer neurons are calculated based on the radius of the radial basis function and then transmitted to the output layer. Here, the sum of the  products between the hidden layer neurons and the weight vectors is calculated to obtain the final network output y n ; that is,

PSO-RBF Neural Network
Method. e prediction accuracy of the RBFNN mainly depends on the central vector u of the radial basis kernel function, the radius σ of the radial basis, and the connection weight w i between the output layer and the hidden layer. e traditional RBF neural network uses local information based on parameter space to set parameters, which results in the values of u, σ, and w i being local optimal solutions rather than global optimal solutions. In view of these defects in the RBFNN, this work employs the PSO algorithm to optimize the traditional RBFNN when identifying MFHW parameters. e RBFNN parameters optimized by the PSO algorithm are global optimal parameters, thus avoiding the problem of low reliability of RBFNN learning. e specific flowchart of the PSO-RBF algorithm is shown in Figure 3.
PSO optimization RBFNN parameters are divided into two steps: the first step is to determine the center value and width of the basis function, and the second step is to determine the connection weight between the hidden layer and the input layer. In the optimization process, the data obtained by GPU parallel computing are used to train and verify the network. e algorithm flow of the first step is as follows. (1) Collection of reservoir model data samples; (2) cluster analysis of samples to generate center u and width σ of basis functions; (3) initialization of the particle swarm algorithm using u and σ; (4) calculation of each particle root mean square error (RMSE); (5) updating local optimal solution and global optimal solution; (6) updating particle position and velocity; (7) repeating steps (4-6) until the accuracy requirement or number of iterations is reached; and (8) obtaining the center u and width σ of the basis function.
e algorithm flow of the second step is as follows. (1) Calculation of the output of the hidden layer; (2) initialization of the weight w i and reinitialization of the particle group; (3) calculating the cumulative error of each particle; (4) updating the local optimal solution and the global optimal solution; (5) adjusting the position and velocity of the particles; (6) repeating steps (3)(4)(5); and (7) obtaining the parameter w i of the RBF neural network.

Computation.
e bottomhole flow pressure is analyzed and calculated by using the measured data of multistage fracturing horizontal wells in an oilfield in western China. e three-dimensional PEBI grid of fracturing of underground horizontal wells is shown in Figure 4. e reservoir stratum is homogeneous, the fluid flow satisfies Darcy's law, the horizontal and vertical permeability of the fracture are different, and the horizontal well is fractured in a closed rectangular reservoir. Using the GPU-based MFHW bottomhole pressure calculation method proposed in our previous work [31], the bottomhole flow pressure of the horizontal well is calculated, and the data set is obtained.

Training Model.
e various parameter settings in the particle swarm algorithm are described in detail in the sensitivity study section. e RBFNN consists of 5 input nodes and 1 output node. e PSO optimization steps presented in the previous section are used to optimize the training of hidden layer neurons 4, 8, 12, 16, 20, 24, and 28, respectively. e test results are shown in Figure 5. As can be seen from the figure, when the number of hidden layer neurons is 16, the error is the lowest. erefore, an RBN network structure of 5-16-1 is obtained.

Prediction.
After obtaining the RBF neural network parameters through the PSO algorithm, the network needs to be tested. To this end, the remaining data are imported into the optimized RBF neural network to obtain the predicted values of the bottomhole permeability and the fracture length of MFHW.
In order to further detect the performance of the network, the PSO-RBF network structure proposed in the paper is compared with the PSO-BPNN and the SVR algorithm. e result is shown in Figure 6. e permeability prediction results and errors of the three algorithms are shown in Table 1. As can be obtained from Table 1, the RMSE of the PSO-BPNN is 0.332, the RMSE of the SVR algorithm is 0.308, and the RMSE of the PSO-RBF is 0.178. e fracture length is predicted by three algorithms, and the result is shown in Figure 7. e fracture length prediction results and errors of the three algorithms are shown in Table 2. As can be obtained from Table 2, the RMSE of the PSO-BPNN is 3.776, the RMSE of the SVR algorithm is 3.319, and the RMSE of the PSO-RBF is 2.250. It can be seen from the comparison results that the RMSE of the PSO-RBF algorithm is much lower than that of the other two algorithms, showing that the algorithm has higher prediction accuracy and better performance.

Sensitivity Study
In the particle swarm optimization algorithm, the population number, particle speed, inertia weight, learning factor, and random number all have certain effects on the performance of the algorithm. According to the studies at home and abroad, the improvement of the PSO algorithm mainly focuses on the inertia weights and learning factors [38,39]. e inertia weight plays a major role in the convergence of the particle swarm algorithm. e larger the value of w i , the stronger the global search ability and, conversely, the stronger the local search capability. c 1 and c 2 are the maximum step sizes of the particles to adjust to the individual optimal or group optimal direction,      1  234  238  236  232  2  378  369  382  376  3  286  293  288  289  4  306  304  302  304  5  276  280  272  279  6  233  236  235  230  7  257  254  261  253  8  268  267  271  269  9  254  252  251  252  10  167  169  169  166  11  149  151  147  148  12  241  239  237  243  13  239  241  242  241  14  248  250  251  246  15  305  307  301  303 respectively. When the learning factor is small, the particles may linger away from the target area, while the particles can quickly move toward the target area or even exceed the target area when the learning factor is large.

Fracture number
where ω max is the maximum value of inertia weight, ω min is the minimum value of inertia weight, i is the current number of iterations, and i max is the maximum number of iterations. e calculation formula of the learning factor is shown in the following equation: where c 1,start and c 1,end are the initial and final values of the learning factor c 1 ; c 2,start and c 2,end are the initial and final values of the learning factor c 2 ; i is the current number of iterations; and i max is the maximum number of iterations. In order to illustrate the effect of parameter settings of inertial weight and learning factor on the prediction results of the PSO-RBF model, a classic particle swarm algorithm with fixed parameter values and an improved particle swarm algorithm with parameter value changing were used to predict the permeability and the half-length of the fracture, respectively. e basic parameters of the two algorithms are shown in Table 3. e permeability prediction data and fracture length prediction data of the two algorithms are shown in Tables 4 and 5, respectively. e prediction results of the two algorithms are shown in Figures 8-11, respectively. From Table 4, it can be concluded that when making permeability predictions, the RMSE of the classic algorithm is 0.294 and the RMSE of the improved algorithm is 0.178. From Table 5, it can be concluded that when predicting the  Scientific Programming fracture length, the RMSE of the classic algorithm is 3.823 and the RMSE of the improved algorithm is 2.25. erefore, the improved particle swarm algorithm is applied to the neural network training process in this paper.

Conclusions
In this study, a neural network model of PSO-RBN was proposed to predict the permeability and fracture length in a MFHW in western China. A comparison of the performance of the PSO-RBN algorithm and core permeability measurements shows that the presented model can adequately estimate reservoir permeability and fracture length despite the highly nonlinear relationship between reservoir parameters. In addition, the PSO-RBN algorithm and other algorithms are statistically compared in the prediction of permeability and fracture length. e results depict that the presented model has some advantages over the mentioned algorithms. erefore, the proposed PSO-RBN model can provide more accurate and efficient predictions to reservoir physical parameters.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of the article.