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 PDF

Info

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
Application number
CN202210628962.6A
Other languages
Chinese (zh)
Inventor
王治国
陈浩宇
程嘉瑞
王文娟
张锋
阳光
窦益华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Shiyou University
Original Assignee
Xian Shiyou University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xian Shiyou University filed Critical Xian Shiyou University
Priority to CN202210628962.6A priority Critical patent/CN115017808A/en
Publication of CN115017808A publication Critical patent/CN115017808A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/14Pipes

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

Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM
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:
Figure BDA0003678755270000021
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 || 22 );
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:
Figure BDA0003678755270000031
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:
Figure BDA0003678755270000032
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:
Figure BDA0003678755270000041
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:
Figure BDA0003678755270000042
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:
Figure BDA0003678755270000043
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
Figure BDA0003678755270000044
Wherein r is ∈ [0,1]]The random number in (1) is selected,
Figure BDA0003678755270000045
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
Figure BDA0003678755270000046
In the formula (I), the compound is shown in the specification,
Figure BDA0003678755270000051
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:
Figure BDA0003678755270000061
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 || 22 )
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:
Figure BDA0003678755270000071
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:
Figure BDA0003678755270000081
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:
Figure BDA0003678755270000082
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:
Figure BDA0003678755270000083
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:
Figure BDA0003678755270000091
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:
Figure BDA0003678755270000092
in equation 12, r ∈ [0,1]]The random number in (1) is selected,
Figure BDA0003678755270000093
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:
Figure BDA0003678755270000094
in the formula 13, the first and second groups,
Figure BDA0003678755270000095
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:
Figure BDA0003678755270000101
equation 16:
Figure BDA0003678755270000102
equation 17:
Figure BDA0003678755270000103
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,
Figure BDA0003678755270000104
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
Figure BDA0003678755270000111
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:
Figure FDA0003678755260000011
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 || 22 );
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:
Figure FDA0003678755260000021
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:
Figure FDA0003678755260000031
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:
Figure FDA0003678755260000032
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:
Figure FDA0003678755260000033
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:
Figure FDA0003678755260000034
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
Figure FDA0003678755260000035
Wherein r is ∈ [0,1]]InThe number of the machines is increased,
Figure FDA0003678755260000036
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
Figure FDA0003678755260000041
In the formula (I), the compound is shown in the specification,
Figure FDA0003678755260000042
and randomly searching the positions of the two butterflies for the t-th iteration in the search space.
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.
CN202210628962.6A 2022-06-06 2022-06-06 Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM Pending CN115017808A (en)

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 (1)

* Cited by examiner, † Cited by third party
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

Cited By (1)

* Cited by examiner, † Cited by third party
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

Similar Documents

Publication Publication Date Title
Tian et al. Data driven parallel prediction of building energy consumption using generative adversarial nets
CN112084727A (en) Transition prediction method based on neural network
Palar et al. Efficient global optimization with ensemble and selection of kernel functions for engineering design
CN110443428A (en) A kind of air compressor group load forecasting method and its control equipment
Tao et al. Evolutionary gate recurrent unit coupling convolutional neural network and improved manta ray foraging optimization algorithm for performance degradation prediction of PEMFC
Wang et al. Solid particle erosion prediction in elbows based on machine learning and swarm intelligence algorithm
CN115017808A (en) Pipeline erosion prediction method based on improved butterfly algorithm optimization HKELM
CN113361047B (en) Impeller high-dimensional optimization and model selection method for multilayer sensing structure
Guang et al. Benchmark datasets for stochastic Petri net learning
Tang et al. A hydrodynamic prediction model of throttle orifice plate using space filling and adaptive sampling method
Meng et al. A genetic algorithm using K-path initialization for community detection in complex networks
Mukesh et al. Influence of search algorithms on aerodynamic design optimisation of aircraft wings
Lee et al. Deep residual neural network for predicting aerodynamic coefficient changes with ablation
CN114818203A (en) Reducer design method based on SWA algorithm
CN115270363A (en) Centrifugal compressor blade optimization design method and device based on multi-agent model
Lu et al. Quantum Wolf Pack Evolutionary Algorithm of Weight Decision‐Making Based on Fuzzy Control
Tang et al. Flow characteristic optimization of a multi-stage orifice plate using surrogate-based modeling and Bayesian optimization
Zhang et al. Spatial weighted graph-driven fault diagnosis of complex process industry considering technological process flow
Nemati et al. A Data-Driven Machine Learning Approach for Turbulent Flow Field Prediction Based on Direct Computational Fluid Dynamics Database
Li et al. Improved teaching-learning-based optimization algorithm for modeling NOX emissions of a boiler
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

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