CN117951490A - Erosion rate prediction method for shale gas field elbow - Google Patents
Erosion rate prediction method for shale gas field elbow Download PDFInfo
- Publication number
- CN117951490A CN117951490A CN202410127136.2A CN202410127136A CN117951490A CN 117951490 A CN117951490 A CN 117951490A CN 202410127136 A CN202410127136 A CN 202410127136A CN 117951490 A CN117951490 A CN 117951490A
- Authority
- CN
- China
- Prior art keywords
- data
- shale gas
- erosion rate
- gas field
- elbow
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000003628 erosive effect Effects 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012706 support-vector machine Methods 0.000 claims abstract description 26
- 238000012360 testing method Methods 0.000 claims abstract description 14
- 238000005457 optimization Methods 0.000 claims abstract description 9
- 238000010606 normalization Methods 0.000 claims abstract description 5
- 238000007781 pre-processing Methods 0.000 claims abstract description 5
- 230000006870 function Effects 0.000 claims description 49
- 238000009826 distribution Methods 0.000 claims description 23
- 230000035772 mutation Effects 0.000 claims description 7
- 238000010801 machine learning Methods 0.000 claims description 5
- 102100029469 WD repeat and HMG-box DNA-binding protein 1 Human genes 0.000 claims description 3
- 101710097421 WD repeat and HMG-box DNA-binding protein 1 Proteins 0.000 claims description 3
- 230000001174 ascending effect Effects 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 230000002452 interceptive effect Effects 0.000 claims 1
- 230000009191 jumping Effects 0.000 claims 1
- 239000007789 gas Substances 0.000 description 28
- 230000003044 adaptive effect Effects 0.000 description 5
- 239000012530 fluid Substances 0.000 description 5
- 239000002245 particle Substances 0.000 description 5
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 description 2
- 241000282461 Canis lupus Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000000227 grinding Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 239000003345 natural gas Substances 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to the technical field of oil and gas pipeline elbow erosion rate prediction, in particular to a shale gas field elbow erosion rate prediction method, which comprises the following steps: step one: collecting and preprocessing erosion rate data at shale gas field elbows, comprising: dividing erosion rate data at the elbow of the shale gas field into a training set and a testing set according to a random sequence number; and normalizing the input end and the output end of the training set of erosion rate data at the elbow of the shale gas field, and normalizing the data of the test set according to a training set data normalization framework. The super parameters of the support vector machine are continuously optimized through an improved optimization algorithm; the individual with the highest fitness is found out through iteration to form the support vector machine with the optimal structure, so that a convenient and real-time method is provided, the method has important significance for guaranteeing stable, safe and efficient operation of the shale gas field pipeline, and the erosion rate of the elbow of the shale gas field pipeline can be predicted, and the method is wide in application range, high in accuracy and good in stability.
Description
Technical Field
The invention relates to the technical field of oil and gas pipeline elbow erosion rate prediction, in particular to a shale gas field elbow erosion rate prediction method.
Background
Shale gas, an unconventional energy source, has gradually become a major growth point in natural gas production. Erosion of different parts of a pipeline, such as a valve, an elbow and a tee joint, by sand in a fracturing fluid and scraps in shale gas is a main problem in shale gas exploitation and gathering and transportation processes. Solid particles in the fluid medium continuously impact the pipeline wall, so that the wall thickness of the pipeline is continuously reduced, and even resource leakage and serious accidents are caused.
In order to prevent disasters, the mechanism of pipeline erosion is researched, and the establishment of a pipeline erosion prediction model is of great significance. The pipeline erosion process can be divided into three categories according to the different impact angles between the particles and the pipe wall: micro-cutting, powdering and impact deformation. The extent of corrosion of a pipe is affected by a number of factors, such as pipe parameters, fluid medium parameters, and particle parameters. In recent years, with the popularization of machine learning and deep learning, more and more students apply a machine learning model to the field of pipeline erosion, and many predictive models have been proposed. Although the accuracy and efficiency of the pipeline erosion prediction model are continually improved, a more accurate and efficient prediction model is worth researching because of the complexity caused by the many factors affecting the pipeline erosion degree and the nonlinearity.
Disclosure of Invention
The invention aims to provide a method for predicting erosion rate at a shale gas field elbow, which aims to solve the problems that the factors influencing the erosion degree of a pipeline are many, and the complexity is caused by nonlinearity, so that a more accurate and more efficient prediction model is worth researching.
In order to achieve the above purpose, the invention provides a method for predicting erosion rate at a shale gas field elbow, comprising the following steps:
Step one: collecting and preprocessing erosion rate data at shale gas field elbows, comprising: dividing erosion rate data at the elbow of the shale gas field into a training set and a testing set according to a random sequence number; normalizing the input end and the output end of a training set of erosion rate data at the elbow of the shale gas field, and normalizing the data of the test set according to a training set data normalization framework;
Step two: constructing a prediction algorithm, comprising:
1. normalizing erosion rate data at a shale gas field elbow;
Wherein, data std is standardized data, data inv is inversely standardized data, data is real data, and n is sample size.
2. Selecting a kernel function of a support vector machine, determining super parameters, including an initial data scale, individual positions of data, discoverers and participators in the data, calculating objective function values of the data, obtaining the current optimal individual position, defining a training set as { (u i,vi)|ui∈Rn,vi E R }, and a linear equation of a regression function is as follows:
Where u i is the input vector; v i is the output vector; a nonlinear mapping function; ω is a weight vector; c is the deviation; g (x) is a function and T is a transpose. The optimization goal of the support vector machine is min0.5 ω 2 by introducing the relaxation variables ζ i and/> To transform the problem:
wherein y is a penalty factor; epsilon is the insensitive loss function. After conversion, we can finally represent the SVM as:
Step three: updating the participant positions and calculating the objective function values, updating the finder positions and calculating the objective function values, updating the early warning positions and calculating the objective function values.
A+=AT(AAT)-1 (7)
Wherein Q is a random number subject to normal distribution, X worst is the current global worst position, X P is the current global best position, and A and L are 1 xD matrices;
Step four: in the updating process, if the difference between the objective function values of two iterations before and after a certain individual is smaller than a threshold value, the certain individual is marked, and if the certain individual is marked for more than two times, the position of the certain individual is disturbed through the self-adaptive t distribution mutation operator.
Where t is the current iteration number, iter max is the maximum iteration number, Q is a random number subject to normal distribution, r 2 is a random number between 0 and 1, and st is a number between 0.5 and 1.
Wherein, beta is a random number obeying standard normal distribution, K is a random number between-1 and-1, f g is an objective function of the current global optimal position, and f w is an objective function value of the current global worst position;
Step five: if the current iteration number reaches the maximum iteration number, stopping iteration, otherwise, continuously repeating the third step and the fourth step, and obtaining the optimal position and the objective function value after the iteration is ended.
Step six: outputting the hyper-parameter value determined by the optimal position, and establishing an intelligent prediction model based on the erosion rate of the shale gas field elbow of the improved support vector machine model;
step seven: model accuracy was checked by MSE values of different machine learning models.
Wherein n is the number of samples, data is a true value, and F is a predicted value of the machine model;
preferably, the kernel function of the support vector machine is utilized to carry out dimension ascending on the small sample data of the shale gas field elbow erosion rate, the super parameters of the support vector machine are continuously optimized through a prediction algorithm, and the individual with the highest fitness is found out through iteration, so that the support vector machine with the optimal structure is formed.
Preferably, in the fourth step, the individual positions of the part of each iteration of the prediction algorithm are disturbed by the adaptive t-distribution mutation operator, so that the situation of sinking into local optimum is avoided as much as possible.
Preferably, the t distribution with the iteration times as independent variables is established, a threshold value of the iteration difference of the objective function value of each individual is set, the individual smaller than the threshold value is marked in each iteration process, if the marking times are larger than two times, the position of the individual is interfered, so that a larger range is searched in the early iteration process, and the local optimum is jumped out in the later iteration process.
Compared with the prior art, the invention has the beneficial effects that:
The method comprises the steps that by taking the diameter of a pipeline, the particle size, the viscosity of fluid, the surface speed of fluid and the surface speed of gas as independent variables, the kernel function of a support vector machine is utilized to carry out dimension lifting on small sample data of the erosion rate of the shale gas field elbow; continuously optimizing the super parameters of the support vector machine through an improved optimization algorithm; the individual with the highest fitness is found out through iteration to form the support vector machine with the optimal structure, so that a convenient and real-time method is provided, the method has important significance for guaranteeing stable, safe and efficient operation of the shale gas field pipeline, and the erosion rate of the elbow of the shale gas field pipeline can be predicted, and the method is wide in application range, high in accuracy and good in stability.
Drawings
FIG. 1 is a flow chart of an intelligent prediction method for erosion rate at a shale gas field elbow based on an improved support vector machine model;
FIG. 2 is a flow chart of the improved algorithm of the present invention;
FIG. 3 is a graph showing the error of the erosion rate prediction result of the support vector machine modified by the different optimization algorithms according to the present invention.
Detailed Description
Referring to fig. 1-3, an embodiment of the present invention is provided:
A method for predicting erosion rate at a shale gas field elbow comprises the following steps:
Step one: collecting and preprocessing erosion rate data at shale gas field elbows, comprising: dividing erosion rate data at the elbow of the shale gas field into a training set and a testing set according to a random sequence number; normalizing the input end and the output end of a training set of erosion rate data at the elbow of the shale gas field, and normalizing the data of the test set according to a training set data normalization framework;
Step two: constructing a prediction algorithm, comprising:
1. normalizing erosion rate data at a shale gas field elbow;
Wherein, data std is standardized data, data inv is inversely standardized data, data is real data, and n is sample size.
2. Selecting a kernel function of a support vector machine, determining super parameters, including an initial data scale, individual positions of data, discoverers and participators in the data, calculating objective function values of the data, obtaining a current optimal individual position, defining a training set as { (u i,vi)|ui∈Rn,vi epsilon R }, wherein R is a real set, and a linear equation of a regression function is as follows:
Where u i is the input vector; v i is the output vector; A nonlinear mapping function; ω is a weight vector; c is the deviation; g (x) is a function and T is a transpose. The optimization objective of the support vector machine is min0.5 ω 2, the problem is transformed by introducing relaxation variables ζ i and ζ i *:
wherein y is a penalty factor; epsilon is the insensitive loss function. After conversion, we can finally represent the SVM as:
Where K (u i,uj) is a kernel function, alpha i is a Lagrangian multiplier, Is the optimal solution;
The kernel function of the support vector machine is utilized to carry out dimension ascending on the small sample data of the erosion rate of the shale gas field elbow, the super parameters of the support vector machine are continuously optimized through a prediction algorithm, and the individual with the highest fitness is found out through iteration, so that the support vector machine with the optimal structure is formed;
Step three: updating the participant positions and calculating the objective function values, updating the finder positions and calculating the objective function values, updating the early warning positions and calculating the objective function values.
A+=AT(AAT)-1 (7)
Where Q is a random number subject to normal distribution, X worst is the current global worst position,Is the global optimal position of the t-th iteration, A and L are 1 xD matrix,/>Is the individual position, m is the population individual number;
Step four: in the updating process, if the difference between the objective function values of two iterations before and after a certain individual is smaller than a threshold value, the certain individual is marked, and if the certain individual is marked for more than two times, the position of the certain individual is disturbed through the self-adaptive t distribution mutation operator.
Where t is the current iteration number, iter max is the maximum iteration number, Q is a random number subject to normal distribution, R 2 is a random number between 0 and 1, st is a number between 0.5 and 1, and α is a random number between 0 and 1.
Wherein, beta is a random number obeying standard normal distribution, K is a random number between-1 and-1, f g is an objective function of the current global optimal position, f w is an objective function value of the current global worst position, and f i is an objective function value of the current individual;
In the fourth step, through the self-adaptive t distribution mutation operator, the position of part of individuals in each iteration of the prediction algorithm is disturbed, so that the situation that local optimum is trapped is avoided as much as possible, t distribution taking the iteration times as independent variables is established, a threshold value of iteration difference of individual objective function values is set, individuals smaller than the threshold value are marked in each iteration process, if the marking times are greater than two times, the position of the individuals is disturbed, and therefore a larger range is searched in the early iteration process, and the local optimum is jumped out in the later iteration process;
Step five: if the current iteration number reaches the maximum iteration number, stopping iteration, otherwise, continuously repeating the third step and the fourth step, and obtaining the optimal position and the objective function value after the iteration is ended.
Step six: outputting the hyper-parameter value determined by the optimal position, and establishing an intelligent prediction model based on the erosion rate of the shale gas field elbow of the improved support vector machine model;
step seven: model accuracy was checked by MSE values of different machine learning models.
Wherein n is the number of samples, data is a true value, and F is a predicted value of the machine model;
Taking the shale gas field elbow erosion rate data shown in table 1 as an example, eight reference models are listed for comparison with a predictive algorithm (as shown in fig. 3), including a gray wolf with SVM (GWO-SVM), a particle swarm with SVM (PSO-SVM), SSA-SVM, an optimization algorithm with SVM (WOA-SVM), differential perturbation with PSO-SVM (DD-PSO-SVM), an adaptive T distribution improvement GWO-SVM (AT-GWO-SVM), an adaptive T distribution improved PSO-SVM, and an adaptive T distribution improved WOA-SVM.
TABLE 1 shale gas field elbow erosion Rate data
/>
The data are divided into a training set and a testing set according to the proportion of 7:3, the average value standardization is used for preprocessing the training set and the testing set, the SVM is used for predicting the erosion rate, the MSE is used as an objective function, the super parameters of the support vector machine are optimized by a plurality of optimization algorithms, the optimized SVM is used for predicting the erosion rate, and the final predicted value is obtained by the inverse average value normalization.
Because the optimization algorithm can result in different prediction results each time, ten simulations are performed to explore the overall prediction performance, the average MSE of nine models in the training set and the test set are shown as the average MSE of GMO-SVM, SSA-SVM, WOA-SVM, AT-GMO-SVM, AT-SSA-SVM (prediction algorithm) and AT-WOA-SVM in the training set is less than 0.012, the MSE of AT-SSA-SVM in the test set is less than 0.35, the average MSE of AT-SSA-SVM model is less than 0.20, the MSE of AT-SSA-SVM is 47% lower than the average MSE of other models in the test set, and the results show that the AT-SSA-SVM model has the best prediction performance in both the training set and the test set, and the MSE of AT-SSA-SVM model is 32% lower than that of SSA-SVM model after the adaptive t distribution mutation operator is added, because the t distribution with the number of iterations as the degree of freedom is used as disturbance, which locally optimizes the algorithm AT the end of the iteration AT the time of the iteration.
Claims (4)
1. The method for predicting the erosion rate at the elbow of the shale gas field is characterized by comprising the following steps of:
Step one: collecting and preprocessing erosion rate data at shale gas field elbows, comprising: dividing erosion rate data at the elbow of the shale gas field into a training set and a testing set according to a random sequence number; normalizing the input end and the output end of a training set of erosion rate data at the elbow of the shale gas field, and normalizing the data of the test set according to a training set data normalization framework;
Step two: constructing a prediction algorithm, comprising:
1. normalizing erosion rate data at a shale gas field elbow;
Wherein, data std is standardized data, data inv is inversely standardized data, data is real data, and n is sample size.
2. Selecting a kernel function of a support vector machine, determining super parameters, including an initial data scale, individual positions of data, discoverers and participators in the data, calculating objective function values of the data, obtaining the current optimal individual position, defining a training set as { (u i,vi)|ui∈Rn,vi E R }, and a linear equation of a regression function is as follows:
Where u i is the input vector; v i is the output vector; a nonlinear mapping function; ω is a weight vector; c is the deviation; g (x) is a function and T is a transpose. The optimization goal of the support vector machine is min0.5 ω 2 by introducing the relaxation variables ζ i and/> To transform the problem:
wherein y is a penalty factor; epsilon is the insensitive loss function. After conversion, we can finally represent the SVM as:
Step three: updating the participant positions and calculating the objective function values, updating the finder positions and calculating the objective function values, updating the early warning positions and calculating the objective function values.
A+=AT(AAT)-1 (7)
Wherein Q is a random number subject to normal distribution, X worst is the current global worst position, X P is the current global best position, and A and L are 1 xD matrices;
Step four: in the updating process, if the difference between the objective function values of two iterations before and after a certain individual is smaller than a threshold value, the certain individual is marked, and if the certain individual is marked for more than two times, the position of the certain individual is disturbed through the self-adaptive t distribution mutation operator.
Where t is the current iteration number, iter max is the maximum iteration number, Q is a random number subject to normal distribution, r 2 is a random number between 0 and 1, and st is a number between 0.5 and 1.
Wherein, beta is a random number obeying standard normal distribution, K is a random number between-1 and-1, f g is an objective function of the current global optimal position, and f w is an objective function value of the current global worst position;
Step five: if the current iteration number reaches the maximum iteration number, stopping iteration, otherwise, continuously repeating the third step and the fourth step, and obtaining the optimal position and the objective function value after the iteration is ended.
Step six: outputting the hyper-parameter value determined by the optimal position, and establishing an intelligent prediction model based on the erosion rate of the shale gas field elbow of the improved support vector machine model;
step seven: model accuracy was checked by MSE values of different machine learning models.
Where n is the number of samples, data is the true value, and F is the machine model predicted value.
2. The method for predicting erosion rate at a shale gas field elbow according to claim 1, wherein the method comprises the following steps: and the kernel function of the support vector machine is utilized to carry out dimension ascending on the small sample data of the shale gas field elbow erosion rate, the super-parameters of the support vector machine are continuously optimized through a prediction algorithm, and the individual with the highest fitness is found out through iteration, so that the support vector machine with the optimal structure is formed.
3. The method for predicting erosion rate at a shale gas field elbow according to claim 1, wherein the method comprises the following steps: and step four, the individual positions of part of each iteration of the prediction algorithm are disturbed through the self-adaptive t-distribution mutation operator, so that the situation of sinking into local optimum is avoided as much as possible.
4. A method for predicting erosion rate at a shale gas field elbow according to claim 3, wherein: and establishing t distribution taking the iteration times as independent variables, setting a threshold value of iteration difference of the objective function value of each individual, marking the individual smaller than the threshold value in each iteration process, and if the marking times are greater than two times, interfering the position of the individual, thereby searching a larger range in the early iteration process and jumping out of local optimum in the later iteration process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410127136.2A CN117951490A (en) | 2024-01-30 | 2024-01-30 | Erosion rate prediction method for shale gas field elbow |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410127136.2A CN117951490A (en) | 2024-01-30 | 2024-01-30 | Erosion rate prediction method for shale gas field elbow |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117951490A true CN117951490A (en) | 2024-04-30 |
Family
ID=90801074
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410127136.2A Pending CN117951490A (en) | 2024-01-30 | 2024-01-30 | Erosion rate prediction method for shale gas field elbow |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117951490A (en) |
-
2024
- 2024-01-30 CN CN202410127136.2A patent/CN117951490A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111160520A (en) | BP neural network wind speed prediction method based on genetic algorithm optimization | |
CN110110434B (en) | Initialization method for probability load flow deep neural network calculation | |
CN112884056A (en) | Optimized LSTM neural network-based sewage quality prediction method | |
CN112307676B (en) | Wave height numerical prediction model result correction method | |
CN112364560B (en) | Intelligent prediction method for working hours of mine rock drilling equipment | |
CN111784061B (en) | Training method, device and equipment for power grid engineering cost prediction model | |
CN104732067A (en) | Industrial process modeling forecasting method oriented at flow object | |
Li et al. | An innovative combined model based on multi-objective optimization approach for forecasting short-term wind speed: A case study in China | |
CN115982141A (en) | Characteristic optimization method for time series data prediction | |
CN112836876B (en) | Power distribution network line load prediction method based on deep learning | |
CN114239419A (en) | Deep learning-based wellbore effusion prediction method | |
CN113408190A (en) | Bayes-LSTM model-based surrounding rock deformation prediction method during construction of highway tunnel | |
CN112539054A (en) | Production optimization method for ground pipe network and underground oil reservoir complex system | |
CN117951490A (en) | Erosion rate prediction method for shale gas field elbow | |
CN111310974A (en) | Short-term water demand prediction method based on GA-ELM | |
CN113887049A (en) | Drilling speed prediction method and system for petroleum drilling based on machine learning | |
CN114862007A (en) | Short-period gas production rate prediction method and system for carbonate gas well | |
Xu et al. | Prediction of the Wastewater's pH Based on Deep Learning Incorporating Sliding Windows. | |
Deng et al. | Grey relational analysis and fuzzy neural network method for predicting corrosion rate of marine pipeline | |
Liu et al. | A Method Based on Multiple Population Genetic Algorithm to Select Hyper-Parameters of Industrial Intrusion Detection Classifier | |
Li et al. | Applications of Accelerating Genetic Algorithms in System Engineering | |
CN112257346B (en) | Novel UPFNN aluminum electrolysis energy consumption calculation method based on self-adaptive MCMC sampling | |
CN117522173B (en) | Natural gas hydrate depressurization exploitation productivity prediction method based on deep neural network | |
Wang et al. | Accurate and real-time prediction of umbilical component layout optimization based on convolutional neural network | |
Sheng | Lateral Collision Model and Parameter Analysis of Bridge Structure Based on Sensor Array |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |