Annular pressure prediction method, prediction terminal and readable storage medium
By combining the prediction methods of gray model and LM-BP neural network model, the problems of low prediction accuracy of annular pressure and insufficient processing capabilities in the prior art are solved, and accurate prediction of annular pressure and improved safety and efficiency of gas well operations are achieved.
Patent Information
- Application Number
- CN202311694336.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2025-06-13
AI Technical Summary
The existing annular pressure prediction methods have problems such as limited prediction accuracy and insufficient processing capabilities for complex data, and it is impossible to achieve accurate prediction of annular pressure.
Using a prediction method combining gray model and LM-BP neural network model, the gas well index and annular pressure data are acquired and preprocessed, and the gray model is used to make preliminary predictions, and the output is used as input to the LM-BP neural network model to achieve accurate prediction of annular pressure.
It improves the accuracy of annular pressure prediction, enhances the model's adaptability to different data characteristics, can quickly process real-time data, provide immediate monitoring and emergency response support, effectively avoid accidents, and improve operational efficiency.
Smart Images

Figure CN120146232A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural gas development, and particularly relates to a method for predicting annulus pressure, a prediction terminal, and a readable storage medium. Background Art
[0002] In the field of petroleum engineering, the monitoring of annulus pressure in gas wells is crucial for ensuring the safety and efficiency of drilling operations. Annulus pressure refers to the pressure in the annular space between the drill pipe and the wellbore wall, and its changes can reflect various dynamic characteristics of gas wells, including fluid flow state, wellbore stability, etc.
[0003] Traditional methods for monitoring annulus pressure rely on on-site measurements and empirical estimates. These methods have certain limitations, such as low measurement accuracy, inability to reflect downhole conditions in real time, and inability to accurately predict future changes in annulus pressure. With the development of computing technology, model-based methods for predicting annulus pressure have received extensive attention, especially prediction models that combine artificial intelligence and machine learning technologies. These models can predict the future trend of annulus pressure based on historical data, thereby improving the safety and efficiency of drilling operations. However, existing prediction models still have some problems, such as limited prediction accuracy and insufficient ability to process complex data. These problems have prompted people to explore more efficient and accurate methods for predicting annulus pressure. Summary of the Invention
[0004] The technical problem to be solved by the present invention is that the conventional method is to perform real-time monitoring through a pressure gauge and cannot effectively predict; existing prediction models still have some problems, such as limited prediction accuracy and insufficient ability to process complex data. The purpose is to provide a method for predicting annulus pressure, a prediction terminal, and a readable storage medium to achieve accurate prediction of annulus pressure.
[0005] The present invention is achieved through the following technical solutions:
[0006] A method for predicting annulus pressure includes:
[0007] Obtain sample data, and after preprocessing the sample data, divide it into a training set and a test set; the sample data includes gas well indicators and annulus pressure obtained according to a time series;
[0008] Construct an annulus pressure prediction model. The annulus pressure prediction model includes a grey model and an LM-BP neural network model, and use the output of the grey model as the input of the LM-BP neural network model;
[0009] Use the gas well indicators as the input quantity and input them into the grey model; use the annulus pressure as the expected output quantity and output it by the LM-BP neural network model; train the annulus pressure prediction model;
[0010] Obtain the trained annulus pressure prediction model and test it with the test set;
[0011] Input the real-time gas well indicators into the annulus pressure prediction model to obtain the predicted annulus pressure.
[0012] Specifically, the grey model includes n GM(1,1) models, and the n GM(1,1) models respectively correspond to the number of indicators in the gas well indicators. The GM(1,1) model predicts the gas well indicators and outputs them.
[0013] Optionally, the gas well indicators include gas production, oil pressure, temperature and water production; the grey model includes 4 GM(1,1) models, and the four GM(1,1) models respectively correspond to 4 gas well indicators.
[0014] Specifically, the LM-BP neural network model includes an input layer, a hidden layer and an output layer. The output value of the grey model serves as the input layer of the LM-BP neural network model, and the annulus pressure serves as the output layer of the LM-BP neural network model. Multiple neurons are set in the input layer, the hidden layer and the output layer;
[0015] The neuron model of the hidden layer is: The neuron model of the output layer is: Among them, y j is the output of the current neuron, x i is the input of the current neuron and is the output of the i-th neuron in the previous layer, w ij is the weight from the i-th neuron in the previous layer to the current neuron, a j is the bias of the current neuron in the hidden layer, b j is the bias of the current neuron in the output layer, and f(·) is the transfer function.
[0016] Specifically, the transfer function in the hidden layer adopts the hyperbolic tangent S-shaped transfer function, the transfer function in the output layer adopts the linear transfer function, and the network training function adopts the Levenberg-Marquardt optimization algorithm.
[0017] Optionally, the number of neurons in the input layer is equal to the number of indicators in the gas well indicators, the number of neurons in the output layer is equal to the number of outputs of the annulus pressure, and the number of neurons in the hidden layer is adjusted by the Levenberg-Marquardt optimization algorithm.
[0018] Specifically, the method for training the annulus pressure prediction model includes:
[0019] Initialize the weights and biases in the network; and set the hyperparameters;
[0020] Perform numerical normalization processing on the sample data in the training set;
[0021] Input the sample into the annulus pressure prediction model and give the expected output;
[0022] Calculate the output according to the weights and biases of each neuron node in the hidden layer;
[0023] Calculate the output value according to the weights and biases of each neuron node in the output layer;
[0024] Calculate the output error between the output value and the expected output, and correct and update the weights and biases of the hidden layer and the weights and biases of the output layer;
[0025] Judge whether the set number of iterations is reached or convergence is achieved. If both are not, increase the number of iterations by 1 and continue the iteration; if either is yes, complete the training of the annulus pressure prediction model.
[0026] Further, after completing the training of the annulus pressure prediction model, judge whether all the sample data in the training set are substituted during the training. If not, normalize the sample data in the training set and iterate again;
[0027] If so, output the trained annulus pressure prediction model.
[0028] A prediction terminal for annulus pressure, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, the prediction method for annulus pressure as described above is implemented.
[0029] A computer-readable storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the prediction method for annulus pressure as described above is implemented.
[0030] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0031] The annulus pressure prediction method proposed by the present invention is based on the combination of a grey model and an LM-BP neural network model. First, gas well indicators and annulus pressure data are acquired and preprocessed, and then these data are preliminarily predicted by the grey model. The output of the grey model is then used as the input of the LM-BP neural network model to achieve accurate prediction of annulus pressure.
[0032] The combination of the grey model and the LM-BP neural network model effectively improves the accuracy of annulus pressure prediction. The grey model has good performance in dealing with insufficient data or incomplete information, while the LM-BP neural network can accurately model complex data relationships through learning and training.
[0033] By using independent GM(1,1) models for different gas well indicators, the adaptability of the prediction model to different data characteristics is enhanced, enabling the model to make more flexible and accurate predictions when faced with different well conditions and operating conditions.
[0034] This prediction method can quickly process real-time data, providing immediate support for the daily monitoring and emergency response of gas wells. By accurately predicting the changes in annulus pressure, drilling operations can be adjusted in a timely manner, effectively avoiding accidents and improving operational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings illustrate exemplary embodiments of the present invention and, together with the description thereof, are used to explain the principles of the present invention. These drawings are included to provide a further understanding of the present invention, and the drawings are included in this specification and form a part of this specification, and do not constitute a limitation on the embodiments of the present invention.
[0036] Figure 1 It is a flowchart showing the process of a method for predicting annulus pressure according to the present invention.
[0037] Figure 2 It is a flowchart showing the process of a method for training an annulus pressure prediction model according to the present invention.
[0038] Figure 3 It is the prediction model accuracy of Example 4 according to the present invention.
[0039] Figure 4 It is the predicted annulus pressure diagram of Annulus A in Example 4 according to the present invention.
[0040] Figure 5 It is the predicted annulus pressure diagram of Annulus A in Example 4 according to the present invention.
[0041] Figure 6 It is the predicted annulus pressure diagram of Annulus A in Example 4 according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only for explaining the relevant content and are not intended to limit the present invention.
[0043] In addition, it should be noted that for the sake of convenience of description, only the parts related to the present invention are shown in the drawings.
[0044] Without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the drawings and embodiments.
[0045] Embodiment 1
[0046] As Figure 1 shown, a method for predicting annulus pressure includes:
[0047] In the first step, obtain sample data, and after preprocessing the sample data, divide it into a training set and a test set; the sample data includes gas well indicators and annulus pressure obtained in time series.
[0048] First, collect sample data related to gas well indicators and annulus pressure, which are data recorded in chronological order. Preprocessing includes steps such as data cleaning, standardization, or normalization, aiming to improve data quality and provide accurate input for subsequent modeling.
[0049] In the second step, construct an annulus pressure prediction model. The annulus pressure prediction model includes a grey model and an LM - BP neural network model, and use the output of the grey model as the input of the LM - BP neural network model.
[0050] The grey model is used to process incomplete, inaccurate, or uncertain information, and is particularly suitable for cases with less sample data. The LM - BP neural network model is a learning algorithm used to process more complex data relationships and improve the accuracy and reliability of predictions.
[0051] In the third step, use the gas well indicators as the input quantity and input them into the grey model; use the annulus pressure as the expected output quantity and output it from the LM - BP neural network model; train the annulus pressure prediction model.
[0052] Obtain the trained annulus pressure prediction model and test it with the test set.
[0053] Divide the processed data into a training set and a test set. The training set is used for model training, that is, adjusting the model parameters to enable accurate prediction of annulus pressure. The test set is used to evaluate the prediction performance of the model. Model training involves adjusting the weight and bias parameters in the neural network to minimize the prediction error.
[0054] In the fourth step, input the real - time gas well indicators into the annulus pressure prediction model to obtain the predicted annulus pressure.
[0055] Embodiment 2
[0056] This embodiment describes the grey model and the LM - BP neural network model.
[0057] The grey model includes n GM(1,1) models. The n GM(1,1) models respectively correspond to the number of indicators within the gas well indicators. The GM(1,1) models predict the gas well indicators and output. Here, n represents the number of gas well indicators. Each GM(1,1) model respectively corresponds to a specific gas well indicator and is used to predict this indicator.
[0058] The gas well indicators include gas production, oil pressure, temperature and water production; the grey model includes 4 GM(1,1) models, and the four GM(1,1) models respectively correspond to 4 gas well indicators.
[0059] The GM(1,1) model is one of the most commonly used grey prediction models. It is suitable for dealing with data with small samples and large uncertainties. By establishing a first-order differential equation to describe the generation law of time series data, and using the least squares method to estimate the model parameters, it realizes the fitting and prediction of data.
[0060] In the annulus pressure prediction, the GM(1,1) model can effectively handle the uncertainties and randomness in the data of each gas well indicator. Therefore, a GM(1,1) model is established for each gas well indicator (gas production, oil pressure, temperature and water production) respectively to ensure that each model focuses on the prediction of a specific indicator, making the entire prediction system more accurate. Because each model is optimized for a single indicator, it can capture the change trend of this indicator more accurately.
[0061] The output result of the GM(1,1) model will be used as the input of the LM-BP neural network model. In the LM-BP neural network model, these predicted values will be further processed together with other input data to achieve the final prediction of the annulus pressure.
[0062] By this method, combining the powerful prediction ability of the grey model and the highly non-linear mapping ability of the LM-BP neural network model, the prediction accuracy of the annulus pressure can be effectively improved. In addition, this method of predicting each indicator separately also enhances the adaptability of the model to different operating conditions, making the prediction results more reliable and accurate.
[0063] The LM-BP neural network model includes an input layer, a hidden layer and an output layer. The output value of the grey model serves as the input layer of the LM-BP neural network model, and the annulus pressure serves as the output layer of the LM-BP neural network model. Multiple neurons are set in the input layer, the hidden layer and the output layer.
[0064] The input layer receives the output value of the grey model, that is, the predicted values of each gas well indicator. The number of neurons in the input layer usually equals the number of gas well indicators.
[0065] The hidden layer extracts complex features and patterns from the input data. The number of neurons in the hidden layer is adjusted through an optimization algorithm to achieve the best network performance.
[0066] The output layer outputs the final prediction result, which is the annulus pressure. The number of neurons in the output layer usually equals the number of prediction targets.
[0067] The neuron model of the hidden layer is: The hidden layer uses the hyperbolic tangent sigmoid transfer function, which is suitable for processing non - linear relationships.
[0068] The neuron model of the output layer is: The output layer uses the linear transfer function, which is suitable for outputting continuous values.
[0069] Among them, y j is the output of the current neuron, x i is the input of the current neuron and the output of the i - th neuron in the previous layer, w ij is the weight from the i - th neuron in the previous layer to the current neuron, a j is the bias of the current neuron in the hidden layer, b j is the bias of the current neuron in the output layer, and f(·) is the transfer function.
[0070] The transfer function in the hidden layer adopts the hyperbolic tangent sigmoid transfer function, the transfer function in the output layer adopts the linear transfer function, and the network training function adopts the Levenberg - Marquardt optimization algorithm, which is a non - linear least - squares optimization algorithm and is suitable for dealing with complex data relationships. Through this algorithm, the network can continuously adjust the weights and biases of neurons during training to minimize the prediction error, thereby improving the prediction accuracy.
[0071] The number of neurons in the input layer equals the number of indicators within the gas well indicators, the number of neurons in the output layer equals the number of annulus pressure outputs, and the number of neurons in the hidden layer is adjusted through the Levenberg - Marquardt optimization algorithm, and its selection affects the complexity and prediction ability of the model.
[0072] The LM - BP neural network model can effectively process the predicted gas well indicators provided by the grey model, and through deep learning technology and optimization algorithms, it improves the accuracy and reliability of annulus pressure prediction.
[0073] Example Three
[0074] As Figure 2 shown, the method for training the annulus pressure prediction model includes:
[0075] S1. Initialize the weights and biases in the network; and set hyperparameters.
[0076] Weights and biases are parameters used for learning in neural networks, and their initial values are usually set as random decimals. Hyperparameters include the learning rate, the upper limit of the number of iterations, the network structure (such as the number of hidden layers and the number of neurons), etc.
[0077] S2. Perform numerical normalization processing on the sample data in the training set.
[0078] Normalization is to scale the data to a small, specified range (such as 0 to 1), which helps to speed up the training process and avoid certain features having too much influence on the training results due to large numerical values.
[0079] S3. Input the sample into the annulus pressure prediction model and give the expected output.
[0080] Input the processed sample data into the network and set its corresponding expected output (i.e., the actual annulus pressure value) for training use.
[0081] S4. Calculate the output according to the weights and biases of each neuron node in the hidden layer;
[0082] Calculate the output value according to the weights and biases of each neuron node in the output layer.
[0083] The network calculates the output of each neuron according to the weights and biases of the neurons in the hidden layer and the output layer.
[0084] S5. Calculate the output error between the output value and the expected output, and correct and update the weights and biases of the hidden layer and the weights and biases of the output layer.
[0085] The difference between the output of the output layer and the expected output is the error. Through the backpropagation algorithm, adjust the weights and biases of each neuron according to this error to make the prediction of the network closer to the actual value.
[0086] S6. Determine whether the set number of iterations is reached or convergence is achieved. If neither is the case, increment the number of iterations by 1 and jump to step S2 to continue the iteration; if either is the case, complete the training of the annulus pressure prediction model.
[0087] In each iteration, the network continuously adjusts the parameters through the above steps until the set number of iterations is reached or the output error of the network reaches an acceptable level (i.e., convergence).
[0088] After completing the training of the annulus pressure prediction model, it is judged whether all the sample data in the training set are substituted during the training. If not, the sample data in the training set are normalized and iterated again; after the training is completed, it is necessary to check whether all the samples in the training set are reasonably used. If not all samples are used, the unused samples need to be normalized and retrained.
[0089] If so, output the trained annulus pressure prediction model. If all training samples have been used and the model performance reaches the expected level, output the finally trained annulus pressure prediction model.
[0090] Example 4
[0091] This embodiment provides a specific example. The actual production oil pressure, temperature, liquid production volume and water production volume of Well L004 are selected as the basic data, and the pressure values of annulus A / B / C are used as the output. The data are randomly divided. A total of 95% of the annulus pressure data of each type are collected for model training, and 5% of the data are used for annulus pressure prediction.
[0092] Obtain the corresponding calculation table, and Figure 3 、 Figure 4 、 Figure 5 、 Figure 6 the calculation diagram.
[0093] Table 1 Calculation example of annulus pressure prediction for Well L004
[0094]
[0095] Example 5
[0096] A prediction terminal for annulus pressure, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned prediction method for annulus pressure when executing the computer program.
[0097] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, execution programs required for at least one function, etc.
[0098] The data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0099] A computer-readable storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the above-mentioned prediction method of annulus pressure is implemented.
[0100] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, magnetic tape cartridges, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the above several. The above-mentioned system memory and mass storage devices can be collectively referred to as memory.
[0101] In the description of this specification, the description with reference to terms such as "one embodiment / way", "some embodiments / ways", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of this application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment / way or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments / ways or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments / ways or examples described in this specification and the features of different embodiments / ways or examples.
[0102] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this application, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0103] Those skilled in the art should understand that the above embodiments are only for clearly explaining the present invention and are not intended to limit the scope of the present invention. For those skilled in the art, other changes or modifications can be made based on the above invention, and these changes or modifications are still within the scope of the present invention.
Claims
1. A method for predicting annulus pressure, characterized in that, it includes: Obtain sample data, and after preprocessing the sample data, divide it into a training set and a test set; the sample data includes gas well indicators and annulus pressure obtained in time series; Construct an annulus pressure prediction model, the annulus pressure prediction model includes a gray model and an LM-BP neural network model, and use the output of the gray model as the input of the LM-BP neural network model; Use the gas well indicators as the input quantity and input them into the gray model; use the annulus pressure as the expected output quantity and output it by the LM-BP neural network model; train the annulus pressure prediction model; Obtain the trained annulus pressure prediction model and test it with the test set; Input the real-time gas well indicators into the annulus pressure prediction model to obtain the predicted annulus pressure.
2. The method for predicting annulus pressure according to claim 1, characterized in that, The gray model includes n GM(1,1) models, and the n GM(1,1) models respectively correspond to the number of indicators in the gas well indicators, and the GM(1,1) model predicts and outputs the gas well indicators.
3. The method for predicting annulus pressure according to claim 2, characterized in that, The gas well indicators include gas production, oil pressure, temperature and water production; the gray model includes 4 GM(1,1) models, and the four GM(1,1) models respectively correspond to 4 gas well indicators.
4. The method for predicting annulus pressure according to claim 2, characterized in that, The LM-BP neural network model includes an input layer, a hidden layer and an output layer. The output value of the gray model is used as the input layer of the LM-BP neural network model, and the annulus pressure is used as the output layer of the LM-BP neural network model. Multiple neurons are set in the input layer, hidden layer and output layer; The neuron model of the hidden layer is as follows: The neuron model of the output layer is as follows: Among them, y j is the output of the current neuron, x i is the input of the current neuron and the output of the i-th neuron in the previous layer, w ij is the weight from the i-th neuron in the previous layer to the current neuron, a j is the bias of the current neuron in the hidden layer, b j is the bias of the current neuron in the output layer, and f(·) is the transfer function.
5. The method for predicting annulus pressure according to claim 4, characterized in that, The transfer function in the hidden layer uses the hyperbolic tangent S-shaped transfer function, the transfer function in the output layer uses the linear transfer function, and the network training function uses the Levenberg-Marquardt optimization algorithm.
6. The method for predicting annulus pressure according to claim 5, characterized in that, The number of neurons in the input layer is equal to the number of indicators in the gas well indicators, the number of neurons in the output layer is equal to the number of outputs of the annulus pressure, and the number of neurons in the hidden layer is adjusted by the Levenberg-Marquardt optimization algorithm.
7. The method for predicting annulus pressure according to claim 6, characterized in that, The method for training the annulus pressure prediction model includes: Initialize the weights and biases in the network; and set hyperparameters; Perform numerical normalization processing on the sample data in the training set; Input the sample into the annulus pressure prediction model and give the expected output; Calculate the output according to the weights and biases of each neuron node in the hidden layer; Calculate the output value according to the weights and biases of each neuron node in the output layer; Calculate the output error between the output value and the expected output, and correct and update the weights and biases of the hidden layer and the weights and biases of the output layer; Determine whether the set number of iterations is reached or convergence is achieved. If neither is the case, increment the iteration number by 1 and continue the iteration; if either is the case, complete the training of the annulus pressure prediction model.
8. A method for predicting annulus pressure according to claim 7, wherein, after completing the training of the annulus pressure prediction model, determine whether all sample data in the training set have been substituted during training. If not, normalize the sample data in the training set and re-iterate; if so, output the trained annulus pressure prediction model.
9. An annulus pressure prediction terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, when the processor executes the computer program, the method described in any one of claims 1-8 is implemented.
10. A computer-readable storage medium storing a computer program, wherein, when the computer program is executed by a processor, the method described in any one of claims 1-8 is implemented.