Optimization of BP Neural Network Model Based on Improved Sine-Cosine Algorithm

Abstract

Reservoir rock porosity is usually determined by core analysis, but the cost of this method is huge, in order to establish a more accurate and stable reservoir porosity prediction model. Using the logging data of the existing work area, we optimize the neural network using the improved sine-cosine algorithm, add nonlinear weights to the position change of the sine-cosine algorithm (SCA) to correct the individual position and improve the convergence accuracy of the algorithm, incorporate the Levy flight to improve the SCA algorithm to strengthen the local search ability, and optimize the parameters of the BP neural network using the improved sine-cosine algorithm to construct the IISCA-BP reservoir pore size prediction model. Porosity prediction model. The results of the IISCA-BP model are compared with the evaluation results of the BP model, and the model is applied to test the X oilfield in Changling Depression. The results show that the absolute relative error of the IISCA-BP model is 1.996%, and the average absolute relative error is only 0.324%, which is more accurate and more stable than the BP model. The IISCA-BP model is well applied in the field, and the results of the scheme have higher consistency with the core data, so that the scheme of this paper has practicability, validity, and generalizability.

Share and Cite:

Tan, S.J. and Wang, Y.M. (2024) Optimization of BP Neural Network Model Based on Improved Sine-Cosine Algorithm. Open Access Library Journal, 11, 1-9. doi: 10.4236/oalib.1112528.

1. Introduction

The physical properties of tight sandstone reservoirs are extremely complex, but there are also hydrocarbons in them, which are called tight sandstone hydrocarbons. The microscopic pore structure in tight sandstone is very complex, and it is not feasible to predict it only by applying conventional methods. The pore distribution, throat size, pore-throat connectivity and seepage capacity of the reservoir are all crucial factors affecting the gathering of oil and gas in the reservoir, and it is no longer suitable for this kind of reservoir by searching for the trap in an ordinary way. Therefore, for tight sandstone reservoirs, we can not just look for traps as usual and then look for oil and gas and favorable area prediction; first of all, we have to carry out a series of studies on the characteristics of microscopic pore structure, and the reservoir is one of the key elements of unconventional tight sandstone oil and gas research, to make it clear that the reservoir is rich in oil and gas reservoir mechanism, and ultimately look for the “sweet spot” and rich section [1]-[3]. We will clarify the mechanism of reservoir-rich oil and gas formation and finally find the “sweet spot zone” and enriched section.

Porosity is the most important petrophysical parameter and determining it accurately, quickly and cost-effectively is very important in the petroleum industry. Due to the extent of the field and the number of wells, the core analysis method is too costly and time-consuming, in addition, determining the parameter is inappropriate due to the wasted costs and production interruptions associated with this method. With the advent of Artificial Intelligence (AI) in the petroleum industry, it is increasingly used in exploration, development, production, reservoir engineering and management planning to speed up decision making and reduce cost and time. Supervised machine learning has been widely used in establishing relationships between complex nonlinear datasets. This type of machine learning algorithm shows superiority over petroleum engineering regression techniques in terms of prediction error, computational power and storage capacity for high-dimensional data. Therefore, the application of advanced software such as geologic logging and error neural networks is the best way to reduce cost, improve accuracy, and shorten time.

BP neural networks are an emerging technique for logging evaluation that has been applied to many aspects of logging evaluation [1]. This technique has been shown to have several advantages over traditional statistical techniques. Most of the applications of artificial neural networks in this field are based on artificial neural networks with backpropagation of errors. BP neural networks are one of the newest, most accurate, and least costly methods for determining porosity in the shortest possible time using petrophysical logging data. These networks mimic biological neural networks and are powerful in training, testing and tuning the inputs and desired outputs.

The data-driven modeling method of common BP neural network is used for reservoir porosity prediction research [2] [3], based on the data-driven BP neural network prediction model is widely used [1], but there are problems such as slow convergence speed, easy to fall into the local optimum, and sensitive to the initial weights and thresholds, etc. The improved sine-cosine algorithm can be used to optimize the BP neural network prediction model to predict the reservoir porosity. Non-linear weights are added to the position change of the sine-cosine algorithm to correct the individual position, and the Levy flight algorithm is used to strengthen the local search ability and improve the convergence accuracy of the algorithm to avoid premature convergence. The ISCA algorithm is used to optimize the BP neural network and establish the IISCA-BP reservoir porosity prediction model.

