CN115017808A - Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM - Google Patents
Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM Download PDFInfo
- Publication number
- CN115017808A CN115017808A CN202210628962.6A CN202210628962A CN115017808A CN 115017808 A CN115017808 A CN 115017808A CN 202210628962 A CN202210628962 A CN 202210628962A CN 115017808 A CN115017808 A CN 115017808A
- Authority
- CN
- China
- Prior art keywords
- butterfly
- pipeline
- algorithm
- hkelm
- erosion
- 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
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 72
- 230000003628 erosive effect Effects 0.000 title claims abstract description 48
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000005457 optimization Methods 0.000 title claims abstract description 22
- 238000010606 normalization Methods 0.000 claims abstract description 19
- 238000012360 testing method Methods 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims abstract description 8
- 238000012549 training Methods 0.000 claims abstract description 7
- 230000006870 function Effects 0.000 claims description 48
- 239000002245 particle Substances 0.000 claims description 17
- 239000007788 liquid Substances 0.000 claims description 16
- 238000002474 experimental method Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000000739 chaotic effect Effects 0.000 claims description 9
- 239000003205 fragrance Substances 0.000 claims description 9
- 239000000463 material Substances 0.000 claims description 9
- 238000013507 mapping Methods 0.000 claims description 8
- 238000009826 distribution Methods 0.000 claims description 6
- 241000255777 Lepidoptera Species 0.000 claims description 3
- 238000011217 control strategy Methods 0.000 claims description 3
- 230000014509 gene expression Effects 0.000 claims description 3
- 230000001953 sensory effect Effects 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 230000000638 stimulation Effects 0.000 claims description 3
- 150000001875 compounds Chemical class 0.000 claims description 2
- 238000012935 Averaging Methods 0.000 claims 1
- 238000004519 manufacturing process Methods 0.000 abstract description 9
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 abstract description 4
- 230000009467 reduction Effects 0.000 abstract description 3
- 239000003345 natural gas Substances 0.000 abstract description 2
- 239000003208 petroleum Substances 0.000 abstract description 2
- 239000007789 gas Substances 0.000 description 9
- 238000004088 simulation Methods 0.000 description 7
- 238000011160 research Methods 0.000 description 6
- 238000011156 evaluation Methods 0.000 description 4
- 239000012530 fluid Substances 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 206010063385 Intellectualisation Diseases 0.000 description 1
- 238000005299 abrasion Methods 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000007790 solid phase Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/28—Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/10—Numerical modelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/14—Pipes
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Computer Hardware Design (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Algebra (AREA)
- Fluid Mechanics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a pipeline erosion prediction method based on improved butterfly algorithm optimized HKELM, which comprises the following steps: s1, establishing a data set; s2, carrying out normalization processing on the data set, and dividing the training set and the test set according to the ratio of 8: 2; s3, determining a kernel function combination mode and corresponding kernel parameters of the HKELM; s4, improving a butterfly algorithm; s5, setting a HKELM parameter range, determining model parameters of an optimal prediction model by adopting an improved butterfly algorithm, and predicting by using the model to obtain a prediction result; and S6, performing inverse normalization on the prediction result in the S5 to obtain an actual prediction result. The method adopts the improved butterfly optimization algorithm to optimize the HKELM for predicting the erosion degree of the pipeline, can improve the prediction accuracy of the maximum erosion rate of the pipeline erosion under the condition of multiphase flow, further ensures the safe production of pipeline transportation industries of petroleum, natural gas and the like, and avoids the economic loss and the reduction of the production efficiency.
Description
Technical Field
The invention relates to the technical field of pipeline erosion prediction, in particular to a pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM.
Background
Erosion is the phenomenon in which solid particles contained in a fluid flowing at high speed impact a wall surface, causing damage to the wall surface. High pressure, high velocity, solid particle-containing fluids are often present in oil and gas field production processes. When such fluids flow through the gathering pipeline, the wall surface of the pipeline is easily thinned or even perforated, especially for parts with changed flow directions, such as elbows and the like. This will bring the challenges to the gathering and safe production of oil and gas fields. Therefore, the production field needs to replace the parts in time according to the impact thinning rate, so that the economic loss and the reduction of the production efficiency are avoided. At present, two main research methods for pipeline erosion research at home and abroad are available: experimental study and numerical simulation.
The experimental research method is that a simulation device is set up in a laboratory for experiment based on the actual working condition on site, and the performance parameters of the material erosion abrasion can be effectively obtained. The experimental devices with more applications mainly comprise a rotary electrode type testing machine, a jet flow type erosion testing machine, a pipe flow type erosion testing machine, a Coriolis erosion testing machine and the like. Although experimental research can obtain true and reliable data to the maximum extent, the labor cost and the time cost required by the experiment are high. On the other hand, the method for controlling a single variable or a plurality of variables adopted in the conventional experiment cannot meet the requirements of complex and variable environmental parameters in engineering. The universality of the results obtained by the experiment is often limited, and the method is not easy to popularize in other systems.
With the progress of computer technology, the numerical simulation method is gradually developed and matured. The numerical simulation technique has the advantages of low cost, easy operation and the like, and has gradually become an important method for erosion prediction research. However, due to the complexity of the multiphase flow interface and the interaction of the fluid and the solid phase, the multiphase flow erosion prediction based on numerical simulation is very time-and computation-space-demanding. The unsteady behavior of multiphase flows and the existence of different flow patterns make the numerical simulation based approach very complex and time consuming, requiring significant computational resources to resolve.
The existing erosion prediction research results are generally performed based on offline laboratory data and steady-state numerical simulation results, and are not linked with a data interface of a production field. In the future, with the continuous improvement of the evaluation requirement of the safety management of the oil and gas pipeline, the concept of pipeline intellectualization and digital twinning is required to be continuously implemented in the design, construction and operation processes. Aiming at the existing large amount of data, the machine learning method has more advantages in time and expense by combining the progress of algorithm and computing power.
Disclosure of Invention
The invention aims to provide a pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM comprises the following steps:
s1, acquiring experimental data of a plurality of groups of pipeline erosion, wherein the experimental data comprises pipeline material hardness, pipeline diameter, pipeline curvature radius, particle diameter, liquid flow rate, liquid viscosity, gas flow rate and pipeline maximum erosion rate, and performing mean processing on different prediction results generated by multiple experiments under the same experiment condition in the data to establish a data set;
s2, carrying out normalization processing on the data set, and dividing the training set and the test set according to the ratio of 8: 2;
s3, determining a kernel function combination mode and corresponding kernel parameters of the HKELM;
s4, improving a butterfly algorithm;
s5, setting a HKELM parameter range, determining model parameters of an optimal prediction model by adopting an improved butterfly algorithm, and predicting by utilizing the model to obtain a prediction result;
and S6, performing inverse normalization on the prediction result in the S5 to obtain an actual prediction result.
Preferably, in S2, the normalization is achieved by the following formula:
wherein X is normalized data, Xi is preprocessed data, and X is mean Is the mean of the corresponding feature sequence, X var Is the variance of the corresponding signature sequence.
Preferably, in S3, the kernel function includes a polynomial kernel function, a gaussian kernel function, and a Sigmoid kernel function, and specific expressions and corresponding kernel parameters thereof are as follows:
K Poly (x,x i )=(γ(x,x i )+1) d ;
K RBF (x,x i )=exp(-||x-x i || 2 /σ 2 );
K Sig (x,x i )=tanh(β(x,x i )+r)
in the formula, K Poly (x,x i )、K RBF (x,x i )、K Sig (x,x i ) Respectively a polynomial kernel function, a Gaussian kernel function and a Sigmoid kernel function; wherein γ and d are kernel parameters of a polynomial kernel function; sigma is the kernel parameter of the Gaussian kernel function, and beta and r are the kernel parameters of the Sigmoid kernel function;
the combination mode is a weighted combination of two different kernel functions, and the influence factor is w and is expressed as follows:
K H (x,x i )=w×K 1 (x,x i )+(1-w)×K 2 (x,x i )
in the formula, K H (x,x i ) Is a mixed kernel function, w is an influence factor of the mixed kernel function, K 1 (x,x i )、K 2 (x,x i ) Are different kernel functions.
Preferably, in S4, the improved butterfly algorithm is to add chaotic mapping and nonlinear parameter control to the basic butterfly optimization algorithm, and to merge the particle swarm optimization algorithm, thereby improving the optimization capability of the butterfly optimization algorithm;
the improved butterfly algorithm specifically comprises the following steps:
s4.1, setting population quantity pop and maximum iteration number Iter of improved butterfly algorithm max Switching the probability p, and initializing by using Singer chaotic mapping;
s4.2, calculating and sequencing the fitness and the fragrance intensity of all butterfly individuals, and storing the optimal fitness and the butterfly position information corresponding to the fitness;
s4.3, carrying out global search or local search on the butterfly population, and updating the butterfly position;
and S4.4, adding 1 to the iteration times, calculating the fitness value of each individual, comparing the fitness value with the optimal fitness value in the S4.2, obtaining the optimal fitness value again until the set maximum iteration times are reached, and outputting the optimal fitness value and the butterfly position corresponding to the optimal fitness value.
Preferably, in S4.1, the Singer chaotic map is initialized and implemented by the following formula:
wherein x is k+1 For the distribution after iteration, x k Is the initial distribution.
Preferably, in S4.2, the fitness value is a calculation result of a fitness function, and a mean square error between the predicted value and the experimental value is selected as the fitness function, and is expressed as follows:
where m is the number of output data, P i For model prediction, M i Is an experimental value;
the aroma intensity calculation formula is as follows:
F=eI α
in the formula, F is the concentration of the butterfly emitting fragrance, e is the sensory mode, I is the stimulation intensity, alpha is the control factor of the fragrance intensity, and the self-adaptive dynamic nonlinear parameter control strategy is adopted, and the calculation formula is as follows:
in the formula, alpha (t) represents the alpha value of the ith iteration, alpha 1 、α 2 Maximum and minimum values respectively set for alpha, delta is the adjustment factor for the control step length, Iter t For the current number of iterations, Iter max Is the maximum number of iterations of the algorithm.
Preferably, in S4.3, a specific implementation method for performing the global search or the local search is as follows:
the speed of the algorithm is updated by adopting a related strategy of a particle swarm optimization algorithm, and the specific formula is as follows:
in the formula, V i t+1 And V i t Represents the speed of the ith butterfly at the iteration times t +1 and t, c 1 =c 2 0.5, a and b are random numbers in the interval (0,1), P best For the optimal position of the butterfly individual, G best For the global optimal position of the butterfly population, the value of epsilon is shown as the following formula:
in the formula, epsilon max =0.9,ε min =0.2;
Then, the position updating can have two states of global search and local search; the specific implementation method comprises the following steps: generating a random number r between [0,1], comparing it with a handover probability p; if the random number r is larger than p, the global search is performed according to the following formula
Wherein r is ∈ [0,1]]The random number in (1) is selected,for the best butterfly position at the current iteration time t, F (x) i ) Representing the fitness value of the ith butterfly at the current iteration time;
if the random number r < p, then local search is performed according to the following formula
In the formula (I), the compound is shown in the specification,and randomly calculating the positions of the two butterflies for the t-th iteration in the search space.
Preferably, the method specifically implemented in S5 includes:
s5.1, substituting the optimal parameters determined in the S4 into a mixed kernel limit learning machine model;
s5.2, inputting the hardness of the pipeline material, the diameter of the pipeline, the curvature radius of the pipeline, the diameter of particles, the flow rate of liquid, the viscosity of the liquid and the flow rate of gas in the experimental data as models, outputting the maximum erosion rate in the experimental data as a model output, and outputting a group of pipeline erosion prediction results.
Preferably, in S6, the inverse normalization is performed by the following formula:
Y o =Y i ·Y var +Y mean
in the formula, Y o Representing the actual value, Y, of the model output after normalization i Representing the output value of the model, Y, without normalization var Variance of model output sequence, Y mean The model outputs the mean of the sequence.
Compared with the prior art, the invention has the beneficial effects that:
1. the method adopts the improved butterfly optimization algorithm to optimize the HKELM for predicting the erosion degree of the pipeline, can improve the prediction accuracy of the maximum erosion rate of the pipeline erosion under the condition of multiphase flow, further ensures the safe production of pipeline transportation industries of petroleum, natural gas and the like, and avoids the economic loss and the reduction of the production efficiency.
2. The invention adopts the improved butterfly algorithm to improve the population initialization, the control factor of the fragrance intensity and the position updating formula of the global search and the local search, so that the algorithm has the characteristics of high convergence rate and high prediction precision and is more suitable for predicting the maximum erosion rate of the pipeline.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a flow chart of the present invention for optimizing HKLEM based on improved butterfly algorithm
FIG. 3 is a comparison graph of a predicted value and an experimental value of the wind power prediction method for optimizing HKLEM based on the improved butterfly algorithm.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
Referring to fig. 1-3, the present invention provides a technical solution: a pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM comprises the following steps:
s1, acquiring a plurality of groups of pipeline erosion experimental data, wherein the experimental data comprises pipeline material hardness, pipeline diameter, pipeline curvature radius, particle diameter, liquid flow rate, liquid viscosity, gas flow rate and pipeline maximum erosion rate, and performing mean processing on different prediction results generated by multiple experiments under the same experiment condition in the data to establish a data set;
in the step, pipeline erosion data are obtained from domestic and foreign documents; each set of experimental data comprises 7 influence factors of the hardness of the pipeline material, the diameter of the pipeline, the curvature radius of the pipeline, the diameter of particles, the flow rate of liquid, the viscosity of liquid and the flow rate of gas, and an experimental result of the influence factors, namely the maximum erosion rate of the pipeline. The collected experimental data are preprocessed, different prediction results generated by multiple experiments under the same experiment condition in the data are subjected to mean value processing, and the influence of the same input and multiple output on model prediction results is avoided.
S2, carrying out normalization processing on the data set, and dividing a training set and a test set, wherein the division ratio of the training set to the test set is 8: 2;
in this step, formula 1 is used for normalization, where formula 1 is:
in formula 1, X is normalized data, Xi is preprocessed data, and X is mean Is the mean of the corresponding feature sequence, X var Is the variance of the corresponding signature sequence;
the training set and the test set are divided in the normalized data set according to the 8:2 ratio. 80% were randomly drawn as the training set and the remaining 20% as the test set.
S3, determining a kernel function combination mode and corresponding kernel parameters of the HKELM;
in this step, the kernel function includes a polynomial kernel function, a gaussian kernel function, and a Sigmoid kernel function, and its specific expression and corresponding kernel parameters are as follows:
equation 2:
K Poly (x,x i )=(γ(x,x i )+1) d
equation 3:
K RBF (x,x i )=exp(-||x-x i || 2 /σ 2 )
equation 4:
K Sig (x,x i )=tanh(β(x,x i )+r)
in formula 2, K Poly (x,x i ) Is a polynomial kernel function, and gamma and d are kernel parameters thereof; in formula 3, K RBF (x,x i ) Is a Gaussian kernel function, and sigma is a kernel parameter thereof; in formula 4, K Sig (x,x i ) For Sigmoid kernel function, β and r are its kernel parameters.
The kernel function combination mode is pairwise weighted combination between two different kernel functions, and is expressed by the following formula 5:
equation 5:
K H (x,x i )=w×K 1 (x,x i )+(1-w)×K 2 (x,x i )
in formula 5, K H (x,x i ) Is a mixed kernel function, w is an influence factor of the mixed kernel function, K 1 (x,x i )、K 2 (x,x i ) Are different kernel functions.
S4, improving a butterfly algorithm;
in the step, in order to improve the optimizing capability of the butterfly optimization algorithm, chaotic mapping and nonlinear parameter control are added into the basic butterfly optimization algorithm, and a particle swarm algorithm is fused to obtain an improved butterfly algorithm;
the improved butterfly algorithm specifically comprises the following steps:
s4.1, setting population quantity pop and maximum iteration number Iter of improved butterfly algorithm max Switching probability p and optimizing parameter range, and initializing by using Singer chaotic mapping;
in the step, a butterfly population is initialized by Singer chaotic mapping; singer mapping is distributed between [0,1], random initialization is replaced by chaos, and the population can be distributed in a search space more uniformly; is realized by the following formula 6
Equation 6:
in equation 6, x k+1 Is the distribution after the k +1 iteration, x k The k-th distribution.
S4.2, calculating and sequencing the fitness and the fragrance intensity of all butterfly individuals, and storing the optimal fitness and the butterfly position information corresponding to the fitness;
in this step, the fitness function selects the mean square error between the predicted value and the experimental value, which is expressed by the following formula 7:
equation 7:
in equation 7, m is the number of output data, P i For the ith model predictor, M i The ith corresponding experimental value.
The fragrance intensity calculation formula is as follows, formula 8:
equation 8:
F=eI α
in formula 8, F is the concentration of the fragrance emitted from the butterfly, e is the sensory mode, I is the stimulation intensity, and α is the control factor of the fragrance intensity. The parameter alpha is set to be a fixed value in the original algorithm, so that the optimization efficiency of the algorithm is greatly reduced. The original algorithm is improved, a self-adaptive dynamic nonlinear parameter control strategy is provided, and the global search capability and the local search capability of the algorithm are effectively balanced. The calculation formula is as follows, formula 9:
in equation 9, α (t) represents the α value of the ith iteration, α 1 、α 2 Maximum and minimum values respectively set for alpha, delta is the adjustment factor for the control step length, Iter t For the current number of iterations, Iter max Is the maximum number of iterations of the algorithm.
S4.3, carrying out global search or local search on the butterfly population, and updating the butterfly position;
further, a specific implementation method of the method for performing global search or local search in S4.3 is as follows: in the step, the principle of a particle swarm algorithm is fused, and the speed updating formula and the position updating formula of the original butterfly algorithm are improved;
firstly, the speed of the algorithm is updated by adopting a related strategy of a particle swarm optimization algorithm, and the specific formula is as follows:
in the formula 10, V i t+1 And V i t Represents the speed of the ith butterfly at the iteration times t +1 and t, c 1 =c 2 0.5, a and b are random numbers in the interval (0,1), P best For the optimal position of the butterfly individual, G best For the global optimal position of the butterfly population, the value of epsilon is shown in the following formula 11:
equation 11:
in the formula 11, ∈ max =0.9,ε min =0.2。
Then, the position updating of the algorithm may have two states of global search and local search; the specific implementation method comprises the following steps: generating a random number r between [0,1], comparing it with a handover probability p; if the random number r > p, a global search of the improved algorithm is performed as follows, equation 12:
equation 12:
in equation 12, r ∈ [0,1]]The random number in (1) is selected,for the current number of iterations tTime-optimal butterfly position, F (x) i ) Representing the fitness value of the ith butterfly at the current iteration time.
If the random number r < p, then the local search of the improved algorithm is performed as follows:
equation 13:
in the formula 13, the first and second groups,and randomly calculating the positions of the two butterflies for the t-th iteration in the search space.
S4.4, adding 1 to the iteration times, calculating the fitness value of each individual and comparing the fitness value with the optimal fitness in the S4.2; and (5) obtaining the optimal fitness value again until the set maximum iteration times is reached, and outputting the optimal fitness value and the corresponding butterfly position.
S5, setting a HKELM parameter range, determining model parameters of an optimal prediction model by adopting an improved butterfly algorithm, and predicting by utilizing the model to obtain a prediction result;
in this step, the specific implementation method includes the following steps:
s5.1, substituting the optimal parameters determined in the S4 into the HKELM model;
s5.2, inputting the hardness of the pipeline material, the diameter of the pipeline, the curvature radius of the pipeline, the diameter of particles, the flow rate of liquid, the viscosity of the liquid and the flow rate of gas in the experimental data as models, outputting the maximum erosion rate in the experimental data as a model output, and outputting a group of pipeline erosion prediction results.
And S6, performing inverse normalization on the prediction result in the S5 to obtain an actual prediction result.
In this step, the output result in S5 needs to be denormalized to obtain the actual prediction result, and the denormalization is implemented by the following equation 14:
equation 14:
Y o =Y i ·Y var +Y mean
in formula 14, Y o Representing the actual value, Y, of the model output after normalization i Representing the output value of the model, Y, without normalization var Variance of model output sequence, Y mean The model outputs the mean of the sequence.
In order to prove the effectiveness and superiority of the algorithm, in this embodiment, 130 groups of data collected from domestic and foreign documents are taken as an example, and an algorithm program is written in MATLAB language, so that three prediction models are respectively constructed: the method comprises the steps of a prediction model (KELM) of a nuclear extreme learning machine, a prediction model (HKELM) of a hybrid nuclear extreme learning machine and a prediction model (IBOA-HKELM) of the hybrid nuclear extreme learning machine optimized based on the improved butterfly algorithm.
Selecting common evaluation indexes in regression prediction: mean Absolute Error (MAE), Root Mean Square Error (RMSE), coefficient of determination (R) 2 ) The predicted performance was evaluated. MAE, RMSE, R 2 The calculation formulas of (a) and (b) are respectively as follows:
equation 15:
equation 16:
equation 17:
in the formulas 15, 16 and 17, m is the number of samples, P i For the ith test value of the model, M i For the corresponding i-th actual value,is the average of the actual values.
The three models of KELM, HKELM and IBOA-HKELM were simulated, and the average values of the evaluation indexes of the three models, which were run 5 times, are shown in Table 1.
Table 1 shows the evaluation index statistical table of the model of the invention, the KELM model and the HKELM model
In Table 1, MAE, RMSE and R of prediction model of extreme learning machine 2 Are 0.00083058, 0.0011796 and 0.81 respectively, MAE, RMSE and R of the prediction model of the hybrid kernel extreme learning machine 2 0.00055277, 0.00097368 and 0.85 respectively, based on the improved butterfly algorithm of the invention to optimize the MAE, RMSE and R of the prediction model of the hybrid kernel extreme learning machine (IBOA-HKELM) 2 Are 0.00011631, 0.00043556 and 0.96, respectively. Obviously, the result of optimizing and predicting by using the improved butterfly algorithm optimizing extreme learning machine is better than the result of predicting by using the unoptimized hybrid kernel extreme learning machine and the conventional single kernel extreme learning machine. The improved butterfly algorithm based prediction method is used for improving the prediction precision of the optimized hybrid kernel extreme learning machine.
In the above embodiments, the butterfly algorithm and the hybrid kernel-limit learning machine model are the prior art and are well known to those skilled in the art; the piping material hardness, piping diameter, piping radius of curvature, particle diameter, liquid flow rate, liquid viscosity, gas flow rate, and maximum erosion rate of the piping used for the prediction are well known to those skilled in the art.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (9)
1. A pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM is characterized by comprising the following steps: the method comprises the following steps:
s1, acquiring experimental data of a plurality of groups of pipeline erosion, wherein the experimental data comprises pipeline material hardness, pipeline diameter, pipeline curvature radius, particle diameter, liquid flow rate, liquid viscosity, gas flow rate and pipeline maximum erosion rate, and performing mean processing on different prediction results generated by multiple experiments under the same experiment condition in the data to establish a data set;
s2, carrying out normalization processing on the data set, and dividing the training set and the test set according to the ratio of 8: 2;
s3, determining a kernel function combination mode and corresponding kernel parameters of the HKELM;
s4, improving a butterfly algorithm;
s5, setting a HKELM parameter range, determining model parameters of an optimal prediction model by adopting an improved butterfly algorithm, and predicting by using the model to obtain a prediction result;
and S6, performing inverse normalization on the prediction result in the S5 to obtain an actual prediction result.
2. The method for predicting pipeline erosion based on improved butterfly algorithm optimized HKELM according to claim 1, characterized in that: in S2, normalization is achieved by the following equation:
wherein X is normalized data, Xi is preprocessed data, and X is mean Is the mean of the corresponding feature sequence, X var Is the variance of the corresponding signature sequence.
3. The pipeline erosion prediction method based on the improved butterfly algorithm optimized HKELM of claim 1, characterized in that: in S3, the kernel functions include polynomial kernel functions, gaussian kernel functions, and Sigmoid kernel functions, and the specific expressions and corresponding kernel parameters thereof are as follows:
K Poly (x,x i )=(γ(x,x i )+1) d ;
K RBF (x,x i )=exp(-||x-x i || 2 /σ 2 );
K Sig (x,x i )=tanh(β(x,x i )+r)
in the formula, K Poly (x,x i )、K RBF (x,x i )、K Sig (x,x i ) Respectively a polynomial kernel function, a Gaussian kernel function and a Sigmoid kernel function; wherein γ and d are kernel parameters of a polynomial kernel function; sigma is the kernel parameter of the Gaussian kernel function, and beta and r are the kernel parameters of the Sigmoid kernel function;
the combination mode is a weighted combination between two different kernel functions, and the influence factor is w and is expressed as follows:
K H (x,x i )=w×K 1 (x,x i )+(1-w)×K 2 (x,x i )
in the formula, K H (x,x i ) Is a mixed kernel function, w is an influence factor of the mixed kernel function, K 1 (x,x i )、K 2 (x,x i ) Are different kernel functions.
4. The pipeline erosion prediction method based on the improved butterfly algorithm optimized HKELM of claim 1, characterized in that: in S4, the improved butterfly algorithm is to improve the optimizing capability of the butterfly optimization algorithm by adding chaotic mapping and nonlinear parameter control to the basic butterfly optimization algorithm and fusing particle swarm optimization;
the improved butterfly algorithm specifically comprises the following steps:
s4.1, setting population quantity pop and maximum iteration number Iter of improved butterfly algorithm max Switching the probability p, and initializing by using Singer chaotic mapping;
s4.2, calculating and sequencing the fitness and the fragrance intensity of all butterfly individuals, and storing the optimal fitness and the butterfly position information corresponding to the fitness;
s4.3, carrying out global search or local search on the butterfly population, and updating the butterfly position;
and S4.4, adding 1 to the iteration times, calculating the fitness value of each individual, comparing the fitness value with the optimal fitness value in the S4.2, obtaining the optimal fitness value again until the set maximum iteration times are reached, and outputting the optimal fitness value and the corresponding butterfly position.
5. The method for predicting the erosion of the pipeline based on the optimized HKELM based on the improved butterfly algorithm as claimed in claim 4, wherein: in S4.1, the Singer chaotic map is initialized and implemented by the following formula:
wherein x is k+1 For the distribution after iteration, x k Is the initial distribution.
6. The method for predicting the erosion of the pipeline based on the optimized HKELM based on the improved butterfly algorithm as claimed in claim 4, wherein: in S4.2, the fitness value is a calculation result of the fitness function, and a mean square error between the predicted value and the experimental value is selected as the fitness function, which is expressed as follows:
where m is the number of output data, P i For model prediction, M i Is an experimental value;
the aroma intensity calculation formula is as follows:
F=eI α
in the formula, F is the concentration of the butterfly emitting aroma, e is the sensory mode, I is the stimulation intensity, alpha is the control factor of the aroma intensity, and the self-adaptive dynamic nonlinear parameter control strategy is adopted, and the calculation formula is as follows:
in the formula, alpha (t) represents the alpha value of the ith iteration, alpha 1 、α 2 Maximum and minimum values respectively set for alpha, delta is the adjustment factor for the control step length, Iter t For the current number of iterations, Iter max Is the maximum number of iterations of the algorithm.
7. The method for predicting the erosion of the pipeline based on the optimized HKELM based on the improved butterfly algorithm as claimed in claim 4, wherein: in S4.3, a specific implementation method for performing the global search or the local search is as follows:
the speed of the algorithm is updated by adopting a related strategy of a particle swarm optimization algorithm, and the specific formula is as follows:
in the formula, V i t+1 And V i t Represents the speed of the ith butterfly at the iteration times t +1 and t, c 1 =c 2 0.5, a and b are random numbers in the interval (0,1), P best For the optimal position of the butterfly individual, G best For the global optimal position of the butterfly population, the value of epsilon is shown as the following formula:
in the formula, epsilon max =0.9,ε min =0.2;
Then, the position updating can have two states of global search and local search; the specific implementation method comprises the following steps: generating a random number r between [0,1], comparing it with a handover probability p; if the random number r is more than p, the global search is carried out according to the following formula
Wherein r is ∈ [0,1]]InThe number of the machines is increased,for the best butterfly position at the current iteration time t, F (x) i ) Representing the fitness value of the ith butterfly at the current iteration time;
if the random number r is less than p, then the local search is performed according to the following formula
8. The pipeline erosion prediction method based on the improved butterfly algorithm optimized HKELM of claim 1, characterized in that: the specific implementation method in S5 includes:
s5.1, substituting the optimal parameters determined in the S4 into a mixed kernel limit learning machine model;
s5.2, inputting the hardness of the pipeline material, the diameter of the pipeline, the curvature radius of the pipeline, the diameter of particles, the flow rate of liquid, the viscosity of the liquid and the flow rate of gas in the experimental data as models, outputting the maximum erosion rate in the experimental data as a model output, and outputting a group of pipeline erosion prediction results.
9. The pipeline erosion prediction method based on the improved butterfly algorithm optimized HKELM of claim 1, characterized in that: in S6, the inverse normalization is achieved by the following formula:
Y o =Y i ·Y var +Y mean
in the formula, Y o Representing the actual value, Y, of the model output after normalization i Representing the output value of the model, Y, without normalization var Variance of model output sequence, Y mean Model conveyerAnd (6) averaging the sequences.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210628962.6A CN115017808A (en) | 2022-06-06 | 2022-06-06 | Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210628962.6A CN115017808A (en) | 2022-06-06 | 2022-06-06 | Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115017808A true CN115017808A (en) | 2022-09-06 |
Family
ID=83073707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210628962.6A Pending CN115017808A (en) | 2022-06-06 | 2022-06-06 | Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115017808A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115515144A (en) * | 2022-10-12 | 2022-12-23 | 同济大学 | Heterogeneous AIoT ad hoc network signal full coverage method and device |
CN115665154A (en) * | 2022-09-27 | 2023-01-31 | 武汉轻工大学 | Cloud task allocation method and equipment |
CN118194649A (en) * | 2024-03-15 | 2024-06-14 | 中国矿业大学 | Method and device for predicting erosion rate of bent pipe of coal bed methane |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108805215A (en) * | 2018-06-19 | 2018-11-13 | 东北大学 | Based on the Dlagnosis of Sucker Rod Pumping Well dynamic liquid level flexible measurement method for improving drosophila algorithm |
CN113205228A (en) * | 2021-05-28 | 2021-08-03 | 河北工业大学 | Method for predicting short-term wind power generation output power |
CN113445972A (en) * | 2021-08-13 | 2021-09-28 | 西安石油大学 | Method and system for determining zonal water injection testing and regulating period of tight oil reservoir |
CN114266195A (en) * | 2021-12-10 | 2022-04-01 | 上海电力大学 | Metal pipeline corrosion rate prediction method based on MEA-BP model |
-
2022
- 2022-06-06 CN CN202210628962.6A patent/CN115017808A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108805215A (en) * | 2018-06-19 | 2018-11-13 | 东北大学 | Based on the Dlagnosis of Sucker Rod Pumping Well dynamic liquid level flexible measurement method for improving drosophila algorithm |
CN113205228A (en) * | 2021-05-28 | 2021-08-03 | 河北工业大学 | Method for predicting short-term wind power generation output power |
CN113445972A (en) * | 2021-08-13 | 2021-09-28 | 西安石油大学 | Method and system for determining zonal water injection testing and regulating period of tight oil reservoir |
CN114266195A (en) * | 2021-12-10 | 2022-04-01 | 上海电力大学 | Metal pipeline corrosion rate prediction method based on MEA-BP model |
Non-Patent Citations (1)
Title |
---|
张孟健: "群体智能算法在无线传感器网络中的研究", 硕士电子期刊, no. 5, 15 May 2022 (2022-05-15), pages 2 - 3 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115665154A (en) * | 2022-09-27 | 2023-01-31 | 武汉轻工大学 | Cloud task allocation method and equipment |
CN115665154B (en) * | 2022-09-27 | 2024-06-11 | 武汉轻工大学 | Cloud task allocation method and equipment |
CN115515144A (en) * | 2022-10-12 | 2022-12-23 | 同济大学 | Heterogeneous AIoT ad hoc network signal full coverage method and device |
CN115515144B (en) * | 2022-10-12 | 2024-06-04 | 同济大学 | Heterogeneous AIoT Ad hoc network signal full-coverage method and device |
CN118194649A (en) * | 2024-03-15 | 2024-06-14 | 中国矿业大学 | Method and device for predicting erosion rate of bent pipe of coal bed methane |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Tian et al. | Data driven parallel prediction of building energy consumption using generative adversarial nets | |
CN115017808A (en) | Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM | |
CN110705029B (en) | Flow field prediction method of oscillating flapping wing energy acquisition system based on transfer learning | |
CN105893694A (en) | Complex system designing method based on resampling particle swarm optimization algorithm | |
CN112084727A (en) | Transition prediction method based on neural network | |
CN110443428A (en) | A kind of air compressor group load forecasting method and its control equipment | |
Wang et al. | Solid particle erosion prediction in elbows based on machine learning and swarm intelligence algorithm | |
Qiang et al. | Research on knowledge-extraction technology in optimisation of ship-resistance performance | |
Guang et al. | Benchmark datasets for stochastic Petri net learning | |
CN113361047A (en) | Impeller high-dimensional optimization and model selection method for multilayer sensing structure | |
Tang et al. | A hydrodynamic prediction model of throttle orifice plate using space filling and adaptive sampling method | |
Mukesh et al. | Influence of search algorithms on aerodynamic design optimisation of aircraft wings | |
Zhang et al. | Data-model-interactive enhancement-based Francis turbine unit health condition assessment using graph driven health benchmark model | |
Tang et al. | Flow characteristic optimization of a multi-stage orifice plate using surrogate-based modeling and Bayesian optimization | |
CN114818203A (en) | Reducer design method based on SWA algorithm | |
Wang et al. | Estimation of wind pressure field on low-rise buildings based on a novel conditional neural network | |
Nemati et al. | A Data-Driven Machine Learning Approach for Turbulent Flow Field Prediction Based on Direct Computational Fluid Dynamics Database | |
Yu et al. | Energy performance prediction of pump as turbine (PAT) based on PIWOA-BP neural network | |
CN114282614B (en) | Medium-long runoff prediction method for optimizing CNN-GRU based on random forest and IFDA | |
Yao et al. | Establishing the energy consumption prediction model of aluminum electrolysis process by genetically optimizing wavelet neural network | |
Hu et al. | An Adaptive Parallel EI Infilling Strategy Extended by Non-Parametric PMC Sampling Scheme for Efficient Global Optimization | |
Liu et al. | Research on soft sensor modeling method for complex chemical processes based on local semi-supervised selective ensemble learning | |
Cao et al. | Symbolic Regression Using Genetic Programming with Chaotic Method-Based Probability Mappings | |
Ananthajit et al. | Training of Neural Network on Selectively Generated Data for Flow over Airfoils at Higher Angle of Attack | |
Wang et al. | Solution Concentration Diffusion Prediction Using RBF Neural Network |
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 |