Optimized ENN model based on gravity search algorithm for predicting erosion depth of ball valve used in natural gas pipeline
Many factors affect the erosion depth of natural gas pipeline ball valves.To more accurately predict the erosion depth of ball valves,a prediction model was established using machine learning algorithms.Considering the shortcomings of the traditional Elman neural network model(easy to fall into local minima and weak generalization ability)and the many advantages of the gravity search algorithm during the prediction process,an optimized Elman Neural Network(ENN)model is established by introducing the gravity search algorithm and the erosion depths of natural gas pipeline ball valves are predicted.The differences in prediction results between the optimized model and the traditional model are compared and analyzed,and the influences of population size and the number of hidden layer nodes on the prediction accuracy of the optimized model are explored.The calculation results of the example show that the average relative error and mean square error predicted by the traditional model are 14.382%and 0.042 5,respectively.The average relative error and mean square error predicted by the optimized model are 3.850%and 0.003 9,respectively.Therefore,the prediction accuracy of the optimized model is significantly higher than that of the traditional model.In the case of a population size is 30 and the number of iterations is 50,as the number of hidden layer nodes increases,the prediction accuracy of the optimized model first increases and then decreases.When the number of hidden layer nodes is 10,the prediction accuracy of the optimized model is the highest.In the case of the hidden layer nodes is 10 and the number of iterations is 50,as the population size increases,the prediction accuracy of the optimized model shows a trend of first increasing,then decreasing,and then increasing again.When the population size is 30,the prediction accuracy of the optimized model is the highest.Therefore,larger population size and the number of hidden layer nodes do not necessarily mean higher prediction accuracy of the optimized model.Overall,when the population size and the number of hidden layer nodes are different,the prediction accuracy of the optimized model is always higher than that of the traditional model,and it has good reliability.