Thunderstorm disaster prediction based on enhanced GWO optimized BP neural network

. Aiming at the problem that traditional BP algorithm is prone to fall into local optimum when carrying out thunderstorm disaster prediction, a thunderstorm disaster prediction method based on BP neural network optimized by enhanced GWO algorithm is proposed in this paper. Firstly, the global search capability of GWO is enhanced by introducing clone mutation operation in genetic algorithm and position update idea in particle swarm optimization, and the convergence speed of the algorithm is improved. Then, the BP neural network weight and threshold optimized by the enhanced GWO algorithm are used to build the network model and predict the occurrence of thunderstorm disasters. Simulation results show that compared with the original BP algorithm, GWO-BP algorithm and PSO-BP algorithm, the improved IPSGWO-BP algorithm improves the accuracy of thunderstorm disaster prediction by 13.33%, 12.50% and 8.33%, respectively. Meanwhile, the null alarm rate is lower, the optimization ability is stronger, and the convergence speed is faster.


Introduction
Thunderstorm is a very harmful weather phenomenon, which has the characteristics of local and strong short time, sometimes accompanied by local rainstorm and strong wind. It not only interferes with the safe operation of communication, power transmission and computer network, but also often destroys buildings, kills people and animals, and causes fires [1] . China is a disaster area heavily hit by lightning, the most serious is in the south of Guangdong Province. The natural lightning disasters in Dongguan, Shenzhen and Huizhou have reached the highest level in the world, among which Dongguan suffers the most serious lightning disaster. From May to August every year, the GDP loss caused by lightning in Dongguan reaches 6%, resulting in tens of millions of economic losses [2] . Raloff J [3] and Gillis J [4] proposed that extreme weather would increase in the future. Therefore, it is of great significance to further improve the ability of thunderstorm extreme weather prediction and to predict thunderstorm weather in a certain period of time in a local area, so as to facilitate meteorologists to predict and deal with meteorological problems in time.
As the research focus of weather prediction, scholars and researchers at home and abroad have done a lot of research work [5] . In order to better discover the regularity of thunderstorm activity, literature [2] proposed an improved DBScan algorithm to conduct clustering analysis on the regularity of lightning, so as to find more accurate regularity of thunderstorm activity. Literature [6] uses Hadoop platform to realize naive Bayes algorithm for thunderstorm disaster prediction, which has higher prediction accuracy and lower false positive rate compared with other algorithms. Literature [7] builds a thunderstorm prediction model based on historical meteorological data and uses machine learning algorithm HY-FMV algorithm to predict thunderstorms in the next 3 hours to improve the accuracy of thunderstorm prediction, but the improvement range is relatively low. Although the algorithm mentioned above are of thunderstorm disasters are analyzed and predicted, but the prediction accuracy is low, and the neural network as a kind of advanced machine learning algorithms in the thunderstorms forecast also related applications, such as the literature [8] proposed a CNN and RNN thunderstorm weather prediction model to predict the risk of thunderstorms in the Beijing area the next 6 hours, Experimental results show that CNN-RNN algorithm has a good thunderstorm prediction accuracy, but the proposed model is complicated and difficult to be used in engineering practice. However, in literature [9], BP neural network with relatively low complexity is used for thunderstorm potential prediction, which not only ensures accuracy but also reduces the complexity of the model. As is known to all, although BP neural network has good predictive performance, it is prone to fall into local optimal and over-fitting problems, which are its important defects [10]. Researchers at home and abroad have also adopted meta-heuristic algorithm to improve it. Literature [11] uses genetic algorithm to improve the problem that BP neural network is prone to fall into local extremisms. However, compared with other meta-heuristic algorithms, genetic algorithm has poor optimization ability. Therefore, a novel Grey Wolf Optimization Algorithm (GWO) with stronger searching ability was used in literature [12][13][14] to optimize the relevant parameters of BP neural network to reduce the risk of over-fitting problems in BP neural network. Experiments on the same data show that the algorithm has higher optimization ability and more accurate classification and prediction results.
Although the above literature has achieved some results by using GWO algorithm to optimize BP neural network, GWO algorithm itself is easy to fall into local extreme value. Therefore, this paper proposes a thunderstorm disaster prediction method by enhancing GWO algorithm to optimize BP neural network.