In this paper, the natural gamma number, porosity, logging sound wave and other parameters in the logging data are utilized to predict the reservoir porosity using the establishment of IISCA-BP model. The study is carried out for X oilfield in Changling depression, 70% of the experimental dataset is used for training, 15% for validation, and 15% for testing, and the model is tested. Comparison and analysis with BP model simulation results are performed [4]-[6].

2. Modeling

2.1. Target Layer Situation

X oilfield is located in Qian’an County, Jilin Province, with ground elevation ranging from 130 m to 160 m, flat terrain and convenient transportation. The regional tectonic position is located in Changling Depression, the central depression area in the south of Songliao Basin.

The main oil layer developed in this area is the Fuyu oil layer of Quan Si section, and the overall tectonic appearance of the top surface of Quan Si section is the combined tectonic background of Qian’an nasal tectonics and slope tectonics, forming a tectonic pattern of basement and rift valley, and the oil-bearing nature of reservoirs is mainly controlled by the lithology and physical properties, which has formed a wide range of fault-lithological and lithologic oil reservoirs (Figure 1).

Figure 1. X oil field location map.

2.2. Analysis of Experimental Data

Rock samples from the area were selected for porosity measurement and analysis. Figure 2 shows the statistical histogram of porosity, indicating that the porosity of the work area ranges from 0.8% to 11.6%, with an average value of 7.63% (Figure 2). The superiority and universality of the dataset determine the reliability and accuracy of the model. In order to improve the credibility and applicability of the model, the logging data of the X oilfield was established, which contains an extensive sample database of more than 860 experimental data points involving natural gamma number, rock density, logging acoustic waves, and other raw data from the logging. The experimental data from the extensive database were utilized as input variables into the IISCA-BP model [7], and 70% of the experimental dataset was used for training, 15% for validation, and 15% for testing.

Figure 2. Porosity distribution.

2.3. BP Neural Network Model

BP (Back Propagation) neural network is a kind of neural network trained according to the algorithm backward error transfer. Given the training set, which is a vector composed of raw data from wells such as natural gamma number, rock density, logging sound wave, etc [8]…, and the reservoir porosity, the whole model contains an input layer (a vector set composed of raw data from wells such as natural gamma number, rock density, logging sound wave, etc.), a hidden layer, and an output layer (reservoir porosity) [9].

The raw data from logging, reservoir porosity data are organized, and the study sets the output of the neural network as the reservoir porosity, i.e.,

y ^ j k =f( β j θ j ) (1)

The input layer has the raw data from well logging added up to a total of a term, i.e., the output layer is only the reservoir porosity term [10] [11].

Improved sine-cosine algorithm:

1) Standard sine-cosine algorithm

The SCA algorithm is an optimization algorithm based on the sine cosine model proposed by Seyedali and Mirjalili in 2015, which starts with a set of random solutions and improves the accuracy of the algorithm by continuously developing it under the objective function with the position update formula:

X ij t+1 ={ X ij t + r 1 sin r 2 | r 3 P gj t X ij t |( r 4 <0.5 ) X ij t + r 1 cos r 2 | r 3 P gj t X ij t |( r 4 0.5 ) (2)

where: is the ith particle in the tth iteration in j-dimension; is the global optimum; r2 ranges from 0 to 2π; r3 ranges from −2 to 2; r4 ranges from −1 to 1; r1 is a linearly decreasing function, a is 2, t is the number of current iterations, and T is the maximum number of iterations.

2) Adding non-linear weights

Adding nonlinear weights to improve the SCA algorithm, larger weights can improve the global exploration ability of the algorithm, smaller weights can improve the algorithm’s ability to find the optimal near the target value, improve the convergence accuracy of the algorithm, and better balance between the algorithm’s a global exploration and local development ability [12]. The nonlinear weights ω are:

ω= ω max ( ω max ω min ) e 1 t T (3)

where: ωmax is the maximum value of weights; ωmin is the minimum value of weights. Let ωmax be 0.7, ωmin be 0.0003, and improve Equation (4) as follows:

X ij t+1 ={ ω X ij t + r 1 sin r 2 | r 3 P gj t X ij t |( r 4 <0.5 ) ω X ij t + r 1 cos r 2 | r 3 P gj t X ij t |( r 4 0.5 ) (4)

3) Levy Flight Improvement SCA Algorithm

