A short-term wind power forecasting method
The VMD algorithm is used to decompose wind power and wind speed data, and combined with the Copula entropy method and Hampel criterion, the fireworks algorithm is improved to optimize the LSTM network, which solves the problem of low short-term wind power prediction accuracy and achieves higher prediction accuracy and stability.
Patent Information
- Application Number
- CN202210633967.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-06-06
AI Technical Summary
Existing short-term wind power power prediction methods have unstable prediction accuracy when wind power power fluctuates greatly, and it is difficult to effectively reduce wind power power prediction errors.
The variational mode decomposition (VMD) algorithm is used to decompose wind power and wind speed data, a prediction model is established based on the Copula entropy method and Hampel criterion, and the number of hidden layer nodes and learning efficiency of the LSTM network are optimized through the improved fireworks algorithm to construct Accurate wind power prediction model.
It improves the accuracy of wind power power prediction, reduces the impact of noise on prediction, enhances the global optimization capability of the model, and significantly reduces prediction errors.
Smart Images

Figure CN115018156B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of wind power prediction, and in particular relates to a short-term wind power prediction method. Background Art
[0002] In recent years, wind power generation has continued to rise, but wind power generation is affected by the weather and has great intermittency and volatility, which greatly increases the difficulty of large-scale grid-connected operation of wind power generation. If the output power of wind power generation can be effectively predicted, the problems caused by wind power grid connection can be greatly improved. At present, there are two main methods for short-term wind power generation prediction. The first is a physical method, which is mainly based on detailed geographic information around the wind power station and numerical weather forecasts, such as solar irradiation time, irradiation intensity, wind speed, wind direction, temperature and other meteorological data and physical data as input parameters. Based on fluid mechanics modeling, the predicted value of output power is calculated through the wind power output curve. When the climate changes, the prediction performance will be greatly affected. The other is a statistical prediction method, which is to find the inherent statistical laws from a mathematical perspective based on a large amount of long-term historical output power data, and use learning models to predict future output power based on past output power. Statistical methods can generally be divided into two categories, namely, prediction models based on time series and prediction models based on artificial intelligence. Commonly used methods in artificial intelligence technology include artificial neural network (ANN), support vector machine (SVM) and random forest (RF). However, due to the large volatility of wind power, the prediction performance of a single artificial neural network is unstable and needs to be further improved to improve the prediction accuracy. Summary of the invention
[0003] Purpose of the invention: In view of the problems existing in the prior art, the present invention discloses a short-term wind power forecasting method, which realizes short-term wind power forecasting and achieves the goal of reducing wind power forecasting errors.
[0004] Technical solution: To achieve the above-mentioned invention object, the present invention adopts the following technical solution:
[0005] A short-term wind power prediction method comprises the following steps:
[0006] S1. Decompose the historical wind power data and wind speed data using VMD algorithm to obtain K1 wind power IMF components with different center frequencies and K2 wind speed IMF components;
[0007] S2. Use the Copula entropy method and Hampel criterion to establish a prediction input-output model, and select the wind speed IMF component that has a close correspondence with each wind power IMF component;
[0008] S3, respectively establish an LSTM prediction model for each wind power IMF component and train it, use the wind speed IMF component that is closely related to each wind power IMF component in step S2 as the input of the prediction model, and use the wind power IMF component as the output of the prediction model, wherein the improved fireworks algorithm is used to optimize the number of hidden layer nodes and learning efficiency of the LSTM prediction model;
[0009] S4. Taking the predicted day wind speed IMF component that has a close correspondence with each wind power IMF component in step S2 as input, output the corresponding predicted day wind power IMF component predicted value, and finally add up each wind power IMF component predicted value to obtain the wind power data predicted value of the final predicted day.
[0010] Preferably, step S2 comprises the following steps:
[0011] S21. Empirical Copula density function f(x) of estimated decomposed wind power IMF component and wind speed IMF component:
[0012] f(x)=rank(x) / N
[0013] Where x is the wind power IMF component or wind speed IMF component, N is the number of data contained in the IMF component x, and rank(x) indicates ranking the data in the IMF component x in reverse order of numerical value;
[0014] Then the k1th wind power IMF component IMF1 k1 , its empirical Copula density function for:
[0015]
[0016] k2th wind speed IMF component IMF2 k2 , its empirical Copula density function for:
[0017]
[0018] S22, estimate the Copula entropy value between each wind power IMF component and all wind speed IMF components through the K-nearest neighbor algorithm, and take the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 For example, calculate the Copula entropy CE between themk1,k2 :remember
[0019]
[0020] Among them, ψ(·) is the Digamma function, ε(n) is the Euler distance from x(n) to its third neighbor value, specifically: if the distance The third closest Euler distance is but:
[0021]
[0022] By analogy, solve the k1th wind power IMF component IMF1 k1 and the Copula entropy values of other wind speed IMF components, forming the set CE k1 , then CE k1 There are K2 values in total, CE k1 ={CE k1,1 ,CE k1,2 ,…,CE k1,K2};
[0023] S23, calculate the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 The Hampel distance between:
[0024]
[0025] d k1 (k2)=|CE k1,k2 -CE k1 (0.5) |
[0026] d k1 ={d k1 (1),d k1 (2),…,d k1 (K2)}
[0027] Among them, H k1 (k2) is the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 Hampel distance, CE k1 (0.5) For the collection CE k1 the median of For the set d k1 The median of k1(k2) is greater than 3, the k2th wind speed IMF component is selected as the wind speed IMF component that has a close correspondence with the k1th wind power IMF component;
[0028] By analogy, according to step S22 and step S23, a wind speed IMF component closely corresponding to each wind power IMF component can be obtained.
[0029] Preferably, in step S3, an improved fireworks algorithm is used to optimize the number of hidden layer nodes and learning efficiency of the LSTM prediction model, including: the objective function is:
[0030]
[0031] Among them, N is the number of prediction time nodes of the prediction day, is the wind power IMF component forecast value at the nth forecast time node on the forecast day, x n is the actual value of the IMF component of wind power at the nth forecast time node on the forecast day;
[0032] The specific steps of the improved fireworks algorithm to optimize the number of hidden layer nodes and learning efficiency of the LSTM prediction model are:
[0033] S31, initialization parameters, including the number of fireworks M, the maximum number of iterations T, the number of mutant sparks m, the number of explosions s, the initial value of the explosion radius r, the variable upper limit UB and the variable lower limit LB;
[0034] S32. Generate the initial fireworks population, and introduce the Tent chaos map and reverse population learning strategy. The Tent chaos map expression is:
[0035]
[0036] Z i,j =(UB-LB)×rand+LB
[0037] Among them, Z i,j represents the initial fireworks individual of the Tent chaotic map, i is the fireworks serial number, j = 1, 2, ..., J-1, J is the number of variables, rand represents randomly selecting a number in the interval [0, 1], u∈[0, 1], and after obtaining the Tent chaotic map sequence, the initial population is obtained according to the following formula, including M fireworks:
[0038] X=(UB-LB)×Z+LB
[0039] Reverse population, including M fireworks:
[0040] X′=UB+LB-X
[0041] Calculate the fitness of the fireworks in the initial population and the reverse population, and select the first M fireworks according to the fitness value to enter the iterative operation;
[0042] S33, enter iteration, the initial iteration number is 0, and the explosion radius and explosion number of each firework are calculated according to the following formula:
[0043]
[0044]
[0045] Among them, fr(i) is the explosion radius of the i-th firework, f(i) is the individual fitness of the i-th firework, and f min is the minimum fitness in the fireworks population, f max is the maximum fitness in the fireworks population, fn(i) is the number of sparks generated by the i-th firework, θ is a machine minimum to avoid division by zero, and the minimum value generated each time is different;
[0046] S34, select the i-th firework individual x(i) and generate explosion sparks ex i :
[0047] ex i,j =x i,j +fr(i)×(2×rand(1,J)-1)
[0048] Among them, ex i,j For explosion spark ex i The jth variable in x i,j is the jth variable in the firework individual x(i), rand(1,J) is a number randomly selected in the interval (1,J), and J is the number of variables;
[0049] Merge the fireworks population and the generated explosion spark population into a new population, and randomly select m individuals from it to generate the Cauchy mutation spark mx i , and consider whether to retain the Cauchy mutation spark according to the simulated annealing principle. The mutation formula is as follows:
[0050] mx i,j =x i,j +x i,j ×Cauchy(0,1)
[0051] Among them, mx i,j Spark MX for Cauchy variant i The j-th variable in , Cauchy(0,1) is the standard Cauchy distribution function;
[0052]
[0053]
[0054] Among them, f(x i ) is the fitness of the fireworks individual before Cauchy mutation, f(mx i ) is the individual fitness of the Cauchy mutation spark, W is the current temperature, W0 is the initial temperature, and t is the current number of iterations; if P = 1, the Cauchy mutation spark is retained, otherwise it is not retained;
[0055] Check whether the newly generated spark exceeds the limit, and map the spark that exceeds the limit. If it exceeds the upper limit, take the upper limit value, and if it exceeds the lower limit, take the lower limit value;
[0056] S35, calculating the fitness values of the explosion sparks and the Cauchy mutation sparks, and comparing them with the fitness value of the fireworks, arranging all individuals in ascending order according to the fitness values, selecting the first M individuals to enter the next iteration, and increasing the number of iterations by 1;
[0057] S36. Determine whether the current number of iterations is less than the maximum number of iterations T. If so, return to step S33 to continue iterating, otherwise terminate the calculation and output the fireworks individual with the smallest fitness and the fitness value. The fireworks individual with the smallest fitness is the optimal number of hidden layer nodes and learning efficiency of the LSTM prediction model.
[0058] Beneficial effects: Compared with the prior art, the present invention has the following significant beneficial effects:
[0059] 1. The present invention uses the VMD algorithm to decompose the original wind speed data and wind power data, which can reduce the error impact of noise on wind power prediction and make the prediction more accurate;
[0060] 2. The present invention uses the Copula entropy method and the Hampel criterion to select the relationship between the decomposed wind speed IMF component and the wind power IMF component, thereby establishing an accurate prediction input and output model;
[0061] 3. The present invention improves the traditional fireworks algorithm, making it capable of global optimization and escaping from the local optimal solution, and uses it to optimize the LSTM network to make the final wind power prediction more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 This is a flow chart of the wind power prediction method of the present invention;
[0063] Figure 2 Schematic diagram of wind power data and wind power IMF components after VMD decomposition;
[0064] Figure 3 Schematic diagram of wind speed data and wind speed IMF components after VMD decomposition;
[0065] Figure 4Flowchart for optimizing the LSTM prediction model for the improved Fireworks algorithm;
[0066] Figure 5 The figure is a comparison diagram between the wind power of a certain wind farm predicted by the wind power prediction method of the present invention and the actual wind power. DETAILED DESCRIPTION
[0067] The present invention will be further described below in conjunction with the accompanying drawings.
[0068] The present invention discloses a short-term wind power prediction method. Figure 1 As shown, the following steps are included:
[0069] Step S1: Decompose the original wind power data and wind speed data using the variational mode decomposition (VMD) algorithm to obtain K1 wind power intrinsic mode function (IMF) components with different center frequencies and K2 wind speed IMF components.
[0070] The VMD algorithm decomposes a sequence f(n) into K IMF components u with specific center frequencies. k , and all IMF components u k The objective function is to minimize the sum of the estimated bandwidths of all IMF components u k The sum is equal to f(n) as the constraint condition, then the problem is transformed into:
[0071]
[0072] Among them, {u k}={u1,u2,…,u K} is the set of IMF components obtained by decomposition, K is the total number of IMF components obtained by decomposition, {ω k}={ω1,ω2,…,ω K} is the center frequency set of the decomposed IMF components, ω k is the IMF component u k The center frequency, δ n is the Dirac distribution, To find the partial derivative with respect to n, n represents the time node and ||·||2 represents the 2-norm.
[0073] Through Lagrange transformation, the above constrained problem is transformed into an unconstrained problem. The objective function of the transformed variational constraint model is as follows:
[0074]
[0075] Among them, λ is the Lagrange multiplication operator and α is the quadratic penalty factor.
[0076] IMF component uk and its center frequency ω k The update equation is as follows:
[0077]
[0078]
[0079] in, Respectively The Fourier transform of f(n) and λ(n), l is the current iteration number, are the kth IMF component u in the next iteration respectively. k and the i-th IMF component u at the current iteration i .
[0080] Substituting the original wind power data and wind speed data into the above formula, we can obtain K1 wind power IMF components and K2 wind speed IMF components.
[0081] In one embodiment of the present invention, Figure 2 As shown in Figure 1, the original wind power data is decomposed using the VMD algorithm to obtain K1=6 wind power IMF components; Figure 3 As shown, the original wind speed data is decomposed using the VMD algorithm to obtain K2=6 wind speed IMF components.
[0082] Step S2: Use the Copula entropy method and the Hampel criterion to establish an accurate prediction input-output model, and select the wind speed IMF component that has a close relationship with each wind power IMF component. The specific steps are as follows:
[0083] Step S21: Estimate the empirical Copula density function f(x) of the decomposed wind power IMF component and wind speed IMF component through order statistics (rank):
[0084] f(x)=rank(x) / N
[0085] Where x is the wind power IMF component or the wind speed IMF component, N is the number of data contained in the IMF component x, and rank(x) means ranking the data in the IMF component x in reverse order according to the numerical value.
[0086] According to the above formula, the k1th wind power IMF component IMF1 k1 , its empirical Copula density function for:
[0087]
[0088] k2th wind speed IMF component IMF2k2 , its empirical Copula density function for:
[0089]
[0090] Step S22: Estimate the Copula entropy between each wind power IMF component and all wind speed IMF components using the K-nearest neighbor (KNN) algorithm, taking the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 For example, calculate the Copula entropy CE between them k1,k2 :remember
[0091]
[0092] Among them, ψ(·) is the Digamma function, ε(n) is the Euler distance from x(n) to its third neighbor value, specifically: if the distance The Euler distance of is the third closest (excluding the closest and the second closest, that is, the third closest, for example, in {1,2,3,4}, the closest to 5 is 4, the second closest is 3, and the third closest is 2) but:
[0093]
[0094] By analogy, solve the k1th wind power IMF component IMF1 k1 and the Copula entropy values of other wind speed IMF components, forming the set CE k1 , then CE k1 There are K2 values in total, CE k1 ={CE k1,1 ,CE k1,2 ,…,CE k1,K2}.
[0095] Step S23: Calculate the k1th wind power IMF component IMF1 according to the following formula: k1 and the k2th wind speed IMF component IMF2 k2 The Hampel distance between:
[0096]
[0097] d k1 (k2)=|CE k1,k2 -CE k1 (0.5) |
[0098] d k1 ={d k1(1),d k1 (2),…,d k1 (K2)} (7)
[0100] Among them, H k1 (k2) is the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 Hampel distance, CE k1 (0.5) For the collection CE k1 the median of For the set d k1 If H k1 If (k2) is greater than 3, the k2th wind speed IMF component is selected as the wind speed IMF component that has a close correspondence with the k1th wind power IMF component.
[0101] By analogy, according to step S22 and step S23, a wind speed IMF component closely corresponding to each wind power IMF component can be obtained.
[0102] Step S3: The wind power IMF component and wind speed IMF component before the forecast date are used as the training set, and the wind power IMF component and wind speed IMF component on the forecast date are used as the test set. For the training set, an LSTM prediction model is established for each wind power IMF component. The LSTM prediction model is optimized using the improved fireworks algorithm. The wind speed IMF component that is closely related to each wind power IMF component in step S2 is used as the input of the prediction model, and the wind power IMF component is used as the output of the prediction model.
[0103] The optimization variables of the improved fireworks algorithm to optimize the LSTM prediction model are the number of hidden layer nodes and learning efficiency of the LSTM prediction model, and the objective function is:
[0104]
[0105] Among them, N is the number of prediction time nodes of the prediction day, is the wind power IMF component forecast value at the nth forecast time node on the forecast day, x n It is the actual value of the IMF component of wind power at the nth forecast time node on the forecast day.
[0106] like Figure 4 As shown in the figure, the specific steps of the improved fireworks algorithm to optimize the number of hidden layer nodes and learning efficiency of the LSTM prediction model are:
[0107] Step S31: Initialize parameters, including the number of fireworks M, the maximum number of iterations T, the number of variant sparks m, the number of explosions s, the initial value of the explosion radius r, the variable upper limit UB and the variable lower limit LB;
[0108] In one embodiment of the present invention, the number of fireworks M is set to 10, the maximum number of iterations T is set to 20, the number of mutation sparks m is set to 10, the number of explosions s is set to 10, the explosion radius r is set to 10, the number of hidden layer nodes and the upper limit vector UB of the learning efficiency are set to [200, 0.15], and the number of hidden layer nodes and the lower limit vector LB of the learning efficiency are set to [10, 0.01];
[0109] Step S32: Generate an initial fireworks population, and introduce the Tent chaos map and reverse population learning strategy. The Tent chaos map expression is:
[0110]
[0111] Z i,j =(UB-LB)×rand+LB (9)
[0113] Among them, Z i,j represents the initial fireworks individual of the Tent chaotic map, i is the fireworks serial number, j = 1, 2, ..., J-1, J is the number of variables, in this embodiment, J is 2, rand represents a number randomly selected in the interval [0, 1], u∈[0, 1], after the Tent chaotic map sequence is obtained through formula (9), the initial population is obtained according to the following formula:
[0114] X=(UB-LB)×Z+LB (10)
[0116] The reverse population is:
[0117] X′=UB+LB-X (11)
[0119] According to formula (11), the number of fireworks in the reverse population is the same as the number of fireworks in the population after Tent chaotic mapping. In summary, the improved AO initial population generation process is:
[0120] (1) Generate an initial population after Tent chaotic mapping according to equations (9) and (10), including M fireworks;
[0121] (2) Generate a reverse population according to formula (11), including M fireworks;
[0122] (3) Calculate the fitness of the 2M fireworks generated above (including the fireworks in the initial population and the fireworks in the reverse population), and select the first M fireworks according to the fitness value to enter the iterative operation.
[0123] Step S33: Enter iteration, the initial iteration number is 0, and the explosion radius and explosion number of each firework are calculated according to the following formula:
[0124]
[0125]
[0126] Among them, fr(i) is the explosion radius of the i-th firework, f(i) is the individual fitness of the i-th firework, and f min is the minimum fitness in the fireworks population, f max is the maximum fitness in the fireworks population, fn(i) is the number of sparks generated by the i-th firework, θ is a machine minimum to avoid division by zero, and the minimum value generated each time is different;
[0127] Step S34: Select the ith firework individual x(i) and generate the explosion spark ex according to formula (14): i :
[0128] ex i,j =x i,j +fr(i)×(2×rand(1,J)-1) (14)
[0130] Among them, ex i,j For explosion spark ex i The jth variable in x i,j is the jth variable in the firework individual x(i), rand(1,J) is a number randomly selected in the interval (1,J), and J is the number of variables.
[0131] The fireworks population and the generated explosion spark population are merged into a new population, and m individuals are randomly selected from them to generate the Cauchy mutation spark mx according to formula (15): i , and consider whether to retain the Cauchy mutation spark according to the simulated annealing principle. The mutation formula is as follows:
[0132] mx i,j =x i,j +x i,j ×Cauchy(0,1) (15)
[0134] Among them, mx i,j Spark MX for Cauchy variant i The j-th variable in , Cauchy(0,1) is the standard Cauchy distribution function.
[0135]
[0136]
[0137] Among them, f(x i ) is the fitness of the fireworks individual before Cauchy mutation, f(mx i ) is the individual fitness of the Cauchy mutation spark, W is the current temperature, W0 is the initial temperature, and t is the current number of iterations; if P = 1, the Cauchy mutation spark is retained, otherwise it is not retained.
[0138] Check whether the newly generated spark exceeds the limit, and map the spark that exceeds the boundary. If it exceeds the upper limit, take the upper limit value, and if it exceeds the lower limit, take the lower limit value.
[0139] Step S35: Calculate the fitness values of the explosion sparks and the Cauchy mutation sparks, and compare them with the fitness values of the fireworks, sort all individuals in ascending order according to the fitness values, select the first M individuals to enter the next iteration, and increase the number of iterations by 1;
[0140] Step S36: Determine whether the current number of iterations is less than the maximum number of iterations T. If so, return to step S33 to continue iteration, otherwise terminate the calculation and output the individual with the minimum fitness and fitness value. The individual with the minimum fitness is the optimal number of hidden layer nodes and learning efficiency of the LSTM prediction model.
[0141] Step S4: Establish the LSTM prediction model trained in step S3 for each wind power IMF component on the forecast day, take the wind speed IMF component on the forecast day that has a close correspondence with each wind power IMF component in step S2 as input, output the corresponding wind power IMF component prediction value on the forecast day, and finally add up the prediction values of each wind power IMF component to obtain the wind power data prediction value on the final forecast day.
[0142] Taking a wind farm data as an example, the data sampling period is 15 minutes, the wind speed data and wind power data of the previous 364 days are used as training sets, and the wind speed data of the 365th day is used as a test set. The wind power data of the 365th day is predicted, and the wind power prediction method established by the present invention is used to establish a prediction model. The final prediction result is compared with the actual result. Figure 5 As shown, the mean absolute percentage error is 2.31%.
[0143] In addition to being used for short-term wind power forecasting, the method of the present invention can also be used for medium- and long-term wind power forecasting: short-term wind power forecasting generally predicts wind power within one day to one week, and requires relatively little historical data; medium- and long-term wind power forecasting generally requires predicting wind power within the next few years, which requires a large amount of historical data for training. If the method of the present invention is used to predict long-term wind power, the time required will be greatly increased.
[0144] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A short-term wind power forecasting method, It is characterized in that The steps include: S1. Use VMD algorithm to decompose historical wind power data and wind speed data to obtain K 1 Wind power IMF components with different center frequencies and K 2 Wind speed IMF components; S2. Use the Copula entropy method and Hampel criterion to establish a prediction input-output model, and select the wind speed IMF component that has a close correspondence with each wind power IMF component; The steps include: S21. Empirical Copula density function f(x) of estimated decomposed wind power IMF component and wind speed IMF component: f(x)=rank(x) / N Where x is the wind power IMF component or wind speed IMF component, N is the number of data contained in the IMF component x, and rank(x) indicates ranking the data in the IMF component x in reverse order of numerical value; Then the k1th wind power IMF component IMF1 k1 , its empirical Copula density function for: k2th wind speed IMF component IMF2 k2 , its empirical Copula density function for: S22, estimate the Copula entropy value between each wind power IMF component and all wind speed IMF components through the K-nearest neighbor algorithm, and take the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 For example, calculate the Copula entropy CE between them k1,k2 :remember Among them, ψ(·) is the Digamma function, ε(n) is the Euler distance from x(n) to its third neighbor value, specifically: if the distance The third closest Euler distance is but: By analogy, solve the k1th wind power IMF component IMF1 k1 and the Copula entropy values of other wind speed IMF components, forming the set CE k1 , then CE k1 There are K 2 Value, CE k1 ={CE k1,1 ,CE k1,2 ,…,CE k1,K2 }; S23, calculate the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 The Hampel distance between: d k1 (k2)=|CE k1,k2 -WHAT k1 (0.5) | d k1 ={d k1 (1),d k1 (2),…,d k1 (K2)} Among them, H k1 (k2) is the k1th wind power IMF component IMF1 k1 and the k2th wind speed IMF component IMF2 k2 Hampel distance, CE k1 (0.5) For the collection CE k1 the median of For the set d k1 The median of k1 (k2) is greater than 3, the k2th wind speed IMF component is selected as the wind speed IMF component that has a close correspondence with the k1th wind power IMF component; By analogy, according to step S22 and step S23, a wind speed IMF component closely corresponding to each wind power IMF component is obtained; S3, respectively establish an LSTM prediction model for each wind power IMF component and train it, use the wind speed IMF component that is closely related to each wind power IMF component in step S2 as the input of the prediction model, and use the wind power IMF component as the output of the prediction model, wherein the improved fireworks algorithm is used to optimize the number of hidden layer nodes and learning efficiency of the LSTM prediction model; The improved fireworks algorithm is used to optimize the number of hidden layer nodes and learning efficiency of the LSTM prediction model, including: The objective function is: Among them, N is the number of prediction time nodes of the prediction day, is the wind power IMF component forecast value at the nth forecast time node on the forecast day, x n is the actual value of the IMF component of wind power at the nth forecast time node on the forecast day; The specific steps of the improved fireworks algorithm to optimize the number of hidden layer nodes and learning efficiency of the LSTM prediction model are: S31, initialization parameters, including the number of fireworks M, the maximum number of iterations T, the number of mutant sparks m, the number of explosions s, the initial value of the explosion radius r, the variable upper limit UB and the variable lower limit LB; S32. Generate the initial fireworks population, and introduce the Tent chaos map and reverse population learning strategy. The Tent chaos map expression is: Z i,j =(UB-LB)×rand+LB Among them, Z i,j represents the initial fireworks individual of the Tent chaotic map, i is the fireworks serial number, j = 1, 2, ..., J-1, J is the number of variables, rand represents randomly selecting a number in the interval [0, 1], u∈[0, 1], and after obtaining the Tent chaotic map sequence, the initial population is obtained according to the following formula, including M fireworks: X=(UB-LB)×Z+LB Reverse population, including M fireworks: X'=UB+LB-X Calculate the fitness of the fireworks in the initial population and the reverse population, and select the first M fireworks according to the fitness value to enter the iterative operation; S33, enter iteration, the initial iteration number is 0, and the explosion radius and explosion number of each firework are calculated according to the following formula: Among them, fr(i) is the explosion radius of the i-th firework, f(i) is the individual fitness of the i-th firework, and f min is the minimum fitness in the fireworks population, f max is the maximum fitness in the fireworks population, fn(i) is the number of sparks generated by the i-th firework, θ is a machine minimum to avoid division by zero, and the minimum value generated each time is different; S34, select the i-th firework individual x(i) and generate explosion sparks ex i : ex i,j =x i,j +fr(i)×(2×rand(1,J)-1) Among them, ex i,j For explosion spark ex i The jth variable in x i,j is the jth variable in the firework individual x(i), rand(1,J) is a number randomly selected in the interval (1,J), and J is the number of variables; Merge the fireworks population and the generated explosion spark population into a new population, and randomly select m individuals from it to generate the Cauchy mutation spark mx i , and consider whether to retain the Cauchy mutation spark according to the simulated annealing principle. The mutation formula is as follows: mx i,j =x i,j +x i,j ×Cauchy(0,1) Among them, mx i,j Spark MX for Cauchy variant i The j-th variable in , Cauchy(0,1) is the standard Cauchy distribution function; Among them, f(x i ) is the fitness of the fireworks individual before Cauchy mutation, f(mx i ) is the Cauchy mutation spark individual fitness, W is the current temperature, W 0 is the initial temperature, t is the current iteration number; if P = 1, the Cauchy variant spark is retained, otherwise it is not retained; Check whether the newly generated spark exceeds the limit, and map the spark that exceeds the limit. If it exceeds the upper limit, take the upper limit value, and if it exceeds the lower limit, take the lower limit value; S35, calculating the fitness values of the explosion sparks and the Cauchy mutation sparks, and comparing them with the fitness value of the fireworks, arranging all individuals in ascending order according to the fitness values, selecting the first M individuals to enter the next iteration, and increasing the number of iterations by 1; S36, determine whether the current number of iterations is less than the maximum number of iterations T, if yes, return to step S33 to continue iteration, otherwise terminate the calculation, output the firework individual with the smallest fitness and the fitness value, the firework individual with the smallest fitness is the optimal number of hidden layer nodes and learning efficiency of the LSTM prediction model; S4. Taking the predicted day wind speed IMF component that has a close correspondence with each wind power IMF component in step S2 as input, output the corresponding predicted day wind power IMF component predicted value, and finally add up each wind power IMF component predicted value to obtain the wind power data predicted value of the final predicted day.
