Wind power prediction method under small sample condition
The data is cleaned by the Markov chain Monte Carlo method and a BP neural network model with integrated hybrid optimization algorithm is built, which solves the problem of insufficient prediction accuracy of wind power under small sample conditions and achieves higher prediction accuracy and stability.
Patent Information
- Application Number
- CN202510003554.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-05-06
AI Technical Summary
Under small sample conditions, wind power power prediction is difficult to accurately predict, resulting in insufficient prediction accuracy and real-time performance.
The Markov chain Monte Carlo method is used for data expansion, and data cleaning is carried out through statistics, interpolation, fitting and adaptive recognition methods are used to clean it. A BP neural network model based on integrated hybrid Skyhawk optimization and enhanced African vulture optimization algorithm is built for wind power prediction.
Through data expansion and cleaning, the diversity and quality of samples are improved, and the accuracy and stability of wind power prediction are improved, especially in small sample scenarios.
Smart Images

Figure CN119939248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wind power prediction, and in particular to a wind power prediction method under small sample conditions. Background Art
[0002] Faced with the severe challenge of global climate change, the development of renewable energy has become a global consensus. Wind energy has been widely concerned and valued due to its clean, environmentally friendly, abundant resources and renewable characteristics. As the core technology of wind energy utilization, the stability and efficiency of wind power generation are directly related to the overall performance of the energy system. However, wind turbines are affected by many factors such as climate, terrain, and equipment status, and the output power has large fluctuations and uncertainties. Solving the output stability problem of wind power systems is crucial to ensuring the stable operation of the power grid. Therefore, accurate prediction of wind power has become a key technology to achieve this goal. In recent years, wind power prediction technology has made significant progress, but most prediction methods rely on a large amount of historical data and complex physical models, which to a certain extent limits the prediction accuracy and real-time performance. At the same time, in practical applications, it is difficult to obtain sufficient historical data due to the short construction time of wind power plants or incomplete data collection. Under small sample conditions, traditional prediction technologies often fail to achieve the expected results and are difficult to meet actual prediction needs, prompting the research on wind power prediction models under small sample conditions to become a hot topic and technical challenge in the current wind power field.
[0003] At present, the research on wind power prediction mainly focuses on statistical methods, physical model methods and artificial intelligence methods. Reference [Qu Yinpeng, Xu Jian, Jiang Shangguang, et al. Modeling and prediction of statistical characteristics of wind power ramping events based on frequent pattern mining [J]. Automation of Electric Power Systems, 2021, 45(01): 36-43.] The parameter resolution adaptive algorithm was used to detect ramping events in historical wind power data, a learning set of ramping events was constructed, and data mining was performed. A multi-attribute statistical model of the starting point, end point, duration and ramping interval of the ramping event was established, revealing the basic pattern of the ramping event. The autocorrelation of adjacent ramping events was analyzed through the association rule algorithm, and an algorithm model for the prediction of the ramping event sequence was proposed. Reference [Liu Shuai, Zhu Yongli, Zhang Ke, et al. Short-term wind power forecasting based on error-corrected ARMA-GARCH model [J]. Acta Energiae Solaris Sinica, 2020, 41(10): 268-275.] Based on historical wind power data, an ARMA model was established for forecasting, and the conditional heteroscedasticity characteristics of the forecast error were eliminated through the GARCH model to form an ARMA-GARCH composite forecasting model. Further, the improved generalized error distribution (GED) model was used to propose a hierarchical compensation scheme for the statistical characteristics of the peak and light tail of the forecast error, and the effectiveness of the scheme in improving the accuracy of wind power forecasting was verified through examples. The above-mentioned literature makes full use of power data and adopts a statistically based forecasting method to achieve a relatively accurate wind power forecast. However, when dealing with complex nonlinear relationships, relying on statistical methods for forecasting may not achieve the expected results. Reference [Miao Changxin, Wang Xia, Li Hao, et al. Day-ahead wind power forecasting based on wind speed error correction of numerical weather forecast [J]. Power System Technology, 2022, 46(09): 3455-3464.] Based on the physical model of wind speed and power, the characteristics of wind speed fluctuation are analyzed, and a switching output mechanism that introduces wind speed information is proposed to weaken the impact of wind energy volatility on power forecasting. Reference [Wu Yong, Wang Bing, Chen Yuquan, et al. Application of deep learning model integrating refined meteorological factors and physical constraints in short-term wind power forecasting [J]. Power System Technology, 2024, 48(04): 1455-1468.] A physical deep learning network is constructed based on two physical models of wind farm wake effect and power curve, and pre-training samples are generated using physical models to further improve the prediction accuracy. The prediction method based on the physical model is highly dependent on meteorological and wind power data, and its application is limited under small sample conditions.
[0004] With the development of artificial intelligence technology, technologies such as neural networks, deep learning and support vector machines have been widely used in wind power forecasting. These methods can handle complex nonlinear relationships, and artificial intelligence technology has developed rapidly in the field of sample learning generation, which to a certain extent provides more ideas for the difficult problem of power prediction modeling under small sample conditions. References [Wei Zetao, Liu Youbo, Shen Xiaodong, et al. Ultra-short-term output modeling and power generation forecasting of small hydropower in poor data areas based on sample data transfer learning [J]. Proceedings of the CSEE, 2023, 43(07): 2652-2666.] A sample data transfer learning method is proposed based on the transfer convolutional spatiotemporal network to realize data feature transfer learning under few sample conditions. Reference [FUJIMOTO Y, TAKAHASHI Y, HAYASHI Y. Alerting to rare large-scale ramp events in wind power generation [J]. IEEE Transactions on Sustainable Energy, 2019, 10 (1): 55-65.] implemented three data mixed sampling strategies: random undersampling and random oversampling, random undersampling and synthetic minority oversampling, and random undersampling and error bootstrap oversampling to solve the class imbalance problem. Reference [FU Yang, ZHOU Quan, JIA Feng, et al. Offshore wind turbine fault prediction based on SCADA data graphics [J]. Proceedings of the CSEE, 2022, 42 (2): 7465-7475.] adopted a recurrent generative adversarial network with two-layer generators and two discriminators to enrich the fault label samples and improve the timeliness of unit fault warning and the accuracy of fault type identification. Reference [Cheng Kai, Peng Xiaosheng, Xu Qiyou, et al. Short-term power forecasting of wind farms based on feature selection and multi-level deep transfer learning [J]. High Voltage Technology, 2022, 48(2): 497-503.] Use convolutional neural networks to build generative models and discriminative models, generate prediction data based on influencing factors, and conduct game training of conditional generative adversarial networks. The application of small sample technology based on artificial intelligence has alleviated the problem caused by the scarcity of samples to a certain extent, but these methods have not deeply considered the probability distribution characteristics of the data. The difference between the probability distribution of generated samples and the distribution of real samples is an important criterion for judging the quality of generated data. Based on this, a data expansion method is proposed to provide a good data foundation for the prediction model. Summary of the invention
[0005] In response to the technical problem that wind power prediction is difficult to accurately predict due to insufficient sample size, the present invention proposes a wind power prediction method under small sample conditions, which can effectively solve the problem of insufficient data faced by wind power prediction under small sample conditions, improve the accuracy of wind power prediction, and provide a reliable wind power prediction method for newly built wind power plants and wind power plants with incomplete data collection.
[0006] In order to achieve the above object, the technical solution of the present invention is achieved as follows:
[0007] A wind power prediction method under small sample conditions, the steps are as follows:
[0008] S1: Using the Markov Chain Monte Carlo method (MCMC) to expand the small sample data set of wind power plants, we can obtain the wind power sample set;
[0009] S2: Four methods, namely statistics, interpolation, fitting and adaptive identification, are used to clean the wind power sample set;
[0010] S3: Build a BP (IHAO-IAVOA-BP) neural network model based on the integrated hybrid sky eagle optimization and enhanced African vulture optimization algorithm, and use the wind power sample set with data cleaning to train the IHAO-IAVOA-BP neural network model to establish the IHAO-IAVOA-BP neural network wind power prediction model;
[0011] S4: Four models, namely, BP neural network, BP neural network improved by African vulture optimization algorithm, BP neural network improved by Sky Eagle optimizer and IHAO-IAVOA-BP neural network wind power prediction model, are used to predict the sample set to be tested, and the prediction effect is analyzed using four indicators: mean absolute error (MAE), mean absolute percentage error (MAPE), mean square error (MSE) and root mean square error (RMSE).
[0012] Preferably, the method of using MCMC to perform data expansion on a small sample data set of a wind power plant is:
[0013] S1.1: Randomly select an original sample as the initial state and generate a new state through formula (1):
[0014] S new =S+randn(1,T+1)×σ(1);
[0015] In the formula, S new is the generated new sample; S is the original sample; T is the number of sample features; σ is the adjustment parameter;
[0016] S1.2: According to the power difference between the new state and the original state, the acceptance rate α is calculated using formula (2): At the same time, a uniformly distributed random number u~U(0,1) is generated. If u>α, the candidate sample is accepted; otherwise, the candidate sample is rejected and the current sample is kept unchanged;
[0017] α=min(1,|P new -P|) (2);
[0018] Where P new is the new sample power; P is the original sample power;
[0019] S1.3: Repeat steps S1.1 to S1.2, iterate sampling M times, and obtain the generated wind power sample set.
[0020] Preferably, the method for performing data cleaning on the wind power sample set is:
[0021] S2.1: Statistical methods are used to delete data outliers with all identical elements in a row of wind power sample sets, and the forward filling method is used to handle missing values; the sliding linear interpolation method is used to perform smooth interpolation between data points to effectively remove outliers in the data set;
[0022] S2.2: Use the random sampling consensus fitting algorithm (RANSAC) to clean the points with poor correlation in the wind power sample set; set the number of sampling points and the maximum distance parameter from the inner point to the model, extract the inner point, and obtain samples with high correlation;
[0023] S2.3: The residuals between the obtained inlier data and the theoretical values of the RANSAC model are analyzed using the isolation forest algorithm (IF), the anomaly ratio is set, and the identified outliers are replaced with the RANSAC model values.
[0024] Preferably, the method for establishing the IHAO-IAVOA-BP neural network wind power prediction model is:
[0025] S3.1: Divide the cleaned wind power sample set into a training set and a test set, and perform normalization according to formula (3):
[0026]
[0027] In the formula, y' is the normalized data; y is the original data; y max is the maximum value in the wind power sample set, y min is the minimum value in the wind power sample set;
[0028] S3.2: Construct the structure of BP neural network and set the hyperparameters of BP neural network;
[0029] S3.3: Initialize the weights and biases of the BP neural network as the population individuals of the optimization algorithm;
[0030] S3.4: Set the hybrid optimization algorithm parameters, including population size, number of individuals, and number of iterations;
[0031] S3.5: Calculate the fitness of individuals in the population and determine the global optimal fitness value and position;
[0032] S3.6: Use the improved hybrid algorithm to update the position of the individuals in the population to ensure that they are close to the optimal position;
[0033] S3.7: Recalculate the fitness value, and stop the iteration when the accuracy requirement is met or the number of iterations is reached, otherwise return to step S3.5 and continue iterating;
[0034] S3.8: Use the optimal African vulture population to assign weights and biases to the BP neural network; train and test the wind power data set to obtain wind power prediction results;
[0035] S3.9: Reinitialize weights and biases and repeat steps S3.4 to S3.8;
[0036] S3.10: If the model does not improve within 200 iterations, stop the iteration and load the historical optimal model for prediction.
[0037] Preferably, the method for updating the positions of individuals in the population using the improved hybrid algorithm is:
[0038] S3.6.1: The position update rules of the AO algorithm are introduced in the exploration phase of the AVOA algorithm. The update rules are as follows:
[0039] If rand ≤ 0.5,
[0040]
[0041] In the formula, x i (t+1) is the next iteration position of Tianying; x best (t) is the optimal solution found so far; t is the current number of iterations, T is the maximum number of iterations; rand is a random value in [0,1]; x m (t) is the average position of all hawks in the population;
[0042] If rand>0.5,
[0043] x i (t+1)=x best (t)×Levy(D)+x r (t)-x best(t)×(yx)×rand (6);
[0044]
[0045]
[0046] In the formula, x r (t) is a randomly selected eagle position from the population; Levy(x) is the Levy flight function; D is the dimension; μ and ν are random numbers in (0, 1); τ(x) is the gamma function; β and ω are fixed values, D 1 is an integer matrix from 1 to the search space;
[0047] S3.6.2: Based on the learning strategy based on lens opposition (LOBL) and the learning strategy based on random opposition (ROBL), a learning strategy based on compound opposition (COBL) is designed. In order to make full use of the characteristics of the two strategies of LOBL and ROBL, the probability of each strategy being selected is set to 50% during the optimization process. The expression of the COBL strategy is as follows:
[0048] When q<0.5,
[0049] X COBL =lb+ub-rand×X i (11);
[0050] When q≥0.5,
[0051]
[0052] Where q is a random value in [0,1]; X i is the ith solution in the population; X COBL Yes X i The opposite solution of ; k represents the distance coefficient; lb and ub are the upper and lower limits of the search space respectively;
[0053] In multidimensional space, the optimization process expands to:
[0054] When q<0.5,
[0055] X COBL,j =lb j +ub j -rand×X i,j (13);
[0056] When q≥0.5,
[0057]
[0058] Where, j = 1, 2, ..., D; X i,jis the overall i-th solution in j-dimensional space; X i,j When X is a j-dimensional space i,j The opposite solution of lb j andub j They are the upper and lower limits of the search space in j dimension respectively;
[0059] S3.6.3: Introduce the fitness-distance balance (FDB) selection strategy to adjust the core position update formula (6), using x FDB (t) The candidate solution replaces x rand (t), as shown in formula (15), the position update is realized to ensure that each update can move towards a better solution:
[0060] x i (t+1)=x best (t)×Levy(D)+x r (t)-x FDB (t)×(yx)×rand (15);
[0061] In the formula, x FDB (t) is the candidate solution identified by the FDB strategy.
[0062] Preferably, the implementation method of the FDB strategy is:
[0063] a) Assume that the dimension of the optimization problem is D, N is the total number of candidate solutions in the population; the i-th candidate solution is defined as X i =(X i,1 ,X i,2 ,…,X i,D ), i = 1, 2, ..., N; therefore, each solution is equal to the best solution X in the population best The Euclidean distance between is calculated as follows:
[0064]
[0065] b) Distance vector D X For each candidate solution, it is expressed as:
[0066]
[0067] Where, d i is the distance between individual i and the optimal solution;
[0068] c) After normalization, the fitness value and distance value of the candidate solution are used to calculate the score as follows:
[0069]
[0070] In the formula, γ is a constant of 0.5, represents the standardized fitness value of the solution, Represents the standardized distance value
[0071] d) Take the fractional vector S X Represents the overall FDB score value
[0072]
[0073] In the formula, s i is the score of individual i.
[0074] Preferably, the expression of the mean absolute error (MAE) is:
[0075]
[0076] Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i; N is the total number of time moments.
[0077] Preferably, the expression of the mean absolute percentage error (MAPE) is:
[0078]
[0079] Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments.
[0080] Preferably, the expression of the mean square error (MSE) is:
[0081]
[0082] Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments.
[0083] Preferably, the expression of the root mean square error (RMSE) is:
[0084]
[0085] Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments.
[0086] Beneficial effects of the present invention:
[0087] 1) To address the problem of insufficient wind power samples, the Markov Chain Monte Carlo method (MCMC) was used to expand the data, and the BP neural network model was used to verify the quality of the generated data. This showed that the MCMC expansion method was effective and improved the diversity of samples and data quality.
[0088] 2) Four methods, namely statistics, interpolation, fitting and adaptive recognition, are used for data cleaning. The correlation heat map shows that the correlation between features and power is closer after data processing. The cleaning process effectively removes outliers that have a negative impact on the model's prediction performance and enhances the quality of the data set.
[0089] 3) Four neural network models, BP, AO-BP, AVOA-BP and IHAO-IAVOA-BP, were used for power prediction. The test results show that the IHAO-IAVOA-BP model has a higher prediction accuracy and the proposed method has good prediction performance in small sample scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0091] Figure 1 This is a flow chart of wind power prediction based on the IHAO-IAVOA-BP neural network model of the present invention.
[0092] Figure 2 This is a comparison chart of the characteristic distribution between the original sample and the generated sample after expanding the wind power plant data using the MCMC algorithm.
[0093] Figure 3 This is the correlation heat map before and after cleaning.
[0094] Figure 4 These are the power prediction results under four models: BP neural network, AO-BP neural network, AVOA-BP neural network and IHAO-IAVOA-BP neural network. DETAILED DESCRIPTION
[0095] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0096] In order to solve the problem that wind power prediction is difficult to accurately predict due to insufficient sample size, the present invention proposes a wind power prediction method under small sample conditions. In order to enrich the historical samples of wind power and improve the generalization ability and stability of the prediction model, the Markov Chain Monte Carlo (MCMC) method is used for data expansion, and the expanded data set is cleaned by using four methods: statistics, interpolation, fitting and adaptive recognition. On this basis, a BP neural network (Predictive Model of BPNeural Network Based on Integrated hybrid Skyhawk optimization and enhancedAfrican Vulture optimization algorithm, IHAO-IAVOA-BP) prediction model based on integrated hybrid Skyhawk optimization and enhancedAfrican Vulture optimization algorithm is constructed. Taking the actual wind farm data of Germany as an example sample, four models of BP neural network, BP neural network improved by African vulture optimization algorithm, BP neural network improved by Skyhawk optimizer and integrated hybrid Skyhawk optimization and IHAO-IAVOA-BP neural network are used for prediction, and the effectiveness of the proposed method is verified.
[0097] MCMC is a numerical simulation method based on probability statistics. It introduces the Markov chain in the random process into the Monte Carlo simulation and achieves a more efficient simulation by dynamically adjusting the sampling distribution. Assuming the probability density function is p(x), the goal is to extract samples from the function to obtain a sample set of probability distribution. MCMC constructs a Markov chain that satisfies the ergodic theorem conditions so that the stationary distribution of this chain is exactly the target distribution of the required sampling. In the Markov chain, a sample is extracted at each moment. As long as the chain satisfies the ergodic theorem requirements and the running time is long enough, a sample set that can approximately represent the target probability distribution can be obtained.
[0098] The short construction time of the wind farm or the incomplete data collection will lead to insufficient sample quantity, making it difficult to rely on neural network modeling. Therefore, the sample data expansion technology based on MCMC is used to enrich the sample. The Metropolis-Hastings (MH) algorithm is a type of MCMC algorithm that generates diversified samples by exploring different areas of the target distribution. According to the distribution characteristics of the actual sample data, the adjustment parameters are reasonably selected to expand the small sample data set of the wind farm. The number of samples to be expanded is set to M. The specific steps are as follows:
[0099] 1) Randomly select an original sample as the initial state and generate a new state through formula (1):
[0100] S new =S+randn(1,T+1)×σ(1);
[0101] In the formula, S new is the generated new sample; S is the original sample; T is the number of sample features; σ is the adjustment parameter;
[0102] 2) According to the power difference between the new state and the original state, the acceptance rate α is calculated using formula (2): At the same time, a uniformly distributed random number u~U(0,1) is generated. If u>α, the candidate sample is accepted; otherwise, the candidate sample is rejected and the current sample is kept unchanged;
[0103] α=min(1,|P new -P|) (2);
[0104] Where P new is the new sample power; P is the original sample power;
[0105] 3) Repeat steps 1) to 2) and iterate sampling M times to obtain the generated wind power sample set.
[0106] The original data of wind power plants are affected by meteorological conditions, wind turbine failures, and power grid operation restrictions, and there are abnormal data. Directly expanding the sample of the original data will result in the expanded sample set still containing abnormal data. To ensure the accuracy of the data, statistical methods, interpolation methods, fitting methods, and adaptive identification methods are combined to effectively handle abnormal values, missing values, and outliers, and improve the quality and credibility of data analysis.
[0107] First, the expanded data set is large in scale. Statistical methods are used to delete data outliers in a row of data sets with all the same elements, and the forward filling method is used to process missing values. The sliding linear interpolation method is used to perform smooth interpolation between data points to effectively remove outliers in the data set.
[0108] Secondly, the Random Sample Consensus (RANSAC) algorithm is used to clean the points with poor correlation in the data set. The number of sampling points and the maximum distance parameters from the inner point to the model are set to extract the inner points and obtain samples with high correlation.
[0109] Finally, the isolation forest algorithm (IF) is used to analyze the residuals between the obtained inlier data and the theoretical values of the RANSAC model, set the anomaly ratio, and replace the identified outliers with the RANSAC model values.
[0110] A BP (IHAO-IAVOA-BP) neural network model based on the integrated hybrid sky eagle optimization and enhanced African vulture optimization algorithm was built, and the IHAO-IAVOA-BP neural network model was trained using the wind power sample set after data cleaning, and an IHAO-IAVOA-BP neural network wind power prediction model was established.
[0111] Aquila Optimizer (AO) is an intelligent optimization algorithm inspired by the hunting behavior of eagles in nature. The algorithm simulates four behaviors of eagles in the hunting process: selecting search space by soaring at high altitude according to the flight characteristics of eagles, exploring in the divergent search space through contour flight and gliding of short sliding attacks, searching for prey in the convergent space through low-altitude flight, and capturing prey through rapid dives. The Aquila Optimizer simulates the behavior in stages, which can effectively balance exploration and development in complex search spaces and increase the probability of finding the global optimal solution.
[0112] The African Vultures Optimization Algorithm (AVOA) is a metaheuristic algorithm that simulates the foraging behavior of African vultures. The algorithm is divided into four stages: determining the optimal individual in the population, calculating the individual hunger rate, the exploration stage, and the development stage. It simulates the leader and follower mode of vultures in nature, conducts global exploration and local search according to the hunger level, and seeks the optimal solution to the problem.
[0113] The AO algorithm has strong global exploration capabilities, but its local development stage is not stable enough. The AVOA algorithm has good development capabilities, but the exploration mechanism is insufficient. The local development of the BP neural network model optimized by the AO algorithm is unstable, and the search efficiency is low when approaching the optimal solution; the exploration mechanism of the BP neural network model optimized by the AVOA algorithm is insufficient, the global search capability is limited, and it is easy to fall into the local optimal situation. In order to solve the shortcomings of a single optimization algorithm, the AO algorithm and the AVOA algorithm are combined with the AVOA algorithm as the core framework, and the hybrid algorithm is improved to obtain the IHAO-IAVOA algorithm.
[0114] The BP neural network algorithm has the ability to handle complex nonlinear relationships and has been widely used in the field of power prediction. However, its weights are gradually adjusted along the direction of local improvement, making the local search ability greater than the global search ability, and it is easy to fall into the local optimum. The learning process is long and the convergence speed is slow, resulting in a decrease in prediction accuracy. Therefore, when using the BP neural network to predict wind power, it is necessary to optimize its model. The improved hybrid optimization algorithm IHAO-IAVOA is used to optimize the weights and biases of the BP neural network prediction model, improve the prediction level of the BP neural network, enhance the global and local search capabilities, speed up the convergence speed, and establish the IHAO-IAVOA-BP neural network wind power prediction model for more accurate predictions.
[0115] Therefore, the wind power prediction process based on the IHAO-IAVOA-BP neural network model is as follows: Figure 1 As shown, the specific steps are as follows:
[0116] 1) The cleaned wind power sample set is divided into a training set and a test set, and normalized according to formula (3):
[0117]
[0118] In the formula, y' is the normalized data; y is the original data; y max is the maximum value in the wind power sample set, y min is the minimum value in the wind power sample set;
[0119] 2) Construct the structure of BP neural network and set the hyperparameters of BP neural network;
[0120] 3) Initialize the weights and biases of the BP neural network as the population individuals of the optimization algorithm;
[0121] 4) Set the hybrid optimization algorithm parameters, including population size, number of individuals, and number of iterations;
[0122] 5) Calculate the fitness of individual populations and determine the global optimal fitness value and position;
[0123] 6) Use the improved hybrid algorithm to update the individual positions of the population to ensure that they are close to the optimal position;
[0124] The method of updating the position of individuals in the population using the improved hybrid algorithm is:
[0125] S6.1: In the exploration phase, the expansion mechanism and narrow exploration mechanism of the AO algorithm are introduced to replace the original position update rules of the AVOA algorithm. The update rules are as follows:
[0126] If rand ≤ 0.5,
[0127]
[0128] In the formula, x i (t+1) is the next iteration position of Tianying; x best (t) is the optimal solution found so far; t is the current number of iterations, T is the maximum number of iterations; rand is a random value in [0,1]; x m (t) is the average position of all hawks in the population;
[0129] If rand>0.5,
[0130] x i (t+1)=x best (t)×Levy(D)+x r (t)-x best (t)×(yx)×rand (6);
[0131]
[0132]
[0133] In the formula, x r (t) is a randomly selected eagle position from the population; Levy(x) is the Levy flight function; D is the latitude; μ and ν are random numbers in (0, 1); τ(x) is the gamma function; β and ω are fixed values, 1.5 and 0.005 respectively; D 1 is an integer matrix from 1 to the search space;
[0134] S6.2: To increase the diversity of the population and help the hybrid algorithm avoid local optimal solutions, a composite opposition-based learning strategy (COBL) is designed by integrating lens opposition-based learning (LOBL) and random opposition-based learning (ROBL).
[0135] The LOBL strategy and the ROBL strategy improve the ability to avoid falling into the local optimum. At the same time, the LOBL strategy also improves the convergence speed of the algorithm, and the ROBL strategy enriches the population diversity. In order to make full use of the characteristics of the two strategies, the probability of each strategy being selected is set to 50% during the optimization process, and the expression of the COBL strategy is as follows:
[0136] When q<0.5,
[0137] XCOBL =lb+ub-rand×X i (11);
[0138] When q≥0.5,
[0139]
[0140] Where q is a random value in [0,1]; X i is the ith solution in the population; X COBL Yes X i The opposite solution of ; k represents the distance coefficient; lb and ub are the upper and lower limits of the search space respectively;
[0141] In multidimensional space, the optimization process expands to:
[0142] When q<0.5,
[0143] X COBL,j =lb j +ub j -rand×X i,j (13);
[0144] When q≥0.5,
[0145]
[0146] Where, j = 1, 2, ..., D; X i,j is the overall i-th solution in j-dimensional space; X i,j When X is a j-dimensional space i,j The opposite solution of lb j andub j They are the upper and lower limits of the search space in j dimension respectively;
[0147] S6.3: In order to improve the search efficiency and balance the exploration and utilization of the hybrid algorithm, the Fitness-Distance Balance (FDB) selection strategy is introduced. This strategy comprehensively considers the fitness value of the candidate solution and the distance from the optimal solution. When updating the population, it selects solutions with high fitness and solutions with long distances, avoiding the algorithm from converging to the local optimal solution too early and maintaining a wide distribution of the population in the solution space.
[0148] The FDB strategy updates equation (6) by adjusting the core position, using x FDB (t) The candidate solution replaces x rand (t), as shown in formula (15), the position update is realized to ensure that each update can move towards a better solution:
[0149] x i (t+1)=x best(t)×Levy(D)+x r (t)-x FDB (t)×(yx)×rand (15);
[0150] In the formula, x FDB (t) is the candidate solution identified by the FDB strategy.
[0151] Fitness-Distance Balance (FDB) selection strategy: balance exploration and exploitation to guide the search process more effectively. The goal of FDB is to discover one or more candidate solutions that contribute the most to the algorithm's search process. FDB has been widely used in many algorithms to improve their exploration capabilities and overall search performance. The difference between FDB and other selection methods is that the selection process is performed based on the scores of candidate solutions, not just their fitness values. In the score calculation, two features of the candidate solution, including the fitness function value and its distance from the optimal solution, are taken into account at the same time. This ensures that the candidate solution with the highest score value will be selected to guide the group search more effectively. The implementation method of the FDB strategy is:
[0152] a) Assume that the dimension of the optimization problem is D, N is the total number of candidate solutions in the population; the i-th candidate solution is defined as X i =(X i,1 ,X i,2 ,…,X i,D ), i = 1, 2, ..., N; therefore, each solution is equal to the best solution X in the population best The Euclidean distance between is calculated as follows:
[0153]
[0154] b) Distance vector D X For each candidate solution, it is expressed as:
[0155]
[0156] Where, d i is the distance between individual i and the optimal solution;
[0157] c) After normalization, the fitness value and distance value of the candidate solution are used to calculate the score as follows:
[0158]
[0159] In the formula, γ is a constant of 0.5, represents the standardized fitness value of the solution, Represents the standardized distance value
[0160] d) Take the fractional vector SX Represents the overall FDB score value
[0161]
[0162] In the formula, s i is the score of individual i.
[0163] 7) Recalculate the fitness value, and stop the iteration when the accuracy requirement is met or the number of iterations is reached, otherwise return to step 5) and continue iterating;
[0164] 8) Using the optimal African vulture population to assign weights and biases to the BP neural network; training and testing the wind power data set to obtain wind power prediction results;
[0165] 9) Reinitialize weights and biases and repeat steps 4) to 8);
[0166] 10) If the model does not improve within 200 iterations, stop the iteration and load the historical optimal model for prediction.
[0167] Case Analysis
[0168] The example data comes from a wind farm cluster in Germany, including all time series data from January 1, 2019 to December 31, 2020, with a sampling interval of 15 minutes. In order to fully verify the effectiveness of the proposed method, two example sample sets are used. Example 1 is the wind power data from January 21, 2019 to January 24, 2019, and Example 2 is the wind power data from September 20, 2020 to September 23, 2020. Each example has a total of 300 samples, and each sample contains 4 features, namely, the wind speed at 10 meters, 30 meters, and 50 meters, and the wind speed at the wheel axis.
[0169] The mean absolute error (MAE), root mean square error (RMSE) and coefficient of determination (R 2 ) are used to evaluate the data expansion effect, and the Pearson's correlation coefficient (r) is used to evaluate the data cleaning method; MAE, mean absolute percentage error (MAPE), mean squared error (MSE) and RMSE are used to analyze the prediction effect. The calculation of each indicator is shown in formulas (20) to (25).
[0170] (1) Mean absolute error (MAE):
[0171]
[0172] (2) Mean absolute percentage error (MAPE):
[0173]
[0174] (3) Mean Square Error (MSE):
[0175]
[0176] (4) Root mean square error (RMSE):
[0177]
[0178] (5) Coefficient of determination:
[0179]
[0180] (6) Pearson correlation coefficient:
[0181]
[0182] Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments. is the mean of the normalized wind power observation value; x i is the wind speed characteristic of the i-th sample; is the average value of the wind speed characteristic corresponding to the i-th sample; y and Represent the wind power value and the average wind power value respectively.
[0183] The relevant parameter settings for sample processing are as follows: the number of samples in the original wind power small sample set for each case is 300, and the number of generated wind power samples is 5000; the sliding window linear interpolation window size is 15, the RANSAC straight line fitting sampling points are 30 / times, the maximum distance from the internal point to the model is 400; the isolated forest algorithm anomaly ratio is 0.05.
[0184] Power prediction parameter settings: BP neural network input layer is 1 layer, input layer neurons are 4, hidden layer is 1 layer, hidden layer neurons are 2; output layer is 1 layer, output layer neuron is 1, learning rate is 0.01; number of iterations is 1000, minimum error is 0.0001, momentum factor is 0.01, delay step is 15, prediction interval is 1; number of individuals of improved hybrid optimization algorithm is 30, number of iterations is 300.
[0185] The MCMC algorithm is used to expand the wind power plant data and generate 5000 samples. The data quality verification after sample expansion in Example 1 shows some feature visualization results. Figure 2 shown.
[0186] Depend on Figure 2 It can be seen that the distributions of feature 1, feature 3 and power of the real sample and the generated sample in Example 1 are roughly the same, indicating that the MCMC algorithm can better learn the power characteristics of the original samples and generate new samples with real sample characteristics.
[0187] In order to further verify the reliability of the data generated by MCMC technology in the prediction modeling process, the BP neural network prediction model was used to train different training sets and test the same test set. The example uses the last 20% of the original small sample set as the test set, the first 80% of the original small sample set, the wind power samples generated by the MCMC algorithm, and the real samples of the wind power plant as the training set. The specific settings of the training set and test set of the sample quality verification method generated by the example are shown in Table 1, and the generated data quality verification results are shown in Table 2.
[0188] Table 1 Sample quality verification method settings
[0189]
[0190] As can be seen from Table 2, for the same test set, the prediction results of the generated sample training in Example 1 are compared with the prediction results of the original small sample set training. The MAE and MSE are reduced by 1.34MW, 2.16MW, and R 2 Compared with the prediction results of real sample training, the error indicators are close, MAE and MSE increased by 0.05MW and 0.07MW respectively, R 2 For the same test set, the prediction results of the generated sample training are compared with the prediction results of the original small sample set training. The MAE and MSE are reduced by 0.57MW, 0.55MW, and R 2 The error index is also close to the prediction results of real sample training, with MAE and MSE increased by 0.03MW and 0.06MW respectively, and R 2 Reduced by 2%.
[0191] Table 2 Example prediction results under different training sets
[0192]
[0193] The prediction results show that the use of the MCMC method to process small sample sets has improved the problem of low prediction accuracy caused by insufficient sample size to a certain extent, better learned the characteristics of wind power samples, and generated data of good quality.
[0194] To verify the effect of data cleaning, the Pearson correlation coefficient is used to measure the correlation between wind speed and power. The heat map of the correlation between wind speed and power before and after cleaning of the expanded wind power data set in Example 1 is shown in the figure below: Figure 3 As shown in the figure, Var1~Var4 represent the four sample wind speed features respectively, and Var5 represents the wind power value. The correlation between the four features and the power before and after cleaning of Example 1 and Example 2 is shown in Table 3.
[0195] Table 3. Example data cleaning results
[0196]
[0197] Depend on Figure 3 It can be seen that the correlation between wind speed and wind power is not strong before data cleaning in Example 1. After data cleaning, the correlation between each wind speed feature and power is enhanced. As can be seen from Table 3, after data cleaning in Example 1, the correlation between each wind speed feature and power is increased by 13.85%, 5.17%, 2.40% and 2.97% respectively; after data cleaning in Example 2, the correlation between each wind speed feature and power is also enhanced, increasing by 5.11%, 3.12%, 2.62% and 2.35% respectively. The cleaning results of the two examples show that the points with poor correlation in the data set have been eliminated or corrected. The proposed data cleaning method can improve the overall quality of the wind power data set and provide more reliable sample data for subsequent wind power prediction.
[0198] In order to verify the effectiveness of the IHAO-IAVOA-BP neural network prediction model, four models, namely BP neural network, AO-BP neural network, AVOA-BP neural network and IHAO-IAVOA-BP neural network, were used to predict wind power in two expanded examples. The prediction results are shown in the figure. Figure 4 As shown in Table 4, the calculation results of the four model error indicators MAE, MAPE, MSE and RMSE for the two examples are shown.
[0199] Table 4 Prediction results of four models in the example
[0200]
[0201] Depend on Figure 4It can be seen that the prediction results of the BP neural network model deviate greatly from the true value; the BP neural network model is improved by using AO and AVOA respectively, and the prediction accuracy of the AO-BP model and the AVOA-BP model is improved, and the prediction results of the two models are closer to the true value; the BP neural network model is improved by using IHAO-IAVOA, and the prediction deviation of IHAO-IAVOA-BP is further reduced. Compared with the AO-BP model and the AVOA-BP model, the prediction accuracy is further improved.
[0202] It can be seen from Table 4 that the four error indicators of the traditional BP neural network model are all too large. The error indicators of the AO-BP model and the AVOA-BP model are reduced compared with the BP model, but the effect is weaker than that of the IHAO-IAVOA-BP model. Compared with the BP model, the four indicators of MAE, MAPE, MSE and RMSE of the AVOA-BP model in Example 1 are reduced by 0.48MW, 1.58%, 22.62% and 0.61MW respectively, and those of Example 2 are reduced by 0.29MW, 1.06%, 11.96% and 0.26MW respectively; compared with the BP model, the four indicators of MAE, MAPE, MSE and RMSE of the IHAO-IAVOA-BP model in Example 1 are reduced by 0.72MW, 2.17%, 30.35% and 0.85MW respectively, and those of Example 2 are reduced by 0.64MW, 2.35%, 28.23% and 0.63MW respectively. Therefore, the IHAO-IAVOA-BP model has higher prediction accuracy and better performance.
[0203] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A wind power prediction method under small sample conditions, characterized in that: The steps are as follows: S1: Using the Markov Chain Monte Carlo method (MCMC) to expand the small sample data set of wind power plants, we can obtain the wind power sample set; S2: Four methods, namely statistics, interpolation, fitting and adaptive identification, are used to clean the wind power sample set; S3: Build a BP (IHAO-IAVOA-BP) neural network model based on the integrated hybrid sky eagle optimization and enhanced African vulture optimization algorithm, and use the wind power sample set with data cleaning to train the IHAO-IAVOA-BP neural network model to establish the IHAO-IAVOA-BP neural network wind power prediction model; S4: Four models, namely, BP neural network, BP neural network improved by African vulture optimization algorithm, BP neural network improved by Sky Eagle optimizer and IHAO-IAVOA-BP neural network wind power prediction model, are used to predict the sample set to be tested, and the prediction effect is analyzed using four indicators: mean absolute error (MAE), mean absolute percentage error (MAPE), mean square error (MSE) and root mean square error (RMSE).
2. The method for predicting wind power under small sample conditions according to claim 1, characterized in that: The method of using MCMC to expand the data of a small sample data set of a wind power plant is as follows: S1.1: Randomly select an original sample as the initial state and generate a new state through formula (1): S new =S+randn(1,T+1)×σ (1); In the formula, S new is the generated new sample; S is the original sample; T is the number of sample features; σ is the adjustment parameter; S1.2: According to the power difference between the new state and the original state, the acceptance rate α is calculated using formula (2): At the same time, a uniformly distributed random number u~U(0,1) is generated. If u>α, the candidate sample is accepted; otherwise, the candidate sample is rejected and the current sample is kept unchanged; α=min(1,|P new -P|) (2); Where P new is the new sample power; P is the original sample power; S1.3: Repeat steps S1.1 to S1.2, iterate sampling M times, and obtain the generated wind power sample set.
3. The method for predicting wind power under small sample conditions according to claim 2, characterized in that: The method for data cleaning of the wind power sample set is: S2.1: Statistical methods are used to delete data outliers with all identical elements in a row of wind power sample sets, and the forward filling method is used to handle missing values; the sliding linear interpolation method is used to perform smooth interpolation between data points to effectively remove outliers in the data set; S2.2: Use the random sampling consensus fitting algorithm (RANSAC) to clean the points with poor correlation in the wind power sample set; set the number of sampling points and the maximum distance parameter from the inner point to the model, extract the inner point, and obtain samples with high correlation; S2.3: The residuals between the obtained inlier data and the theoretical values of the RANSAC model are analyzed using the isolation forest algorithm (IF), the anomaly ratio is set, and the identified outliers are replaced with the RANSAC model values.
4. The method for predicting wind power under small sample conditions according to claim 3, characterized in that: The method for establishing the IHAO-IAVOA-BP neural network wind power prediction model is as follows: S3.1: Divide the cleaned wind power sample set into a training set and a test set, and perform normalization according to formula (3): In the formula, y' is the normalized data; y is the original data; y max is the maximum value in the wind power sample set, y min is the minimum value in the wind power sample set; S3.2: Construct the structure of BP neural network and set the hyperparameters of BP neural network; S3.3: Initialize the weights and biases of the BP neural network as the population individuals of the optimization algorithm; S3.4: Set the hybrid optimization algorithm parameters, including population size, number of individuals, and number of iterations; S3.5: Calculate the fitness of individuals in the population and determine the global optimal fitness value and position; S3.6: Use the improved hybrid algorithm to update the position of the individuals in the population to ensure that they are close to the optimal position; S3.7: Recalculate the fitness value, and stop the iteration when the accuracy requirement is met or the number of iterations is reached, otherwise return to step S3.5 and continue iterating; S3.8: Use the optimal African vulture population to assign weights and biases to the BP neural network; train and test the wind power data set to obtain wind power prediction results; S3.9: Reinitialize weights and biases and repeat steps S3.4 to S3.8; S3.10: If the model does not improve within 200 iterations, stop the iteration and load the historical optimal model for prediction.
5. The method for predicting wind power under small sample conditions according to claim 4, characterized in that: The method for updating the positions of individuals in a population using the improved hybrid algorithm is as follows: S3.6.1: The position update rules of the AO algorithm are introduced in the exploration phase of the AVOA algorithm. The update rules are as follows: If rand ≤ 0.5, In the formula, x i (t+1) is the next iteration position of Tianying; x best (t) is the optimal solution currently found; t is the current iteration number, T is the maximum iteration number; rand is a random value in [0,1]; x m (t) is the average position of all hawks in the population; If rand>0.5, x i (t+1)=x best (t)×Levy(D)+x r (t)-x best (t)×(y-x)×rand (6); In the formula, x r (t) is a hawk position randomly selected from the population; Levy(x) is the Levy flight function; D is the dimension; μ and ν are random numbers in (0, 1); τ(x) is the gamma function; β and ω are fixed values, and D1 is an integer matrix from 1 to the search space; S3.6.2: Based on the learning strategy based on lens opposition (LOBL) and the learning strategy based on random opposition (ROBL), a learning strategy based on compound opposition (COBL) is designed. In order to make full use of the characteristics of the two strategies of LOBL and ROBL, the probability of each strategy being selected is set to 50% during the optimization process. The expression of the COBL strategy is as follows: When q<0.5, X COBL =lb+ub-rand×X i (11); When q≥0.5, Where q is a random value in [0,1]; X i is the ith solution in the population; X COBL Yes X i The opposite solution of ; k represents the distance coefficient; lb and ub are the upper and lower limits of the search space respectively; In multidimensional space, the optimization process expands to: When q<0.5, X COBL,j =lb j +ub j -rand×X i,j (13); When q≥0.5, Where, j = 1, 2, ..., D; X i,j is the overall i-th solution in j-dimensional space; X i,j When X is a j-dimensional space i,j The opposite solution of lb j andub j They are the upper and lower limits of the search space in j dimension respectively; S3.6.3: Introduce the fitness-distance balance (FDB) selection strategy to adjust the core position update formula (6), using x FDB (t) The candidate solution replaces x rand (t), as shown in formula (15), the position update is realized to ensure that each update can move towards a better solution: x i (t+1)=x best (t)×Levy(D)+x r (t)-x FDB (t)×(y-x)×rand (15); In the formula, x FDB (t) is the candidate solution identified by the FDB strategy.
6. The method for predicting wind power under small sample conditions according to claim 5, characterized in that: The implementation method of the FDB strategy is: a) Assume that the dimension of the optimization problem is D, N is the total number of candidate solutions in the population; the i-th candidate solution is defined as X i =(X i,1 ,X i,2 ,…,X i,D ), i = 1, 2, ..., N; therefore, each solution is equal to the best solution X in the population best The Euclidean distance between is calculated as follows: b) Distance vector D X For each candidate solution, it is expressed as: Where, d i is the distance between individual i and the optimal solution; c) After normalization, the fitness value and distance value of the candidate solution are used to calculate the score as follows: In the formula, γ is a constant of 0.5, represents the standardized fitness value of the solution, Represents the standardized distance value d) Take the fractional vector S X Represents the overall FDB score value In the formula, s i is the score of individual i.
7. The method for predicting wind power under small sample conditions according to claim 1, characterized in that: The expression of the mean absolute error (MAE) is: Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments.
8. The method for predicting wind power under small sample conditions according to claim 1, characterized in that: The expression of the mean absolute percentage error (MAPE) is: Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments.
9. The method for predicting wind power under small sample conditions according to claim 1, characterized in that: The expression of the mean square error (MSE) is: Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments.
10. The method for predicting wind power under small sample conditions according to claim 1, characterized in that: The expression of the root mean square error (RMSE) is: Where P i ' is the normalized wind power forecast value corresponding to time i, P i is the normalized wind power observation value corresponding to time i, and N is the total number of time moments.