In recent years,with the development of the national economy,the consumption of natural gas has increased year by year.After the country proposed the "dual carbon" goal,natural gas is ushering in a golden period of development,so it is particularly important to make highprecision prediction of natural gas load.Although the existing natural gas load prediction model can predict them,the parameters of the prediction model are affected by human subjectivity,resulting in the prediction accuracy of the model needs to be improved.The swarm intelligence algorithm has the characteristics of simple structure,strong stability,parallel computing,and great advantages in solving complex problems,so the emergence of swarm intelligence algorithm provides a new idea for the selection of model parameters.Based on the traditional Sparrow Search Algorithm(SSA),this paper uses three sets of benchmark functions for comparative experiments,and then combines wavelet transform,improved Sparrow Search Algorithm(SWT-SSA)and Long Short-Term Memory(LSTM)into a prediction model,and applies this model to the field of natural gas load forecasting.This article mainly focuses on the following points:(1)An improvement strategy is proposed to view the shortcomings of the traditional sparrow search algorithm.Firstly,the Sobol sequence with good uniformity and traversability is used to generate the initial population,which can improve the initial distribution quality of the sparrow population to a certain extent;Then,an adaptive weight W is introduced,and the weight value changes with the change of the number of iterations,which improves the ability of the algorithm to jump out of the local optimal and search for the optimal solution globally;Finally,the T-distribution enhances the diversity of the population in the late search period,and further increases its ability to jump out of the local optimal.(2)Design three sets of test functions to verify the performance of SWT-SSA.The local development ability and global search capability of SWT-SSA are tested through 6 highdimensional unimodal test functions,4 high-dimensional multimodal test functions and 3 lowdimensional test functions.SWT-SSA is compared with the traditional ant colony algorithm(ACO),cuckoo algorithm(CS),particle swarm algorithm(PSO),sparrow search algorithm(SSA)and three other improved sparrow search algorithms(S-SSA,T-SSA and ST-SSA).The results show that the SWT-SSA proposed in this paper has faster convergence speed,higher convergence accuracy and stronger convergence stability than other algorithms.(3)SWT-SSA is applied to the field of natural gas load forecasting,and a new combinatorial forecasting model is proposed: a swarm optimization deep learning prediction model for natural gas load.Firstly,MAPE,RMSE and MAE are used to compare the prediction performance of traditional LSTM,BPNN,ELM,WNN and FNN,and it is found that the prediction accuracy of LSTM is high;Secondly,SWT-SSA optimization LSTM,WT and LSTM combined models are used to predict natural gas load,and it is found that the prediction accuracy has been further improved,and on this basis,a deep learning prediction model for natural gas load optimization is proposed;This model combines five wavelets(Symlets wavelets,Coiflets wavelets,Fejer-Korovkin wavelets,Haar wavelets and Discrete-Meyer wavelets),SWT-SSA algorithm and LSTM model and applies them to natural gas load forecasting,the prediction results show that the prediction accuracy of Discrete-Meyer wavelet7-SWT-SSA-LSTM combined models reaches 99.14%,which is higher than that of other prediction models;Finally,multi-step prediction(2-step prediction,3-step prediction and 4-step prediction)is carried out on this conclusion,and the prediction accuracy is 98.54%,97.91%and 97.58%,respectively,which achieves the expected effect,which verifies that this model is not only suitable for single-step prediction but also multi-step prediction.This conclusion can provide a reference for urban gas supply,online application of natural gas engineering,and wavelet transform in other prediction scenarios. |