Levy flight is a random step method that performs isotropic random directions to get an optimal direction by randomly wandering, enriching the diversity of the population, strengthening the algorithm’s ability to jump out of local minima, and preventing premature convergence. Its calculation formula is:

Levy( λ ): | s | λ ( 1<λ<3 ) (5)

where: λ is the exponential parameter; s is the randomization step.

s= μ | v | 1 β where β is 1.5 and the parameters μ, ν conform to normally distributed random numbers N(0,), N(0,) respectively.

The parameter variance is:

{ σ μ = { Γ( 1+β )( sinπ×β/2 ) Γ[ ( 1+β )/2 ]× 2 ( β1 )/2 β } 1 β σ ν =1 (6)

where: Γ is the Gamma function.

The position update equation is improved as:

X ij t+1 = X ij t +αLevy( λ ) (7)

where: α is usually taken as 1.

ISCA-BP modeling [13]:

Improved Sine Cosine Algorithm (ISCA) is used to optimize the initial state weights and thresholds of the neural network to construct the prediction model of reservoir porosity. The spatial dimension D is:

D=nm+ml+m+l (8)

The value of the SCA algorithm’s initial moment adaptation is determined by Equation (9). The optimal solution is when the function value satisfies the set value [14] [15].

Fitness= 1 Z s=1 Z ( y s y s ) 2 (9)

where: Fitness is the fitness function value; Z is the number of training samples; y s is the output value; y s is the actual output value.

Using the improved position update Equation (7), the positions of the particles are updated. The optimal weights and thresholds are substituted into the BP neural network to obtain the reservoir porosity prediction model.

3. Model Validation

The input variables of IISCA-BP model are natural gamma number, rock density, raw data of logging sonic logging, and the output variable is reservoir porosity, and the parameters of the I ISCA algorithm are set: the population size is 60, the dimensionality is 276, the number of nodes in the input layer is 4, the number of nodes in the output layer is 1, and the number of nodes in the implied layer is 11. In this case, the selection of the implied layer is obtained by comparing the training error of the training samples under different implied layers [16]. In order to determine the number of hidden layer nodes, the mean square error (MSE) of the prediction results and the coefficient of determination (R2) are used as the evaluation indexes, and the smaller the value of MSE and the larger the value of R2 are, which indicates that the prediction results are more accurate. The MSE and R2 are counted for the case of 4 - 14 nodes, respectively [17], and the formulas for MSE and R2 are shown below:

{ MSE= 1 m i=1 m ( y i y ¯ l ) R 2 = i=1 m ( y ^ l y ¯ ) 2 i=1 m ( y i y ¯ ) 2 (10)

Ten repetitive runs were performed with the number of nodes in each node determined and the results are shown in Figure 3. The experimental results show that the training error is minimized when the number of nodes in the hidden layer is 11, so the number of nodes in the hidden layer is taken as 11.

The performance of the IISCA-BP model for the three processes in addition to all measured data is given in Figure 4. These results show that the measured and predicted reservoir porosity values are in good agreement and confirm the high capability of the developed IISCA-BP model for reservoir porosity prediction. In order to facilitate the comparison between the BP model and the IISCA-BP model, ARD (Absolute Relative Error) and AARD (Average Absolute Relative Error) are introduced in this paper to analyze the error and evaluate the performance of each model. The model prediction errors are shown in Figure 5. From the errors of the prediction models of reservoir porosity in Figure 5, it can be seen that the IISCA-BP model has the highest prediction accuracy, with an absolute relative error of 1.996% and an average absolute relative error of 0.324%. And the model-programmed calculation is simpler and faster can be promoted.

Figure 3. Performance of ISCA algorithm with different number of nodes.

Figure 4. Performance of ISCA-BP reservoir porosity prediction model.

Figure 5. Error comparison of reservoir porosity prediction models.

4. Conclusions

1) Optimization of BP model for reservoir porosity prediction based on IISCA algorithm. The results show that the IISCA algorithm is an algorithm with stronger optimization performance. On this basis, a reservoir porosity model based on IISCA-BP was established.

2) By comparing the simulation results with the BP model, the absolute relative error of the model is 1.996%, and the average absolute relative error is only 0.324%, which is the smallest error. The simulated porosity of the IISCA-BP reservoir porosity prediction model has a higher degree of agreement with the porosity of the core. The IISCA-BP model has a stronger generalization ability and higher prediction accuracy.

Conflicts of Interest

The authors declare no conflicts of interest.

Conflicts of Interest

The authors declare no conflicts of interest.