IPSGWO optimized BP neural network prediction model
In order to avoid the premature convergence of GWO algorithm, this paper introduces the improved GWO algorithm based on immune cloning theory [15] and particle swarm location update idea. Immune cloning operation selects elite individuals from the population and clonally mutates them, so as to increase the diversity of the population and avoid the premature convergence of the algorithm. Then, the idea of individual position change of a single gray wolf is introduced to increase a certain mutation ability to the change of gray wolf position, so as to improve the global search ability of the algorithm.

Enhanced GWO algorithm
In order to deeply tap the individual optimization potential of gray wolf, expand the search scope of gray wolf population and increase the diversity of gray wolf population, immune ITM Web of Conferences 47, 01017 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701017 clonal selection operation is applied to GWO algorithm in this paper. In addition, this paper applies the idea of particle swarm optimization location update to gray wolf location update to avoid the premature convergence of GWO algorithm. Therefore, this paper adjusts the update formula of gray wolf position, as shown in equation (1): Among them, the speed change ( ) t v of each gray wolf is expressed as equation (2): Among them, w is a random value between [0,1]. Through a large number of experimental analysis, when the value of w is between 0.6 and 1, the designed algorithm has relatively good solution performance. The closer w is to 1, the stronger the gray wolf individual's global exploration ability is, and the closer w is to 0.6, the better the local solution ability is; 7 r ， 8 r ， 9 r are also random values between [0,1], 1 C , 2 C , 3 C represent the coefficient vector, and the value range is [1,2]; represents the current position of the gray wolf.
In summary, the improved algorithm is denoted as enhanced GWO Algorithm (IPSGWO), and its steps are shown in table 1:

IPSGWO optimized BP neural network model
When training the network model of BP neural network, because the weight update of the input and output layers of BP neural network adopts a local search algorithm, it can not escape the local maximum, so many training may have different results. Therefore, this paper uses IPSGWO algorithm to optimize BP neural network. The specific strategy is to take the weight and threshold of each layer of BP neural network as each gray wolf in IPSGWO algorithm. With the adjustment of the position of each gray wolf, the weight and threshold of BP neural network will also be updated in a better direction. Record the final α wolf position as the optimal weight and threshold of the network. The detailed algorithm steps are as follows: Step 1: select the appropriate BP neural network structure, initially set the weight and threshold of each layer, and define the reasonable number of neurons in the hidden layer according to the empirical formula ( [0,10]) m l n a a = + + ∈ , where l is the number of neurons in the input layer, n is the number of neurons in the output layer, and the value of a can be determined by trial and error method for specific problems; Step 2: The initialized weights and thresholds are taken as the gray wolf individual. Meanwhile, the upper limit of iteration times and relevant parameters of IPSGWO algorithm were determined.
Step 3: Take the mean square error of BP neural network training as the fitness function value; Step 4: Execute the IPSGWO algorithm according to table 1; Step 5: If the IPSGWO algorithm reaches the upper limit of iteration times, save the final Wolf α individual, and use the weights and thresholds corresponding to α Wolf to build BP neural network. Otherwise, repeat step 3 to Step 4.
Step 6: Calculate the input and output values of each layer of the network, then adjust the weights and thresholds of each layer by BP algorithm, and calculate the mean square ITM Web of Conferences 47, 01017 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701017 deviation of each training; Step 7: If the algorithm meets the set precision value, stop the network training and get a better network model. Otherwise, repeat step 6; Step 8: Input the test set to test the obtained optimal network model.  The fitness values of α, β and δ wolves and their corresponding positions X α , X β and X δ were updated; l = l +1; end while Output the position Xα of α Wolf and the fitness function value of α Wolf; End

Analysis of simulation results
The experimental hardware environment of the algorithm proposed in this paper is inter(R) core(TM) i5-3450 CPU@3.10GHz, memory of 12GB and hard disk size of 500GB. The simulation software used in the experiment is matlab 2017a. Four representative UCI data sets and thunderstorm disaster data are used for simulation verification of the algorithm in this paper. UCI datasets are Iris, Wine, CMC and Glass respectively. See table 2 for detailed attributes:

