Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 5, No. 2, 2023 1 Research on Production Prediction and Control of Mechanized Production Wells based on Neural Networks Tongzhuang Li, Hongyu Li School of Electrical Engineering and Information, Northeast Petroleum University, Daqing 163319, China Abstract: In order to improve the overall operational efficiency of the mechanical production well group, save production costs, and accurately regulate the liquid production of the oil production well in the future, this paper proposes a neural network- based prediction and control model for mechanical production wells. This model includes two parts: prediction and regulation. Firstly, based on LSTM neural network, the oil and liquid production of single wells and well groups are predicted, and the oil and liquid production trends of single wells are obtained; Secondly, predict the water content within the next year based on the trend of oil and liquid production changes, and quantitatively analyze the controlled amount based on BP neural network combined with water content. Taking a certain well group in Daqing Oilfield as an example, simulation and on-site experiments were conducted. While the liquid production remained basically unchanged, the oil production increased by 5.7%, and with the same oil production, the energy consumption decreased by 6.67%. Keywords: Production Forecast; Control of Mechanical Mining Wells; LSTM; BP Neural Network. 1. Introduction The system efficiency of mechanically produced wells reflects the level of energy conservation and consumption reduction in the oilfield production process, indirectly reflecting the technical and management capabilities of an oilfield enterprise, and is an important indicator for evaluating the oilfield production capacity [1]. However, there are many influencing factors that can affect the operation of mechanized mining wells, and the relationships between them are complex and often cannot be described by a specific formula. Currently, some scholars have applied machine learning algorithms to oilfield production prediction, and neural network algorithms have been widely used in prediction problems such as drilling rate prediction, production prediction, and reservoir prediction [2]. Among them, yield prediction can provide reference for future production capacity plans and is of great significance. Production capacity prediction field, Literature [3] Comparing the improved BP neural network model with the Weng cycle model, the superiority of the BP neural network prediction model was verified based on the annual production data of the Romashkino Field; Literature [4] A genetic algorithm based gated GRU network model is proposed to address the problem of slow convergence speed and easy falling into local optima in BP neural networks. The model has fast convergence speed and high prediction accuracy; Literature [5] A novel yield prediction model is proposed by combining convolutional neural networks with long and short-term memory neural networks through indicator diagrams; Literature [6] Based on long and short-term memory neural networks, a data-driven oil reservoir production prediction model is established, which continuously predicts the trend of oil field production changes and better meets the actual needs of the mining field, providing important data support for oil reservoir development. In terms of liquid production regulation, Literature [7] Based on numerical simulation research and taking into account factors such as reservoir thickness, water injection volume, channel width, and injection production well spacing, a planar equilibrium displacement adjustment model is constructed. Field experiments have shown that optimizing the liquid production rate of production wells based on this model can increase the recovery rate of well groups by 1.5%, which is of great significance for reservoir development; Literature [8] We have developed a liquid production control technology for oil production wells based on layered oil recovery, which achieves layered liquid production control by adjusting the opening of production valves at all levels. We have conducted experiments on 43 wells to improve the water drive recovery rate of Daqing Oilfield. In order to improve oil field recovery efficiency, liquid production control technologies have emerged endlessly, but many mathematicians only consider the coordination of oil wells connecting to water wells within the well group, and rarely consider the coordination between various well groups within the block. There is a gap in the research on well group coordination in China. Based on the above content, in order to further improve the overall operational efficiency of mechanical production well blocks, this article proposes a neural network-based prediction and control model for mechanical production wells. It combines two technologies of liquid production prediction and liquid production control, and takes the block as a whole for liquid production control, accurately controlling the liquid production volume of the oil production well in the near future. Based on LSTM neural network, predict the oil and liquid production of single wells and well groups, obtain the trend of oil and liquid production of single wells, and then predict the water content in the next year based on the trend of oil production industry changes. Based on BP neural network combined with water content, conduct quantitative analysis on the controlled amount. A field experiment was conducted in a certain well group in Daqing Oilfield. After ten days of testing, the oil production increased by 5.7% while 2 the liquid production remained basically unchanged. With the same oil production, the energy consumption decreased by 6.67%. 2. Production Forecast 2.1. LSTM Neural network The structure of LSTM neural networks is similar to traditional neural networks, with one input layer, one or more hidden layers, and one output layer. The hidden layer of LSTM neural network contains many neurons called storage units, and each such storage unit has three gates, which are used to maintain and adjust the state of the storage unit st, these three "gates" are respectively called the Forgetting Gate ft, Input Gate it and Output gate ot, The structure of its storage unit is shown in Figure 1. 2.2. Cubic Spline Function This article aims to address the issues of limited oil production data and the inability to accurately establish production capacity prediction models. The cubic spline interpolation method is used to expand the data volume. Considering the non-convergence and instability of higher- order interpolation, as well as the insufficient smoothness of the quadratic interpolation fitting function, the cubic spline interpolation method was chosen to interpolate the oil production data. Perform cubic spline interpolation on the monthly oil production data of the block from 2011 to 2022 to obtain the daily oil production data of a single well. Taking the total oil production of the block as an example, Figure 2 shows the daily oil production interpolation chart. By expanding sparse data, the data volume has been enriched, providing data support for establishing accurate production capacity prediction models in the later stage. Figure 1. Structure of Long Short Term Memory Neural Network Figure 2. Cubic spline interpolation results of monthly oil production data in the block 2.3. Forecast Results The prediction model in this article consists of 10 layers of LSTM network, with 64 neurons in the hidden layer, 1 neuron in the output layer, and a time step of 365, The model is built in Python's Tensor Flow environment, the training set contains 1000 pieces of data, while the test set contains 10 pieces of data with a data dimension of 365. The evaluation indicators for prediction results are root mean square error, average absolute percentage error, and prediction accuracy, as shown in equations (1) - (3). 2 RMSE act pre 1 1 ( ( ) ( )) m i M y i y i m    (1) act pre MAPE 1 act ( ) ( )1 ( ) m i y i y i M m y i    (2) act pre FA 1 act ( ) ( )1 1 100% ( ) m i y i y i M m y i            (3) Wherein, yact is the true value, ypre is predicted value, m is the sample size of the predicted results. Train and test the historical data of oil and liquid production from January 2011 to April 2022. The ratio of the training data to the test data is 14:1, and the test results are shown in Tables 1 and 2, The table only shows the prediction results of 10 single wells, and the prediction accuracy of oil and liquid production in oil wells can generally reach over 95%. Due to the large time span of prediction in this article, the test results are relatively ideal. Table 1. LSTM Liquid production prediction indicators Well 1 Well 2 Well 3 Well 4 Well 5 Well 6 Well 7 Well 8 Well 9 Well 10 RMSE 0.61 0.28 0.30 0.84 0.23 0.33 0.79 0.66 0.61 0.25 MAPE 0.03 0.05 0.03 0.07 0.01 0.05 0.04 0.05 0.02 0.01 FA 97.35 95.16 96.54 93.05 98.76 94.75 95.91 95.33 97.76 98.70 Table 2. LSTM Oil production prediction indicators Well 1 Well 2 Well 3 Well 4 Well 5 Well 6 Well 7 Well 8 Well 9 Well 10 RMSE 0.04 0.01 0.01 0.04 0.03 0.15 0.03 0.04 0.11 0.04 MAPE 0.03 0.02 0.04 0.11 0.07 0.09 0.04 0.04 0.04 0.07 FA 97.32 98.20 96.09 89.34 93.20 91.26 96.47 96.13 95.74 92.65 Using all known data as the training set, predict the oil and liquid production from May 2022 to April 2023. Add up the daily production of this month to obtain the monthly production of that month. Taking the liquid production of a single well as an example, Figure 3 shows the daily liquid production, and Figure 4 shows the monthly liquid production, providing a basis for further regulation. 3 Figure 3. The prediction results of Daily fluid Figure 4. The prediction results of Month fluid 3. Liquid Production Regulation 3.1. Overall Regulation Model The entire target block is regarded as a system, with achieving the target liquid production as the prerequisite, the minimum average water content of the block as the training goal, and the oil production of the entire area as the constraint condition. The geological parameters and operating data of the pumping well are analyzed as input features, and deep learning algorithms are used for training. The optimal results of each single well in the trained block correspond to the liquid production of the single well as the ultimate control parameter. Among them, seven geological parameters that are highly correlated with liquid production are selected, including the thickness of perforated sandstone, effective thickness of perforated sandstone, formation coefficient, thickness of perforated sandstone for water wells, effective thickness of perforated sandstone for connected water wells, thickness of sandstone for oil water wells, and effective thickness of connected oil water wells. This section changes the input mode of the LSTM algorithm to fix a certain time (May 2022), without considering temporal continuity. The model inputs the geological parameters corresponding to a single well, and outputs the monthly oil production of that well. Figure 5. Regulatory training results By re inputting geological parameters into the control model, the training results considering the connections between individual wells within the block are obtained. The training results for May 2022 are only shown in Figure 5, but this result cannot be directly used as a control quantity and further judgment and analysis correction are needed. 3.2. Adjustment of Block Liquid Production Distribution The predicted liquid and oil production from Section 2.3 can obtain the water content of a single well, and then calculate the water content of the block. Define the direction of liquid production control, mark that the water content of a single well exceeds the average water content of the block, and lower the liquid production; The water content of a single well is lower than the average water content of the block, resulting in an increase in liquid production. Secondly, in order to balance the water content and geological parameters of a single well, the control result is taken as the control quantity, which is an effective control quantity; If the regulation results are positive or negative and opposite to the marker, the average value of effective regulation in the direction of the marker will be used as the regulation amount for a single well. After determining the specific regulatory amount, the data still needs to be adjusted for negative numbers and overall liquid production. The data processing process is shown in Table 3. The predicted value is added to the final variable to obtain the intermediate control value. The negative value of the intermediate control value is replaced with 0, and then scaled proportionally to the predicted monthly oil production value of the block to obtain the final control value. Table 3. Processing of Liquid Production Control Data Well No Predictive value Regulatory value Regulatory direction Final change amount Intermediate regulation value (sum) Intermediate regulation value (de negative) Final control value (scaling) Well 11 814.08 276.46 Downregulation -537.62 276.46 276.46 327.79 Well 12 306.39 353.95 Downregulation -320.55 -14.16 0.00 0.00 Well 13 248.68 502.45 Downregulation -320.55 -71.86 0.00 0.00 Well 14 1019.61 1083.84 Incoherent 0.00 1019.61 1019.61 1208.94 Well 15 357.92 310.81 Downregulation -47.11 310.81 310.81 368.53 Well 16 1099.60 980.26 Up-regulation 171.13 1270.72 1270.72 1506.68 Well 17 1453.75 316.24 Downregulation -1137.51 316.24 316.24 374.97 Well 18 407.28 289.83 Up-regulation 171.13 578.41 578.41 685.81 Well 19 480.14 264.18 Downregulation -215.96 264.18 264.18 313.23 Well 20 2019.79 1157.17 Downregulation -862.62 1157.17 1157.17 1372.05 4 3.3. Stroke and Frequency Control Figure 6. Analysis model of stroke and frequency law The analysis model for the relationship between stroke and frequency and liquid production is shown in Figure 6, which is a three-layer BP neural network with 56, 56, and 2 neurons per layer. The liquid production in historical data is used as the input parameter of the BP neural network, and the stroke and frequency number are used as validation. The predicted value obtained from each round of training is compared with the stroke and frequency number corresponding to the liquid production, and the network parameters are changed to summarize the relationship between the liquid production and stroke and frequency number in the BP neural network. Input the liquid production obtained through regulation into the trained model to obtain stroke and frequency prediction data. Taking some data from May 2022 as an example, due to certain limitations on the stroke and frequency of the well group, the original stroke of a single well is used as the standard. The correction plan is to use the last month's frequency in the training data as the new stroke; Divide the product of the predicted stroke and frequency by the stroke to obtain the frequency; Then, according to the standard stroke of the oil engine, select the stroke closest to the previous calculation result as the new stroke, and determine the stroke number based on the principle of the same product. The final stroke and frequency control plan is shown in Table 4, and this article only shows 20 wells. Table 4. Control Plan for May 2022 Well No Monthly liquid production stroke Frequency Well No Monthly liquid production Stroke Frequency Well 11 327.793 5.5 2.5 Well 23 512.955 6.0 2.4 Well 14 1208.942 3.0 5.3 Well 24 647.823 2.5 5.8 Well 15 368.527 2.5 5.5 Well 25 421.808 2.1 6.7 Well 16 1506.681 3.0 5.5 Well 26 1296.187 4.2 3.8 Well 17 374.966 5.5 2.5 Well 27 1502.099 3.0 5.5 Well 18 685.813 3.0 4.9 Well 29 1084.410 3.0 5.2 Well 19 313.233 5.5 2.5 Well 30 483.017 2.5 5.6 Well 20 1372.046 4.2 3.9 Well 31 375.793 2.5 5.5 Well 21 842.602 2.5 6.0 Well 32 1146.746 3.0 5.2 Well 22 1275.914 3.0 5.3 Well 33 801.357 2.5 5.9 3.4. On Site Testing This article is based on the prediction and regulation of more than 500 wells in a certain area of Daqing Oilfield. During the testing phase, 50 wells were randomly selected, their stroke counts were adjusted, and they were monitored for 20 days. During the testing period, the liquid production of the 50 wells remained basically unchanged, and the oil production increased by 5.7%. After calculation, under the same oil production, the energy consumption can be reduced by about 6.67%. 4. Conclusion In order to improve the overall operational efficiency of the mechanical production well group, save production costs, and accurately regulate the liquid production of the oil production well in the future, this paper proposes a neural network-based prediction and control model for mechanical production wells. This model includes two parts: prediction and regulation. Based on LSTM neural network, the oil and liquid production of single wells and well groups are predicted to obtain the oil and liquid production trends of single wells. Then, based on BP neural network combined with water content, the regulation quantity is quantitatively analyzed. Taking a certain well group in Daqing Oilfield as an example, conduct simulation and on-site testing. The on-site test results indicate that: (1) The LSTM neural network prediction model has high accuracy and certain advantages in long-term oil and liquid production prediction; (2) Taking the block as a whole and based on the geological parameters of water content, controlling the liquid production rate of a single well can effectively improve the overall oil production rate of the block and reduce the overall energy consumption of the block. References [1] NIE Xiaowei. Research status and development trend of core technologies of intelligent oilfields [J]. Petroleum Geology and Recovery Efficiency, 2022, 29(03): 68-79. [2] Wang Guangyun, Wang Fenglan, Zhao Bo, etc. Exploration and development situation and development strategy of Daqing Oilfield Company [J]. CHINA PETROLEUM EXPLORATION, 2021, 26(01): 55-73. [3] Wu Xingen, Ge Jiali. Applying Artificial Neural Networks to Predict Oilfield Production [J]. PETROLEUM EXPLORATION AND DEVELOPMENT, 1994, (03): 75- 78+131. [4] Jiang Wei. Research on Oil Well Production Forecast Technology Based on Indicator Diagram [D]. NORTEAST PETROLEM UNIVERSITY, 2021. [5] Ma Chengjie. A Method for Predicting Reservoir Production Based on Recurrent Neural Networks [J]. Inner Mongolia Petrochemical Industry, 2021, 47(05): 108-112. 5 [6] Cheng Guojian, Fu Wangzepeng. GRU neural network oil recovery prediction based on genetic algorithm [J]. Information Technology and Informatization,2022, (05): 5-10. [7] Sun Qiang, Shi Hongfu, Ling Haochuan, etc. Liquid Production Adjustment of Balance Displacement in Narrow - Banded Heavy-Oil Reservoir [J]. Special Oil and Gas Reservoirs, 2020, 27(02): 120-124. [8] Guo Ying, Zhang Yukun, Han Zhenguo, etc. Control Technology for Liquid Production in Stratified Oil Production Wells [J]. Chemical Engineering & Equipment, 2015, (09): 90- 92.