References

[1] Guo, W. (2014) Characterization of Shale Reservoirs and Seepage Mechanism. Master’s Thesis, Chinese Academy of Sciences.
[2] Ding, W., Xu, C., Jiu, K., et al. (2011) Progress of Mud Shale Fracture Research. Advances in Earth Science, 26, 135-144.
[3] An, P., Cao, D., Zhao, B., et al. (2019) Research on the Prediction Method of Reservoir Physical Property Parameters Based on LSTM Recurrent Neural Network. Advances in Geophysics, 34, 1849-1858.
[4] Alatefi, S., Abdel Azim, R., Alkouh, A. and Hamada, G. (2023) Integration of Multiple Bayesian Optimized Machine Learning Techniques and Conventional Well Logs for Accurate Prediction of Porosity in Carbonate Reservoirs. Processes, 11, Article 1339.
https://doi.org/10.3390/pr11051339
[5] Li, E., Liu, Y. and Wu, F. (2022) Natural Gas Hydrate Prediction Model Based on ISCA-BP Algorithm. Chemical Engineering, 50, 62-67.
[6] Ouadfeul, S. and Aliouane, L. (2016) Total Organic Carbon Estimation in Shale-Gas Reservoirs Using Seismic Genetic Inversion with an Example from the Barnett Shale. The Leading Edge, 35, 790-794.
https://doi.org/10.1190/tle35090790.1
[7] Yang, L.Q., Za, B. and Chen, W. (2020) Prediction Method of Reservoir Porosity Based on Deep Neural Network. China Sciencepaper, 15, 73-80.
[8] Fu, C., Lin, N., Zhang, D., et al. (2018) A Case of Oil and Gas Reservoir Distribution Prediction by Multi-Wave Seismic Deep Learning. Journal of Geophysics, 61, 293-303.
[9] Gupta, I., Samandarli, O., Burks, A., Jayaram, V., McMaster, D., Niederhut, D., et al. (2021) Autoregressive and Machine Learning Driven Production Forecasting—Midland Basin Case Study. Proceedings of the 9th Unconventional Resources Technology Conference, Houston, 26-28 July 2021, 3104-3117.
https://doi.org/10.15530/urtec-2021-5184
[10] Hamidi, H. and Rafati, R. (2012) Prediction of Oil Reservoir Porosity Based on BP-ANN. 2012 International Conference on Innovation Management and Technology Research, Malacca, 21-22 May 2012, 241-246.
https://doi.org/10.1109/icimtr.2012.6236396
[11] Zhang J.Y., Wei, L.W., Han, W.X. et al. (2004) Recognition of Hydrogeological Parameters Based on RBF Neural Network. China Engineering Science, 6, 74-78.
[12] Ehrenberg, S.N., Nadeau, P.H. and Steen, Ø. (2009) Petroleum Reservoir Porosity versus Depth: Influence of Geological Age. AAPG Bulletin, 93, 1281-1296.
https://doi.org/10.1306/06120908163
[13] Niegel, S. and Franz, M. (2023) Depositional and Diagenetic Controls on Porosity Evolution in Sandstone Reservoirs of the Stuttgart Formation (North German Basin). Marine and Petroleum Geology, 151, Article 106157.
https://doi.org/10.1016/j.marpetgeo.2023.106157
[14] Chen, W., Yang, L., Zha, B., Zhang, M. and Chen, Y. (2020) Deep Learning Reservoir Porosity Prediction Based on Multilayer Long Short-Term Memory Network. GEOPHYSICS, 85, WA213-WA225.
https://doi.org/10.1190/geo2019-0261.1
[15] Li, E., Liu, Y., Zeng, X., et al. (2022) A New Gas Hydrate Prediction Model for Acidic and Inhibitor-Containing Systems. Chemistry and Technology of Fuels and Oils, Volume, 1-12.
[16] Cheng, C., Cheng, X., Dai, N., Jiang, X., Sun, Y. and Li, W. (2015) Prediction of Facial Deformation after Complete Denture Prosthesis Using BP Neural Network. Computers in Biology and Medicine, 66, 103-112.
https://doi.org/10.1016/j.compbiomed.2015.08.018
[17] Mirjalili, S. (2016) SCA: A Sine Cosine Algorithm for Solving Optimization Problems. Knowledge-Based Systems, 96, 120-133.
https://doi.org/10.1016/j.knosys.2015.12.022

Copyright © 2025 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.