Wind power plant wind speed prediction method, system and equipment and storage medium
Through improved energy valley optimization algorithm and technical means such as sample entropy, random forest algorithm, etc., the historical data of wind farms are decomposed and preprocessed, converted into two-dimensional images and extracted features, and used the Patch TST model to predict wind speed, which solves the problem of insufficient accuracy of wind speed prediction in the existing technology, and achieves more efficient and accurate wind speed prediction.
Patent Information
- Application Number
- CN202411350560.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The prior art has insufficient prediction accuracy in wind speed prediction in wind farms, resulting in large fluctuations in output of wind turbines, affecting the safe and stable operation of the power grid system.
The improved energy valley optimization algorithm IEVO optimizes the adaptive noise set empirical modal decomposition of white noise amplitude weight and noise addition times in CEEMDAN, and decomposes the historical data of the wind farm; then data preprocessing and feature selection are performed through sample entropy and random forest algorithms, converted into two-dimensional images and image features are extracted; finally, wind speed prediction is used to predict wind speed, and model parameters are adjusted through GPTuner.
It improves the accuracy and robustness of wind speed prediction in wind power plants, reduces the computational complexity and optimization time, and improves the prediction efficiency of the model.
Smart Images

Figure CN119514745A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a wind speed prediction method, system, device and storage medium, and in particular to a wind speed prediction method, system, device and storage medium for a wind power plant, belonging to the technical field of wind speed prediction. Background Art
[0002] Wind speed prediction is of great significance for the stable operation of wind farms, energy management and reducing the impact on the power grid. With the advent of the global energy crisis, wind energy, as a clean and renewable energy source, has great development potential. However, the randomness, intermittency and uncontrollability of wind speed lead to large fluctuations in the output of wind turbines, which is not conducive to the safe and stable operation of the power grid system. Therefore, it is particularly important to accurately predict the wind speed and power of wind farms.
[0003] In the existing technology, there are various wind speed prediction methods, including physical models, statistical models, artificial intelligence models and combined models. Physical models rely on meteorological data for modeling, which is suitable for long-term prediction but has a large amount of calculation. Statistical models such as ARIMA and Kalman filtering are suitable for simple time series prediction, but have limited capabilities in nonlinear data prediction. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a method, system, device and storage medium for predicting wind speed in a wind power plant that can improve prediction accuracy.
[0005] Technical solution: A method for predicting wind speed in a wind power plant according to the present invention comprises:
[0006] (1) The improved energy valley optimization algorithm IEVO is used to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN, and CEEMDAN is used to decompose the historical data of wind farms;
[0007] (2) The decomposed data is preprocessed using sample entropy SE to reduce the computational complexity of the data;
[0008] (3) For the preprocessed data, the random forest algorithm RF feature selection with heuristic strategy is introduced to optimize and eliminate redundant features;
[0009] (4) Using Gram angle and field GASF, the optimized data is converted from one-dimensional time series data to two-dimensional images and image features are extracted;
[0010] (5) The extracted image features are sent to the time series block transformer Patch TST model for wind speed prediction. The Patch TST model introduces the gradient boosting decision tree-based training algorithm GPTuner to adjust the model parameters.
[0011] Furthermore, the step S1 uses the improved energy valley optimization algorithm IEVO to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN, specifically including:
[0012] A set of particles is randomly generated, each particle represents a candidate solution, the formula is as follows:
[0013]
[0014] Where X is a particle set; X1, X2, ... are particles with different stability levels in the particle set; is the jth decision variable of the initial position of the ith particle; n is the total number of particles; d is the dimension of the problem under consideration; and are the lower and upper bounds of the jth decision variable of the initial position of the i-th particle; rand is a random number uniformly distributed in the range of [0, 1];
[0015] Determine the particle enrichment bound EB, which is used to consider the difference between neutron-rich particles and neutron-poor particles. Perform an objective function evaluation on each particle and determine it as the particle's neutron enrichment level NEL. The formula is as follows:
[0016]
[0017] Where EB is the enrichment boundary of the particle; NEL i is the neutron enrichment level of the i-th particle;
[0018] According to the objective function evaluation, the stability level of the particles is determined as follows:
[0019]
[0020] In the formula, SL i is the stability level of the i-th particle; BS and WS are the particles with the best and worst stability levels among all particles, and their stability levels are the minimum and maximum values of the objective function found so far, respectively;
[0021] Particle decay, depending on the stability level of the particle, corresponds to different decay modes, specifically:
[0022] When the particle's stability level is higher than the stability limit (SL i >SB), then α and γ particle decays occur:
[0023] The alpha particle decays:
[0024]
[0025] In the formula, For X in the search space i Newly generated particle; X i ′ is the current position vector of the i-th particle in the search space; X BS Is the position vector of the particle with the best stability level; Alpha IndexII represents an integer randomly generated within the exponent of α in [1, II], and the value range of II is [1, I], I ∈ [1, d];
[0026] The decay of the γ particle is as follows:
[0027]
[0028] In the formula, Is the total distance between the i-th particle and the k-th adjacent particle; (x1, y1) and (x2, y2) represent the coordinates of the particle in the search space; For X in the search space i Newly generated particle; X Ng Is the position vector of the neighboring particles around the particle; Gamma IndexII represents an integer randomly generated within the exponent of γ in [1, II], and the value range of II is [1, I], I ∈ [1, d];
[0029] When SL i <SB, the stability level of the particle is lower than the stability boundary, and it is judged that β decay has occurred:
[0030]
[0031] In the formula, X CP Is the position vector of the particle center; For X in the search space i Newly generated particle; X i ′ is the current position vector of the i-th particle in the search space; n is the total number of particles; X BS Is the position vector of the particle with the best stability level; SL i Is the stability level of the i-th particle; r1 and r2 are two random numbers within the range of [0, 1];
[0032] Perform another position update process on the particle that undergoes β decay:
[0033]
[0034] In the formula, For X in the search space i Newly generated particle; X i ′ is the current position vector of the i-th particle in the search space; X BS Is the position vector of the particle with the best stability level; X Ngis the position vector of the neighboring particles around the particle; r3 and r4 are two random numbers in the range of [0,1] that determine the movement of the particle;
[0035] When NEL i ≤EB, the neutron enrichment level of the particle is lower than the enrichment boundary, and the particle tends to move toward the stable band through electron capture or positron emission:
[0036]
[0037] In the formula, X in the search space i Newly generated particles; X i ′ is the current position vector of the i-th particle (candidate solution) in the search space; r is a random number in the range [0,1];
[0038] At the end of the EVO main loop, if the enrichment level of a particle is above the enrichment limit, only two new position vectors are generated for each particle, namely and When the enrichment level is lower than or equal to the enrichment limit, only as the new position vector; at each state, the newly generated vector is merged with the current population, and the best particle participates in the next search cycle of the algorithm; for decision variables that exceed the predefined upper and lower bounds, a boundary violation flag is determined;
[0039] The maximum number of objective function evaluations or iterations is used as the termination condition;
[0040] The white noise amplitude weight ε and the number of noise additions K in CEEMDAN select their respective optimal values from the final generated particle set X;
[0041] The decay probability is introduced into the algorithm, and the formula is as follows:
[0042]
[0043] In the formula, is the decay probability of the ith particle at the gth iteration; is the decay probability of the ith particle at the t+1th iteration; δ is the step size of the decay probability adjustment; SL i is the stability level of the ith particle; SB is the stability bound.
[0044] Furthermore, the step S1 of performing adaptive noise set empirical mode decomposition on the historical data of the wind farm includes:
[0045] (11) Select the noise level and number of iterations;
[0046] (12) Add A-order Gaussian white noise to the historical data signal of the wind farm to be decomposed to generate a new signal sequence. The formula is as follows:
[0047] x a (t) = x(t) + εδ a (t)
[0048] Where x(t) is the original data signal; x a (t) is the signal after adding the a-th noise, where a = 1, 2, ..., A; ε is the Gaussian white noise amplitude weight, δ a (t) is the Gaussian white noise generated during the ath processing, and t is the time variable;
[0049] (13) For each noisy signal x a (t) Perform EMD decomposition and take the mean of the first IMF component obtained by decomposition as the first IMF component obtained by CEEMDAN decomposition. The formula is as follows:
[0050]
[0051] r1(t)=x(t)-IMF1(t)
[0052] Where IMF1(t) represents the first modal component obtained by CEEMDAN decomposition; A is the number of times noise is added; is the modal component with a noise added to IMF1(t); r1(t) is the residual signal obtained after the first decomposition;
[0053] (14) After adding specific noise to the residual signal of the bth stage obtained after decomposition, continue to perform EMD decomposition, the formula is as follows:
[0054]
[0055] r b (t) = r b-1 (t)-IMF b (t)
[0056] In the formula, IMF b (t) represents the bth modal component obtained by CEEMDAN decomposition; E1 is the first IMF component after EMD decomposition of the signal sequence; r b-1 (t) represents the residual signal obtained after the b-1th decomposition; ω b-1 E is the weight coefficient of adding noise to the residual signal after the b-1th decomposition by CEEMDAN; b-1 is the b-1th IMF component after EMD decomposition of the signal sequence;
[0057] When the residual signal r obtained by the cth decomposition c If (t) is a monotonic signal, the decomposition stops and the IMF components are merged to obtain the decomposition result.
[0058] Furthermore, the step (2) comprises:
[0059] (21) Given a time series of length N, construct an m-dimensional vector
[0060] K m (u)={k(u),k(u+1),...,k(u+m-1)}
[0061] In the formula, K m (u) is the u-th m-dimensional vector, where u = 1, 2, ..., (N-m+1); k(u) is the data point in the time series; m is the dimension;
[0062] (22) Calculate the distance between any two m-dimensional vectors
[0063]
[0064] In the formula, d[X m (u),X m (v)] is the vector X m (u) and X m (v); x(u+p) and x(v+p) are the data points with corresponding indexes in the time series, and p is an arbitrary number;
[0065] (23) Calculate similarity probability ratio
[0066]
[0067] Where r is the similarity tolerance; B m (r) is the average number of similar vector pairs of m-dimensional vectors under similarity tolerance r; N is the total number of data points in the time series; C m (u,r) is the value of the vector X under tolerance r. m (u) the logarithm of other vectors whose distance is less than or equal to r;
[0068] (24) Calculate sample entropy:
[0069]
[0070] Where SampEn(·) is the sample entropy value; It means to find the limit when N→∞; ln is the logarithm with base e; A m+1 (r) is the average number of similar vector pairs of m+1 dimensional vectors under the similarity tolerance r.
[0071] Furthermore, the step (3) comprises:
[0072] (31); The feature importance of the random forest model was calculated using Gini impurity and information gain;
[0073] The Gini impurity calculation method is:
[0074]
[0075] In the formula, Gini is the Gini impurity; is the square of the proportion of the gi-th category in the node; GI is the total number of categories;
[0076] Information Gain:
[0077]
[0078] In the formula, IG is information gain; Entropy is entropy function; S is the current node; S ei is the ei-th child node;
[0079] Sort feature information according to Gini impurity or information gain value. The larger the value, the more important the feature is, and the lower the value, the less important the feature is, so it should be removed.
[0080] (32) The heuristic strategy is introduced to design the adaptive function, and the formula is as follows:
[0081]
[0082] Where n tree is the number of decision trees in RF; σ is the proportional constant; G is the number of samples in the data set; e is the minimum number of decision trees; E is the maximum number of decision trees;
[0083] Furthermore, the step (4) includes: normalizing the optimized data for preprocessing, then generating polar coordinates by calculating the arc cosine value of each data point to complete the coordinate transformation, generating a two-dimensional image by calculating the sum of the angles between different moments through the Gram matrix, obtaining the spatial relationship features missing in the one-dimensional time series data, and extracting image features based on the generated two-dimensional image using a two-dimensional convolutional network 2DCNN.
[0084] Furthermore, the step (5) comprises:
[0085] (51) The PatchTST model divides each input univariate time series into windows of a certain size and step size to form patches, which serve as input tokens for the Transformer. The number of patches is expressed as:
[0086]
[0087] Where N p is the number of patches; P is the length of the patch; S is the step size; YL is the number of inputs to the network;
[0088] (52) Given a set of multivariate time series samples:
[0089] Y:(ex1,...,ex YL )
[0090] Where Y represents the sample set of the multivariate time series; ex1,...,ex YL are the elements in the sample set Y, each of which is a vector of dimension m;
[0091] Divide Y into M univariate time series and get ex z , z=1,…M; each ex z All are used as a Channel-independence and input into the Transformer backbone network;
[0092] (53) Setting up the backbone network
[0093]
[0094] MultiHead(Q,K,V)=Concat(head1,...,head H )W O
[0095] In the formula, Attention and MultiHead are self-attention mechanism and multi-head attention mechanism respectively; Q, K, V are query matrix, key matrix and value matrix respectively; Softmax is the normalization function; T represents matrix transposition; d k is the dimension of the key; Concat represents a concatenation operation; head h is the output of the hth attention head; W O is the output learnable weight matrix;
[0096] Use the basic Transformer encoder to map the observed signal to the potential representation space, and pass the patch through a trainable linear parameter matrix W p and a position encoding matrix W pos , the original time series data is mapped to the Transformer input potential space of dimension d, and then the attention output is obtained through the attention mechanism:
[0097]
[0098] In the formula, is the pi-th Patch mapped to the Transformer input space of dimension d; is the pi-th Patch of length p;
[0099]
[0100] In the formula, (O h ) T is the hth attention output; T is the transpose;
[0101] Establish the loss function:
[0102]
[0103] In the formula, is the total loss value; is the mean of all sample losses; M is the number of univariate time series; L is the number of original multivariate time series; is the predicted value of the z-th univariate time series; is the true value of the original z-th univariate time series;
[0104] (74) The GPTuner parameter tuning method is used, and the batch size batch_size and the learning rate learning_rate are used as the parameters to be tuned. When PTuner finds the optimal parameters, the found parameters are returned to the model, and the model starts to predict.
[0105] Based on the same inventive concept, the present invention also provides a wind speed prediction system for a wind power plant, comprising:
[0106] A decomposition module is used to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN by using the improved energy valley optimization algorithm IEVO, and perform CEEMDAN decomposition on the historical data of the wind farm;
[0107] The preprocessing module is used to preprocess the decomposed data using sample entropy SE to reduce the computational complexity of the data;
[0108] The optimization module is used to optimize the preprocessed data by introducing the random forest algorithm RF feature selection with a heuristic strategy to eliminate redundant features;
[0109] A feature extraction module, for converting the optimized data from one-dimensional time series data into two-dimensional images using Gram angle and field GASF, and extracting image features;
[0110] The prediction module is used to send the extracted image features into the time series block transformer Patch TST model for wind speed prediction. The Patch TST model introduces the training algorithm GPTuner based on the gradient boosting decision tree to adjust the model parameters.
[0111] Based on the same inventive concept, the present invention also provides a computing device, comprising: one or more processors, one or more memories and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the wind speed prediction method for a wind power plant according to any one of the above items are implemented.
[0112] Based on the same inventive concept, the present invention also provides a storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the wind speed prediction method for a wind power plant according to any of the above items.
[0113] Beneficial effects: Compared with the prior art, the present invention optimizes the white noise amplitude weight and the number of noise additions in the adaptive noise set empirical mode decomposition CEEMDAN by adopting IEVO, thereby greatly improving the efficiency of CEEMDAN decomposition; the improvement of EVO is reflected in the introduction of decay probability in particle decay, and the decay probability will continue to decrease with the iteration process, which is helpful for particle decay in the early stage and helps particles to move closer to the stable band in the later stage, effectively improving the optimization performance of the algorithm and reducing the optimization time; for the decomposed data, the sample entropy SE is first used to reconstruct the data according to the sample entropy value, which can square root identify different features in the data and reduce the complexity of data calculation; secondly, the random forest RF is used to sort the features according to their importance, retain the features with high importance, and eliminate the features with low importance, that is, redundant features. The processing of the decomposed data by SE-RF not only reduces the calculation time, but also improves the accuracy and robustness of the model prediction; in addition, a heuristic strategy is introduced in RF , so that an important parameter of RF, the decision tree, can change adaptively with the size of the data, thereby improving the efficiency of RF; the Gram angle and field GASF is combined with the convolutional network CNN to convert the one-dimensional time series data into a two-dimensional image, which can obtain the spatial relationship features and global features that are missing in the one-dimensional time series data; the method combining PatchTST and GPTuner is used to predict the data; PatchTST uses a channel-independent method to process multivariate time series. Each channel contains a univariate time series, and all sequences share the same embedding and Transformer weights, which can maintain the accuracy of prediction on multivariate long time series; in addition, the batch_size (batch size) and learning_rate (learning rate) of PatchTST are optimized using the lightweight parameter adjustment method GPTuner, which not only ensures the accuracy of model prediction to a certain extent, but also reduces the prediction time and improves efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0115] Figure 2 A flow chart of the CEEMDAN-IEVO algorithm according to an embodiment of the present invention;
[0116] Figure 3 Flow chart of an improved IEVO algorithm according to an embodiment of the present invention;
[0117] Figure 4 This is a GASF-CNN network structure diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0118] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0119] As attached Figure 1 As shown, the wind speed prediction method for a wind power plant in this embodiment includes:
[0120] (1) The improved energy valley optimization algorithm IEVO is used to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN, and CEEMDAN is used to decompose the historical data of wind farms;
[0121] (2) The decomposed data is preprocessed using sample entropy SE to reduce the computational complexity of the data;
[0122] (3) For the preprocessed data, the random forest algorithm RF feature selection with heuristic strategy is introduced to optimize and eliminate redundant features;
[0123] (4) Using Gram angle and field GASF, the optimized data is converted from one-dimensional time series data to two-dimensional images and image features are extracted;
[0124] (5) The extracted image features are sent to the time series block transformer Patch TST model for wind speed prediction. The Patch TST model introduces the gradient boosting decision tree-based training algorithm GPTuner to adjust the model parameters.
[0125] Specifically, in step (1): Figure 2 As shown in the figure, the historical wind data of the wind farm is decomposed using the adaptive noise ensemble empirical mode, including:
[0126] Initialization: select the noise level and number of iterations;
[0127] Add A-order Gaussian white noise to the data signal to be decomposed to generate a new signal sequence, the formula of which is as follows:
[0128] x a (t) = x(t) + εδ a (t)
[0129] Where x(t) is the original data signal; x a (t) is the signal after adding the a-th noise, where a = 1, 2, ..., A; ε is the Gaussian white noise amplitude weight, δ a (t) is the Gaussian white noise generated during the ath processing, and t is the time variable;
[0130] EMD decomposition: For each noisy signal x a(t) Perform EMD decomposition to obtain the first modal component (IMF) and take its mean as the first IMF obtained by CEEMDAN decomposition; the relevant formula is as follows:
[0131]
[0132] r1(t)=x(t)-IMF1(t)
[0133] Where IMF1(t) represents the first modal component obtained by CEEMDAN decomposition; A is the number of times noise is added; The modal component of a-order noise is added to IMF1(t); t is the time variable; r1(t) is the residual signal obtained after the first decomposition;
[0134] After adding specific noise to the residual signal of the bth stage obtained after decomposition, continue to perform EMD decomposition. The formula is as follows:
[0135]
[0136] r b (t) = r b-1 (t)-IMF b (t)
[0137] In the formula, IMF b (t) represents the bth modal component obtained by CEEMDAN decomposition; E1 is the first IMF component after EMD decomposition of the signal sequence; r b-1 (t) represents the residual signal obtained after the b-1th decomposition; ω b-1 E is the weight coefficient of adding noise to the residual signal after the b-1th decomposition by CEEMDAN; b-1 is the b-1th IMF component after EMD decomposition of the signal sequence; r b (t) is the residual signal obtained after the b-th decomposition; t is the time variable;
[0138] When the residual signal r obtained by the cth decomposition c If (t) is a monotonic signal, the decomposition stops, and finally the IMF is merged to obtain the decomposition result;
[0139] like Figure 3 As shown, the improved energy valley optimization algorithm IEVO is used to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN to improve the decomposition efficiency;
[0140] Initialize and randomly generate a set of particles. Each particle represents a candidate solution. The formula is as follows:
[0141]
[0142] Where X is a particle set; X1, X2, ... are particles with different stability levels in the particle set; is the jth decision variable of the initial position of the ith particle; n is the total number of particles; d is the dimension of the problem under consideration; and are the lower and upper bounds of the jth decision variable of the initial position of the i-th particle; rand is a random number uniformly distributed in the range [0, 1];
[0143] Determine the enrichment bound (EB) of the particle, which is used to consider the difference between neutron-rich particles and neutron-poor particles. Then, the objective function is evaluated for each particle and determined as the neutron enrichment level (NEL) of the particle, which is as follows:
[0144]
[0145] Where EB is the enrichment boundary of the particle; NEL i is the neutron enrichment level of the ith particle; n is the total number of particles;
[0146] According to the objective function evaluation, the stability level of the particles is determined as follows:
[0147]
[0148] In the formula, SL i is the stability level of the i-th particle; BS and WS are the particles with the best and worst stability levels among all particles, and their stability levels are equivalent to the minimum and maximum values of the objective function found so far, respectively;
[0149] Particle decay, that is, position update, has different decay modes depending on the stability level of the particle. The relevant formula is as follows:
[0150] If the particle's stability level is above the stability limit (SL i >SB), then α and γ particle decays occur:
[0151] Alpha particle decay:
[0152]
[0153] In the formula, X in the search space i Newly generated particles; X i ′ is the current position vector of the i-th particle (candidate solution) in the search space; X BS is the position vector of the particle with the best stability level; is the j-th decision variable of the initial position of the i-th particle; Alpja IndexII represents an integer randomly generated within the range of [1, II] for the exponent of α, where the value range of II is [1, I] and I ∈ [1, d];
[0154] γ particle decay:
[0155]
[0156] In the formula, is the total distance between the i-th particle and the k-th adjacent particle; (x1, y1) and (x2, y2) represent the coordinates of the particle in the search space; is X in the search space i The newly generated particle; X Ng is the position vector of the neighboring particles around the particle; Gamma IndexII represents an integer randomly generated within the range of [1, II] for the exponent of γ, where the value range of II is [1, I] and I ∈ [1, d];
[0157] If the stability level of the particle is lower than the stability bound (SL i <SB), then it is considered that β decay has occurred:
[0158]
[0159] In the formula, X CP is the position vector of the particle center; is X in the search space i The newly generated particle; X i ′ is the current position vector of the i-th particle (candidate solution) in the search space; n is the total number of particles; X BS is the position vector of the particle with the best stability level; SL i is the stability level of the i-th particle; r1 and r2 are two random numbers within the range of [0, 1];
[0160] To improve the development and exploration levels of the algorithm, another position update process is performed on the particles that undergo β decay:
[0161]
[0162] In the formula, is X in the search space i The newly generated particle; X i ′ is the current position vector of the i-th particle (candidate solution) in the search space; X BS is the position vector of the particle with the best stability level; X Ng is the position vector of the neighboring particles around the particle; r3 and r4 are two random numbers within the range of [0, 1] that determine the movement amount of the particle;
[0163] If the neutron enrichment level of a particle is below the enrichment limit (NEL i ≤EB), the particle tends to move to the stable band through electron capture or positron emission:
[0164]
[0165] In the formula, is the search space X i Newly generated particles; X i ′ is the current position vector of the i-th particle (candidate solution) in the search space; r is a random number in the range [0,1];
[0166] At the end of the EVO main loop, if the enrichment level of a particle is above the enrichment limit, only two new position vectors are generated for each particle, namely and For particles with lower enrichment levels, only as the new position vector; at each state, the newly generated vector is merged with the current population, and the best particle participates in the next search cycle of the algorithm. For decision variables that exceed the predefined upper and lower bounds, a boundary violation flag is determined.
[0167] The maximum number of objective function evaluations or the maximum number of iterations is used as the termination condition;
[0168] The white noise amplitude weight ε and the number of noise additions K in the adaptive noise ensemble empirical mode decomposition CEEMDAN select their respective optimal values from the final generated particle set X;
[0169] In order to enhance the global search and local exploration capabilities of the EVO algorithm, the decay probability is introduced into the algorithm, and the decay probability can change adaptively with the algorithm iteration process. In the early stage of the algorithm, a larger decay probability is needed to promote exploration. As the iteration proceeds, the decay probability can be gradually reduced to strengthen development. The formula is as follows:
[0170]
[0171] In the formula, is the decay probability of the ith particle at the gth iteration; is the decay probability of the ith particle at the g+1th iteration; δ is the step size of the decay probability adjustment; SL i is the stability level of the ith particle; SB is the stability bound;
[0172] When a particle decays, it will decay according to the probability Decay with the original decay mode, i.e. position update.
[0173] In step (2): the sample entropy SE is used on the decomposed data to reduce the computational complexity of the data;
[0174] After CEEMDAN decomposes the data, the sample entropy of each modal component IMF is calculated. Reconstruction based on the sample entropy value can better identify different features in the data. The SE related calculation formula is as follows:
[0175] Define time series and vectors: Given a time series of length N, construct an m-dimensional vector
[0176] K m (u)={k(u),k(u+1),...,k(u+m-1)}
[0177] In the formula, K m (u) is the u-th m-dimensional vector, where u = 1, 2, ..., (N-m+1); k(u) is the data point in the time series; m is the dimension;
[0178] Calculate vector distance: Calculate the distance between any two m-dimensional vectors
[0179]
[0180] In the formula, d[X m (u),X m (v)] is the vector X m (u) and X m (v); x(u+p) and x(v+p) are the data points with corresponding indexes in the time series;
[0181] Calculate similarity probability ratio
[0182]
[0183] Where r is the similarity tolerance; B m (r) is the average number of similar vector pairs of m-dimensional vectors under similarity tolerance r; N is the total number of data points in the time series; C m (u,r) is the value of the vector X under tolerance r. m (u) the logarithm of other vectors whose distance is less than or equal to r;
[0184] Sample entropy calculation
[0185]
[0186] Where SampEn(·) is the sample entropy value; It means to find the limit when N→∞; ln is the logarithm with base e; A m+1 (r) is the average number of similar vector pairs of m+1-dimensional vectors under the similarity tolerance r;
[0187] Reconstructing the decomposed data according to the sample entropy value can better identify different features in the data, reduce the complexity of calculation, and be more conducive to model prediction;
[0188] In step (3): the redundant features of the data are further eliminated by introducing the random forest algorithm RF feature selection with a heuristic strategy;
[0189] Random forests improve the accuracy and robustness of the model by building multiple decision trees and combining their prediction results. When dealing with feature selection problems, random forests can effectively evaluate the importance of features and then eliminate redundant features in the data; the feature importance of the random forest model is usually calculated in the following two ways:
[0190] Gini Impurity:
[0191]
[0192] In the formula, Gini is the Gini impurity; is the square of the proportion of the gi-th category in the node; GI is the total number of categories;
[0193] Information Gain:
[0194]
[0195] In the formula, IG is information gain; Entropy is entropy function; S is the current node; S ei is the ei-th child node;
[0196] Sort feature information according to Gini impurity or information gain value. The larger the value, the more important the feature is. The lower the value, the less important the feature is. It can be regarded as a redundant feature to be removed.
[0197] The number of decision trees in a random forest is a key parameter that affects the diversity and predictive power of the model. In order to make this parameter adaptively select the appropriate number of decision trees as the size of the data set increases, a heuristic strategy is introduced to design an adaptive function. The formula is as follows:
[0198]
[0199] Where n tree is the number of decision trees in RF; σ is the proportional constant; G is the number of samples in the data set; e is the minimum number of decision trees; E is the maximum number of decision trees;
[0200] In step (4): Figure 4As shown in the figure, Gram Angle Field (GAF) is a method to convert one-dimensional time series data into a two-dimensional image. It captures the nonlinear structure and pattern in the time series data through trigonometric transformation. In the conversion process, the data is first preprocessed, such as normalizing to the [0,1] interval, then the polar coordinates are generated by calculating the arc cosine value of each data point, and finally the angle relationship between different moments is calculated through the Gram matrix. GAF includes two methods: Gram Angle Sum Field (GASF) and Gram Angle Difference Field (GADF). GASF generates a two-dimensional matrix by calculating the sum of the angles between different moments of the time series data. The main formula of GASF is as follows:
[0201] Normalization:
[0202]
[0203] Coordinate transformation:
[0204]
[0205] Image Generation:
[0206]
[0207] In the formula, is a normalized time series; Z = {z1,z2,...,z k} represents the time series; t k is the timestamp; r k is the polar coordinate radius; M is the normalization factor; φ k is the polar coordinate angle; k is the serial number; G is the Gram angle and field matrix;
[0208] For the generated two-dimensional image, a two-dimensional convolutional network 2DCNN is used to extract image features as the input of the model;
[0209] In step (5): the processed data is sent to the time series block transformer Patch TST model for wind speed prediction. At the same time, the training algorithm GPTuner based on the gradient boosting decision tree is introduced into the model to adjust the parameters of the model;
[0210] The PatchTST model is a Transformer-based model. The backbone network of PatchTST is consistent with that of Transformer. The main difference is that PatchTST contains two key parts: Patch and Channel-independence. The main formula is as follows:
[0211] The PatchTST model divides each input univariate time series into patches according to a certain window size and step size. These patches can be overlapping or non-overlapping. As the input token of the Transformer, the number of patches can be expressed as:
[0212]
[0213] Where N p is the number of patches; P is the length of the patch; S is the step size; YL is the number of inputs to the network;
[0214] Through the patch operation, the number of inputs can be reduced to L / S, which can reduce the computational complexity and memory usage. Under the constraints of training time and GPU memory, the patch design allows the model to see a longer historical sequence, thereby significantly improving the prediction performance;
[0215] Channel-independence means that each channel contains only one univariate time series, and each dimension in the multivariate time series is processed separately, that is, each dimension is input into the Transformer Backbone separately, and the obtained prediction results are spliced together along the dimension direction. This is equivalent to treating different dimensions as independent, but they share the same embedding and Transformer weights. Channel-independence can be obtained as follows:
[0216] Given a set of multivariate time series samples:
[0217] Y:(ex1,...,ex YL )
[0218] Where Y represents the multivariate time series sample set; ex1,...,ex YL are the elements in the sample set Y, each of which is a vector of dimension m;
[0219] Divide Y into M univariate time series, and get ex z , z=1,…M; each ex z All are input into the Transformer backbone network as a Channel-independence, that is, independent input channels;
[0220] Backbone network
[0221]
[0222] MultiHead(Q,K,V)=Concat(head1,...,headH )W O
[0223] In the formula, Attention and MultiHead are self-attention mechanism and multi-head attention mechanism respectively; Q, K, V are query matrix, key matrix and value matrix respectively; Softmax is the normalization function; T represents matrix transposition; d k is the dimension of the key; Concat represents a concatenation operation; head h is the output of the hth attention head; W O is the output learnable weight matrix;
[0224] The basic Transformer encoder is used to map the observed signal to the latent representation space. In this process, the patch is passed through a trainable linear parameter matrix W p and a position encoding matrix W pos , the original time series data is mapped to the Transformer input potential space of dimension d, and then the attention output is obtained through the attention mechanism:
[0225]
[0226] In the formula, is the pi-th Patch mapped to the Transformer input space of dimension d; is the pi-th Patch of length p;
[0227]
[0228] In the formula, (O h ) T is the hth attention output; T is the transpose;
[0229] Loss function:
[0230]
[0231] In the formula, is the total loss value; is the mean of all sample losses; M is the number of univariate time series; L is the number of original multivariate time series; is the predicted value of the z-th univariate time series; is the true value of the original z-th univariate time series;
[0232] In order to improve the prediction accuracy of the model, the GPTuner parameter tuning method in the open source project nni is used and combined with the model; GPTuner is a database tuning system that automatically generates, processes and utilizes multi-source heterogeneous database tuning knowledge by combining large language models and Bayesian optimization technology, and has the characteristics of short tuning time and high efficiency;
[0233] For the PatchTST model, batch_size (batch size) and learning_rate (learning rate) are mainly used as parameters to be tuned. When GPTuner finds the optimal parameters, it returns the found parameters to the model, and the model starts to predict and output the predicted structure.
[0234] Based on the same inventive concept, this embodiment also provides a wind speed prediction system for a wind power plant, including:
[0235] A decomposition module is used to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN by using the improved energy valley optimization algorithm IEVO, and perform CEEMDAN decomposition on the historical data of the wind farm;
[0236] The preprocessing module is used to preprocess the decomposed data using sample entropy SE to reduce the computational complexity of the data;
[0237] The optimization module is used to optimize the preprocessed data by introducing the random forest algorithm RF feature selection with a heuristic strategy to eliminate redundant features;
[0238] A feature extraction module, for converting the optimized data from one-dimensional time series data into two-dimensional images using Gram angle and field GASF, and extracting image features;
[0239] The prediction module is used to send the extracted image features into the time series block transformer Patch TST model for wind speed prediction. The Patch TST model introduces the training algorithm GPTuner based on the gradient boosting decision tree to adjust the model parameters.
[0240] Based on the same inventive concept, this embodiment also provides a computing device, including: one or more processors, one or more memories and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the wind speed prediction method for a wind power plant according to any one of the above items are implemented.
[0241] Based on the same inventive concept, this embodiment also provides a storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the wind speed prediction method for a wind power plant according to any of the above items.
Claims
1. A method for predicting wind speed in a wind power plant, characterized in that: include: (1) The improved energy valley optimization algorithm IEVO is used to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN, and CEEMDAN is used to decompose the historical data of wind farms; (2) The decomposed data is preprocessed using sample entropy SE to reduce the computational complexity of the data; (3) For the preprocessed data, the random forest algorithm RF feature selection with heuristic strategy is introduced to optimize and eliminate redundant features; (4) Using Gram angle and field GASF, the optimized data is converted from one-dimensional time series data to two-dimensional images and image features are extracted; (5) The extracted image features are sent to the time series block transformer Patch TST model for wind speed prediction. The Patch TST model introduces the gradient boosting decision tree-based training algorithm GPTuner to adjust the model parameters.
2. The method for predicting wind speed in a wind power plant according to claim 1, characterized in that: The step S1 uses the improved energy valley optimization algorithm IEVO to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN, specifically including: A set of particles is randomly generated, each particle represents a candidate solution, the formula is as follows: Where X is a particle set; X1, X2, ... are particles with different stability levels in the particle set; is the jth decision variable of the initial position of the ith particle; n is the total number of particles; d is the dimension of the problem under consideration; and are the lower and upper bounds of the jth decision variable of the initial position of the i-th particle; rand is a random number uniformly distributed in the range [0, 1]; Determine the particle enrichment bound EB, which is used to consider the difference between neutron-rich particles and neutron-poor particles. Perform an objective function evaluation on each particle and determine it as the particle's neutron enrichment level NEL. The formula is as follows: Where EB is the enrichment boundary of the particle; NEL i is the neutron enrichment level of the i-th particle; According to the objective function evaluation, the stability level of the particles is determined as follows: In the formula, SL i is the stability level of the ith particle; BS and WS are the particles with the best and worst stability levels among all particles, and their stability levels are the minimum and maximum values of the objective function found so far, respectively; Particle decay, depending on the stability level of the particle, corresponds to different decay modes, specifically: When the particle's stability level is higher than the stability limit (SL i >SB), then α and γ particle decays occur: The alpha particle decays: In the formula, X in the search space i Newly generated particles; X i ′ is the current position vector of the i-th particle in the search space; X BS is the position vector of the particle with the best stability level; Alpha IndexII represents the index of α, which is a randomly generated integer in [1, II], and the value range of II is [1, I], I∈[1, d]; The gamma particle decay: In the formula, is the total distance between the ith particle and the kth adjacent particle; (x1, y1) and (x2, y2) represent the coordinates of the particle in the search space; X in the search space i Newly generated particles; X Ng is the position vector of the neighboring particles around the particle; GammaIndexII represents the index of γ, which is a randomly generated integer in [1, II], and the value range of II is [1, I], I∈[1, d]; When SL i <SB, the stable level of the particle is lower than the stability boundary, and it is determined that β decay has occurred: Where, X CP is the position vector of the particle center; X in the search space i Newly generated particles; X i ′ is the current position vector of the i-th particle in the search space; n is the total number of particles; X BS is the position vector of the particle with the best stability level; SL i is the stable level of the ith particle; r1 and r2 are two random numbers in the range [0,1]; Another position update process is performed for particles that use beta decay: In the formula, X in the search space i Newly generated particles; X i ′ is the current position vector of the i-th particle in the search space; X BS is the position vector of the particle with the best stability level; X Ng is the position vector of the neighboring particles around the particle; r3 and r4 are two random numbers in the range of [0,1] that determine the movement of the particle; When NEL i ≤EB, the neutron enrichment level of the particle is lower than the enrichment boundary, and the particle tends to move toward the stable band through electron capture or positron emission: In the formula, X in the search space i Newly generated particles; X i ′ is the current position vector of the i-th particle (candidate solution) in the search space; r is a random number in the range [0,1]; At the end of the EVO main loop, if the enrichment level of a particle is above the enrichment limit, only two new position vectors are generated for each particle, namely and When the enrichment level is lower than or equal to the enrichment limit, only as the new position vector; at each state, the newly generated vector is merged with the current population, and the best particle participates in the next search cycle of the algorithm; for decision variables that exceed the predefined upper and lower bounds, a boundary violation flag is determined; The maximum number of objective function evaluations or iterations is used as the termination condition; The white noise amplitude weight ε and the number of noise additions K in CEEMDAN select their respective optimal values from the final generated particle set X; The decay probability is introduced into the algorithm, and the formula is as follows: In the formula, is the decay probability of the ith particle at the gth iteration; is the decay probability of the ith particle at the t+1th iteration; δ is the step size of the decay probability adjustment; SL i is the stability level of the ith particle; SB is the stability bound.
3. The method for predicting wind speed in a wind power plant according to claim 1, characterized in that: The step S1 of performing adaptive noise set empirical mode decomposition on the historical data of the wind farm includes: (11) Select the noise level and number of iterations; (12) Add A-order Gaussian white noise to the historical data signal of the wind farm to be decomposed to generate a new signal sequence. The formula is as follows: x a (t)=x(t)+εδ a (t) Where x(t) is the original data signal; x a (t) is the signal after adding the a-th noise, where a = 1, 2, ..., A; ε is the Gaussian white noise amplitude weight, δ a (t) is the Gaussian white noise generated during the ath processing, and t is the time variable; (13) For each noisy signal x a (t) Perform EMD decomposition and take the mean of the first IMF component obtained by decomposition as the first IMF component obtained by CEEMDAN decomposition. The formula is as follows: r1(t)=x(t)-IMF1(t) Where IMF1(t) represents the first modal component obtained by CEEMDAN decomposition; A is the number of times noise is added; is the modal component with a noise added to IMF1(t); r1(t) is the residual signal obtained after the first decomposition; (14) After adding specific noise to the residual signal of the bth stage obtained after decomposition, continue to perform EMD decomposition, the formula is as follows: r b (t)=r b-1 (t)-IMF b (t) In the formula, IMF b (t) represents the bth modal component obtained by CEEMDAN decomposition; E1 is the first IMF component after EMD decomposition of the signal sequence; r b-1 (t) represents the residual signal obtained after the b-1th decomposition; ω b-1 E is the weight coefficient of adding noise to the residual signal after the b-1th decomposition by CEEMDAN; b-1 is the b-1th IMF component after EMD decomposition of the signal sequence; When the residual signal r obtained by the cth decomposition c If (t) is a monotonic signal, the decomposition stops and the IMF components are merged to obtain the decomposition result.
4. The method for predicting wind speed in a wind power plant according to claim 1, characterized in that: The step (2) comprises: (21) Given a time series of length N, construct an m-dimensional vector K m (u)={k(u),k(u+1),...,k(u+m-1)} In the formula, K m (u) is the u-th m-dimensional vector, where u = 1, 2, ..., (N-m+1); k(u) is the data point in the time series; m is the dimension; (22) Calculate the distance between any two m-dimensional vectors In the formula, d[X m (u),X m (v)] is the vector X m (u) and X m (v); x(u+p) and x(v+p) are the data points with corresponding indexes in the time series, and p is an arbitrary number; (23) Calculate similarity probability ratio Where r is the similarity tolerance; B m (r) is the average number of similar vector pairs of m-dimensional vectors under similarity tolerance r; N is the total number of data points in the time series; C m (u,r) is the value of the vector X under tolerance r. m (u) the logarithm of other vectors whose distance is less than or equal to r; (24) Calculate sample entropy: Where SampEn(·) is the sample entropy value; It means to find the limit when N→∞; ln is the logarithm with base e; A m+1 (r) is the average number of similar vector pairs of m+1 dimensional vectors under the similarity tolerance r.
5. The method for predicting wind speed in a wind power plant according to claim 1, characterized in that: The step (3) comprises: (31); The feature importance of the random forest model was calculated using Gini impurity and information gain; The Gini impurity calculation method is: In the formula, Gini is the Gini impurity; is the square of the proportion of the gi-th category in the node; GI is the total number of categories; Information Gain: In the formula, IG is information gain; Entropy is entropy function; S is the current node; S ei is the ei-th child node; Sort feature information according to Gini impurity or information gain value. The larger the value, the more important the feature is, and the lower the value, the less important the feature is, so it should be removed. (32) The heuristic strategy is introduced to design the adaptive function, and the formula is as follows: Where n tree is the number of decision trees in RF; σ is the proportional constant; G is the number of samples in the data set; e is the minimum number of decision trees; E is the maximum number of decision trees.
6. The method for predicting wind speed in a wind power plant according to claim 1, characterized in that: The step (4) comprises: performing normalization preprocessing on the optimized data, then generating polar coordinates by calculating the arc cosine value of each data point to complete the coordinate transformation, calculating the sum of the angles between different moments by using the Gram matrix to generate a two-dimensional image, obtaining the spatial relationship features missing in the one-dimensional time series data, and extracting image features based on the generated two-dimensional image using a two-dimensional convolutional network 2DCNN.
7. The method for predicting wind speed in a wind power plant according to claim 1, characterized in that: The step (5) comprises: (51) The PatchTST model divides each input univariate time series into windows of a certain size and step size to form patches, which serve as input tokens for the Transformer. The number of patches is expressed as: Where N p is the number of patches; P is the length of the patch; S is the step size; YL is the number of inputs to the network; (52) Given a set of multivariate time series samples: Y:(ex1,...,ex YL ) Where Y represents the sample set of the multivariate time series; ex1,...,ex YL are the elements in the sample set Y, each of which is a vector of dimension m; Divide Y into M univariate time series, and get ex z , z=1,…M; each ex z All are used as a Channel-independence and input into the Transformer backbone network; (53) Setting up the backbone network MultiHead(Q,K,V)=Concat(head1,...,head H )W O In the formula, Attention and MultiHead are self-attention mechanism and multi-head attention mechanism respectively; Q, K, V are query matrix, key matrix and value matrix respectively; Softmax is the normalization function; T represents matrix transposition; d k is the dimension of the key; Concat represents a concatenation operation; head h is the output of the hth attention head; W O is the output learnable weight matrix; Use the basic Transformer encoder to map the observed signal to the potential representation space, and pass the patch through a trainable linear parameter matrix W p and a position encoding matrix W pos , the original time series data is mapped to the Transformer input potential space of dimension d, and then the attention output is obtained through the attention mechanism: In the formula, is the pi-th Patch mapped to the Transformer input space of dimension d; is the pi-th Patch of length p; In the formula, (O h ) T is the hth attention output; T is the transpose; Establish the loss function: In the formula, is the total loss value; is the mean of all sample losses; M is the number of univariate time series; L is the number of original multivariate time series; is the predicted value of the z-th univariate time series; is the true value of the original z-th univariate time series; (74) The GPTuner parameter tuning method is used, and the batch size batch_size and the learning rate learning_rate are used as the parameters to be tuned. When PTuner finds the optimal parameters, the found parameters are returned to the model, and the model starts to predict.
8. A wind speed prediction system for a wind power plant, characterized in that: include: A decomposition module is used to optimize the white noise amplitude weight and the number of noise additions in the adaptive noise ensemble empirical mode decomposition CEEMDAN by using the improved energy valley optimization algorithm IEVO, and perform CEEMDAN decomposition on the historical data of the wind farm; The preprocessing module is used to preprocess the decomposed data using sample entropy SE to reduce the computational complexity of the data; The optimization module is used to optimize the preprocessed data by introducing the random forest algorithm RF feature selection with a heuristic strategy to eliminate redundant features; A feature extraction module, for converting the optimized data from one-dimensional time series data into two-dimensional images using Gram angle and field GASF, and extracting image features; The prediction module is used to send the extracted image features into the time series block transformer Patch TST model for wind speed prediction. The Patch TST model introduces the training algorithm GPTuner based on the gradient boosting decision tree to adjust the model parameters.
9. A computing device, characterized in that include: One or more processors, one or more memories, and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the method for predicting wind speed in a wind power plant according to any one of claims 1 to 7 are implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the steps of the method for predicting wind speed in a wind power plant according to any one of claims 1 to 7.
Citation Information
Patent Citations
Short-term wind power prediction method based on data reconstruction and TCN-BiLSTM
CN116070768A
Cover opening inspection device for spline shaft and secondary sun gear of gearbox of wind generating set
CN117147138A
Method and device for predicting NOx emission concentration of boiler and medium
CN119692559A
Large language model wind power prediction method fusing decomposition and prompt
CN121072784A
Cutoff value optimization for bias mitigating machine learning training system with multi-class target
US20240193416A1
Cited By
Wind power prediction method and system based on PatchTST
CN119921317A
A Wind Power Prediction Method and System Based on PatchTST
CN119921317B
Intelligent control autonomous desulfurization operation system based on Kalman filter-PatchTST
CN121371951A