Performance analysis of IPSGWO-BP algorithm
In order to verify the algorithm performance, IPSGWO-BP algorithm, GWO-BP algorithm, PSO-BP algorithm and the original BP algorithm were simulated and compared on the ITM Web of Conferences 47, 01017 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701017 same data set. In the simulation experiment, the population size was set as 30, and the number of experiments was 300. The experimental accuracy is shown in table 3.  According to the comparison of classification accuracy of four algorithms in table 3, the IPSGWO-BP algorithm described in this paper has high accuracy (all above 93%) and its results are stable in each data set.
In order to verify the convergence speed and optimization efficiency of IPSGWO-BP algorithm, the fitness function value convergence curve was used to compare GWO-BP algorithm and PSO-BP algorithm, and the simulation results were shown in figure 1.
From figure 1, IPSGWO-BP algorithm has better optimization ability (lower mean square error) than GWO-BP algorithm and PSO-BP algorithm, and the algorithm itself has a faster convergence speed. This is because the idea of particle swarm optimization position updating is introduced in the gray wolf position updating. Thus, the exploration ability of the original GWO algorithm in the solution space is increased, and the execution efficiency of the algorithm is improved.

Analysis of IPSGWO-BP algorithm for thunderstorm disaster prediction results
The meteorological factors used in this paper are the NCEP 0.125*0.125 historical reanalysis data collected by national Center for Atmospheric Research (NCAR) and National Center for Environmental Prediction (NCEP) from June to September, 2008 to 2010. And the thunderstorm disaster data are the daily data of thunderstorm disaster in Beijing at the same time and latitude and longitude. This paper refers to reference [16] to select the appropriate meteorological factors as the prediction factors of thunderstorm disasters. The number of meteorological factors selected in this paper is 28, including U wind (longitude wind), V wind (latitude wind), temperature and relative humidity of NCEP historical reanalysis data at 500Hpa, 600Hpa, 700Hpa, 775Hpa, 850Hpa, 925Hpa and 1000Hpa. In order to balance the distribution of data on the days of thunderstorms and non-thunderstorms, a total of 366 pieces of data were selected from all integrated data, of which 246 were used for training and 120 for testing.
After different tests, the hidden layer number is set as 1 in the simulation experiment for thunderstorm disaster prediction. The learning rate was set at 0.03.
In addition to accuracy, critical success index (CSI) and false alarm rate (FAR) are introduced to evaluate the evaluation index. TP is set as: there are actual and predicted thunderstorm disasters. FN is set to: there is actual thunderstorm disaster, but no thunderstorm disaster is predicted. FP is set as: there is no actual thunderstorm disaster, but thunderstorm disaster is predicted. TN is set to neither actual nor predicted thunderstorms. The formulas for CSI and FAR are as equation (3) and (4): The prediction results of the four algorithms are shown in table 4, and the prediction classification results of the four algorithms are shown in figure 2(in order to display the prediction results more clearly, each prediction result is shifted upward by two units in turn).
As can be seen from table 4 and figure 2, compared with the original BP algorithm, PSO-BP algorithm and GWO-BP algorithm, IPSGWO-BP algorithm is 13.33%, 12.50% and 8.33% higher than the other three prediction algorithms. At the same time, IPSGWO-BP algorithm has higher CSI and lower FAR. From figure 2, IPSGWO-BP thunderstorm disaster prediction model is closer to the real results compared with the other three algorithms. In order to better display the performance of IPSGWO-BP algorithm, figure 3 shows the fitness convergence comparison curve of the three algorithms. As can be seen from figure 3, the IPSGWO-BP algorithm can quickly enter the strong optimization ability than GWO-BP algorithm and PSO-BP algorithm.

Conclusion
Aiming at the problem that the traditional BP neural network is prone to fall into the local optimum and cause too large prediction error in thunderstorm disaster prediction, this paper proposes a thunderstorm disaster prediction method that enhances the GWO algorithm to optimize BP neural network. The immune cloning operation was used to clone and mutate elite gray wolves to increase their ability of deep exploration. And particle swarm optimization (PSO) is introduced to improve the ability of the algorithm to jump out of local optimum. Simulation results show that compared with the original BP algorithm, the proposed algorithm has higher accuracy and lower FAR, and has better optimization ability and faster convergence speed compared with PSO-BP algorithm and GWO-BP algorithm. To a certain extent, it provides a more reasonable and efficient prediction algorithm for the research of thunderstorm disaster prediction, so as to achieve a more real-time and accurate reminder before thunderstorm disaster, and reduce the occurrence of thunderstorm disaster accidents.