Wind power ultra-short-term prediction method based on gated cycle forest
Through the use of door control circular forest models in wind power prediction, combined with the technical means of random forest and door control cycle unit, the problem of generalization of existing models has been solved, and higher prediction accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411533699.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing deep learning algorithm for wind power prediction in power system ignores the intrinsic links between meteorological data, wind field characteristics and historical wind power power data, resulting in poor generalization of the model and poor prediction effect.
Using the wind power power of the door -controlled circular forest ultra -short -term predictive prediction method, it is detected and eliminated through the abnormal values of wind power data, data filling, random forest algorithm calculation of the importance of wind power characteristics, and firming the door control cycle unit, combined with integrated learning and time Advantages of sequence processing.
It improves the accuracy and stability of the short -term prediction of wind power power, enhances the explanatory and generalization of the model, and reduces the demand for computing resource and prediction costs.
Smart Images

Figure CN119382117A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an ultra-short-term prediction method for wind power based on a gated cycle forest, belongs to the technical field of wind power prediction in electric power systems, and is specifically used for ultra-short-term prediction of wind power. Background Art
[0002] As resources such as coal and oil are becoming increasingly depleted, the world is accelerating the exploration of renewable energy. As one of the emerging renewable energy sources, wind energy has attracted global attention due to its advantages such as zero emissions and wide distribution. However, wind energy is affected by natural meteorological factors and exhibits great volatility, which brings many unexpected results and challenges. Therefore, how to effectively deal with the volatility of wind power and improve its predictability and dispatchability has become one of the important problems in the operation and planning of the current power system.
[0003] In order to improve the predictability of wind power, efficient wind power prediction models can be developed and applied. These models can be based on factors such as meteorological data, wind farm characteristics, and historical wind power data, and use machine learning or deep learning models for prediction. However, traditional models usually require a lot of computing resources and are prone to overfitting when data is scarce or of poor quality. Random forest is a model based on ensemble learning ideas. It improves prediction performance by integrating multiple decision tree models. It has the advantages of reducing the risk of overfitting and improving model robustness and generalization ability.
[0004] Neural networks based on recurrent units can capture long-term temporal correlations and perform well in processing wind power data, so they are superior in wind power forecasting. Gated recurrent units are simple in design, have a small number of parameters, and have improvements in computational efficiency, training speed, memory consumption, and gradient disappearance, which are superior to traditional recurrent neural networks and long short-term memory networks.
[0005] At present, the commonly used deep learning algorithms for wind power prediction in power systems generally have problems such as ignoring the intrinsic connection between meteorological data, wind field characteristics and historical wind power data, and poor model generalization, resulting in poor model prediction results. Summary of the invention
[0006] The present invention proposes a method for ultra-short-term prediction of wind power based on gated recurrent forests, which overcomes the problems of low computational efficiency and gradient vanishing in long short-term memory networks, and combines the advantages of ensemble learning in random forests to enhance the interpretability and generalization of the model, which helps to improve the accuracy and stability of ultra-short-term prediction of wind power.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0009] The present invention discloses a method for ultra-short-term prediction of wind power based on gated cycle forest.
[0010] The following steps are included: Step 1: Detection and elimination of outliers in wind power data; the wind power data set is divided into four equal parts using the quartile method, and the values outside the boundaries are regarded as abnormal data and eliminated;
[0011] Step 2: Data filling: Use the cubic spline interpolation algorithm to fill in the removed data;
[0012] Step 3: Calculate the importance of wind power features through the random forest algorithm; Use the random forest algorithm to evaluate the importance of each wind power feature and select the most important feature and the power itself as input variables;
[0013] Step 4: Deterministic prediction through gated recurrent units: Import the feature-selected data into the gated recurrent unit for training to capture the relationship in the time series data to generate a deterministic prediction value of wind power;
[0014] Step 5: Evaluate the deterministic wind power prediction results.
[0015] As a further improvement of the ultra-short-term wind power prediction method based on gated cycle forest disclosed in the present invention, the step 1 specifically includes the following steps:
[0016] Step 1.1: Arrange the power values in the wind power data set in ascending order, and obtain the power sequence P = (p1, p2, ..., p n ),p1≤p2≤...≤p n ;
[0017] Step 1.2, determine the quartiles Q1, Q2 and Q3, the calculation formulas are:
[0018]
[0019] Q2=median(p1,p2,...,p n ) (2)
[0020]
[0021] In formulas (1), (2), and (3): median represents the median operation;
[0022] Step 1.3, calculate the upper and lower limits of the quartile method, classify the values in the data set that are lower than the lower limit or higher than the upper limit as outliers, and remove the outliers; the calculation formulas are:
[0023] L P =Q1-1.5×(Q3-Q1) (4)
[0024] U P =Q3+1.5×(Q3-Q1) (5)
[0025] In formula (4) and formula (5): L P represents the lower bound of the quartile method; U P Represents the upper bound of the quartile method.
[0026] As a further improvement of the ultra-short-term wind power prediction method based on gated cycle forest disclosed in the present invention, in step 2, the cubic spline interpolation function is defined as: suppose that in the interval [a, b], there are n+1 sampling points, satisfying a=x0<x1<x2<...<x n = b; if there exists a function f(x) such that the following conditions hold, then f(x) is a cubic spline interpolation function:
[0027] (1) The interpolation condition is satisfied, i.e. f(x) = y i ,i=0,1,2,...,n;
[0028] (2) f(x) has a continuous second-order derivative on the interval [a, b], that is, f(x), f′(x), and f″(x) are all continuous;
[0029] (3) In each subinterval [x i ,x i+1 ], f(x) is a cubic polynomial;
[0030] If the above conditions are met, then f(x) is a cubic spline interpolation function; x i The cubic spline interpolation function f at i (x) can usually be expressed as:
[0031] f i (x) = a i (xx i ) 3 +b(xx i ) 2 +c(xx i )+d i ,x∈[x i,x i+1 ] (6)
[0032] In formula (6): a i , b i , c i , d i They all represent the coefficients of the polynomial function.
[0033] As a further improvement of the ultra-short-term wind power prediction method based on gated cycle forest disclosed in the present invention, step 3 specifically includes the following steps:
[0034] Step 3.1: Collect the original data and use the Bootstrap self-sampling technique to randomly select a certain number of samples to construct B training sets, represented as {D1,D2,...,D B};
[0035] Step 3.2: For each training set D i , use the decision tree algorithm to build a decision tree T i In a decision tree, each feature is evaluated for its importance in predicting the outcome.
[0036] Step 3.3: Repeat steps 3.1 and 3.2 to build multiple decision trees {T1, T2, ..., T B};
[0037] Step 3.4: For each feature, add up the importance values of the feature in all decision trees to get the total contribution of the feature in the entire random forest model; based on the results, select the most important feature as the input variable of the prediction model.
[0038] As a further improvement of the ultra-short-term wind power prediction method based on gated cycle forest disclosed in the present invention, step 4 specifically includes the following steps:
[0039] Step 4.1. Reset gate r t Calculation; The reset gate controls the influence of the previous hidden state on the candidate state. The calculation formula is:
[0040] r t =σ(W ir x t +W hr h t-1 +b r ) (7)
[0041] Where: σ represents the activation function; x t Indicates the current input data; h t-1 Indicates hidden state; W ir , W hr Respectively represent the weights from input, hidden state to reset gate; br Represents the reset gate bias term;
[0042] Step 4.2, update gate z t Calculation; The update gate controls the weight between the previous hidden state and the candidate state, and determines how much previous information to retain. The calculation formula is:
[0043] z t =σ(W iz x t +W hz h t-1 +b z ) (8)
[0044] Where: W iz , W hz Respectively represent the weights of input and hidden state to update gate; b z represents the update gate bias term;
[0045] Step 4.3: Candidate hidden states Calculation; it is the candidate hidden state at the current moment, which contains the information of the current input and the previous hidden state. The calculation formula is:
[0046]
[0047] Where: W in , W hn Respectively represent the weights of input, hidden state to candidate state; b n represents the candidate state bias term;
[0048] Step 4.4, hidden state h t Update; combine the previous hidden state and the current candidate hidden state to generate the current hidden state, the calculation formula is:
[0049]
[0050] As a further improvement of the ultra-short-term wind power prediction method based on gated cycle forest disclosed in the present invention, step 5 adopts three evaluation indicators to evaluate the performance of the prediction model, namely root mean square error (RMSE), mean absolute error (MAE) and determination coefficient (R 2 ), the calculation formulas are:
[0051]
[0052]
[0053]
[0054] In formula (11), (12) and (13): N, y i , represent the number of samples, predicted value, true value, and the average of the true values, respectively.
[0055] The beneficial effects of the present invention are as follows:
[0056] The present invention uses the idea of ensemble learning and the characteristics of gated recurrent units to construct a gated recurrent forest model, which has higher computational efficiency, can make predictions faster and reduce the demand for computing resources, thereby reducing prediction costs. Compared with traditional deep learning models, the present invention effectively overcomes the limitations of traditional models in dealing with ultra-short-term predictions, improves the ability to predict instantaneous changes in wind power, and has stronger stability and higher interpretability, which contributes to the stable operation of the power system.
[0057] The present invention improves the accuracy and robustness of prediction by constructing multiple decision trees and integrating their results through random forest. The gated recurrent unit is good at processing time series data, which can effectively capture the time dependence and dynamic changes of data, and solve the problems of instability of wind power output and poor model generalization. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A prediction model structure diagram of a specific implementation mode of the present invention;
[0059] Figure 2 A schematic diagram of the importance of random forest features according to a specific embodiment of the present invention;
[0060] Figure 3 This is a schematic diagram of a one-hour-ahead deterministic prediction according to a specific embodiment of the present invention;
[0061] Figure 4 A schematic diagram of a 2-hour-ahead deterministic prediction according to a specific embodiment of the present invention;
[0062] Figure 5 This is a schematic diagram of a 4-hour-ahead deterministic prediction according to a specific implementation of the present invention. DETAILED DESCRIPTION
[0063] The specific implementation of the present invention is described below in conjunction with the accompanying drawings and embodiments:
[0064] like Figures 1 to 5 As shown, Example 1:
[0065] A wind power ultra-short-term forecasting method based on gated cycle forest, the model structure is as follows Figure 1As shown, the following steps are included:
[0066] Step 1: Detection and elimination of outliers in wind power data.
[0067] The wind power data set is divided into four roughly equal parts using the quartile method, and the values outside the boundaries are considered as abnormal data and removed. The specific steps include the following:
[0068] Step 1.1: Arrange the power values in the wind power data set in ascending order, and obtain the power sequence P = (p1, p2, ..., p n ),p1≤p2≤...≤p n .
[0069] Step 1.2, determine the quartiles Q1, Q2 and Q3, the calculation formulas are:
[0070]
[0071] Q2=median(p1,p2,...,p n ) (2)
[0072]
[0073] Where: median represents the median operation.
[0074] Step 1.3: Calculate the upper and lower limits of the quartile method, classify the values in the data set that are lower than the lower limit or higher than the upper limit as outliers, and remove the outliers. The calculation formulas are:
[0075] L P =Q1-1.5×(Q3-Q1) (4)
[0076] U P =Q3+1.5×(Q3-Q1) (5)
[0077] Where: L P represents the lower bound of the quartile method; U P Represents the upper bound of the quartile method.
[0078] Step 2: Data filling.
[0079] The cubic spline interpolation algorithm is used to fill the removed data. The cubic spline interpolation function is defined as:
[0080] Suppose that in the interval [a,b], there are n+1 sampling points, satisfying a=x0<x1<x2<...<x n = b. If there exists a function f(x) such that the following conditions hold, then f(x) is a cubic spline interpolation function.
[0081] (1) The interpolation condition is satisfied, i.e. f(x) = y i ,i=0,1,2,...,n;
[0082] (2) f(x) has a continuous second-order derivative on the interval [a, b], that is, f(x), f′(x), and f″(x) are all continuous;
[0083] (3) In each subinterval [x i ,x i+1 ], f(x) is a cubic polynomial.
[0084] If the above conditions are met, then f(x) is a cubic spline interpolation function. i The cubic spline interpolation function f at i (x) can usually be expressed as:
[0085] f i (x) = a i (xx i ) 3 +b(xx i ) 2 +c(xx i )+d i ,x∈[x i ,x i+1 ] (6)
[0086] Where: a i , b i , c i , d i They all represent the coefficients of the polynomial function.
[0087] Step 3: Calculate the importance of wind power features through the random forest algorithm.
[0088] The importance of each wind power feature is evaluated by the random forest algorithm, and the most important features and the power itself are selected as input variables. The specific steps include the following:
[0089] Step 3.1: Collect the original data and use the Bootstrap self-sampling technique to randomly select a certain number of samples to construct B training sets, represented as {D1,D2,...,D B}.
[0090] Step 3.2: For each training set D i , use the decision tree algorithm to build a decision tree T i In a decision tree, each feature is evaluated for its importance in predicting the outcome.
[0091] Step 3.3: Repeat steps 3.1 and 3.2 to build multiple decision trees {T1, T2, ..., T B}.
[0092] Step 3.4: For each feature, add up the importance values of the feature in all decision trees to get the total contribution of the feature in the entire random forest model. Based on the results, select the most important feature as the input variable of the prediction model.
[0093] Step 4: Make deterministic predictions via a gated recurrent unit.
[0094] Import the feature-selected data into the gated recurrent unit for training to capture the relationship in the time series data to generate a deterministic forecast value of wind power. The specific steps include the following:
[0095] Step 4.1. Reset gate r t Calculation. The reset gate controls the influence of the previous hidden state on the candidate state, and the calculation formula is:
[0096] r t =σ(W ir x t +W hr h t-1 +b r ) (7)
[0097] Where: σ represents the activation function; x t Indicates the current input data; h t-1 Indicates hidden state; W ir , W hr Respectively represent the weights from input, hidden state to reset gate; b r Represents the reset gate bias term.
[0098] Step 4.2, update gate z t Calculation. The update gate controls the weight between the previous hidden state and the candidate state, and determines how much previous information to retain. The calculation formula is:
[0099] z t =σ(W iz x t +W hz h t-1 +b z ) (8)
[0100] Where: W iz , W hz Respectively represent the weights of input and hidden state to update gate; b z Represents the update gate bias term.
[0101] Step 4.3: Candidate hidden states Calculation. It is the candidate hidden state at the current moment, which contains the information of the current input and the previous hidden state. The calculation formula is:
[0102]
[0103] Where: W in , W hn Respectively represent the weights of input, hidden state to candidate state; b n Represents the candidate state bias term.
[0104] Step 4.4, hidden state h t Update. Combine the previous hidden state and the current candidate hidden state to generate the current hidden state. The calculation formula is:
[0105]
[0106] Step 5: Evaluate the deterministic wind power prediction results.
[0107] The present invention adopts three evaluation indicators to evaluate the performance of the prediction model, namely, root mean square error (RMSE), mean absolute error (MAE) and coefficient of determination (R 2 ), the calculation formulas are:
[0108]
[0109]
[0110]
[0111] Where: N, y i , represent the number of samples, predicted value, true value, and the average of the true values, respectively.
[0112] Specific application examples are as follows:
[0113] The present invention uses the historical data of a 60MW wind farm in my country to simulate and analyze the high energy demand period in winter, taking into account the representativeness of the data. The analysis span is 20 days, of which the training set is the first 18 days of data, the test set is the last 2 days of data, the sampling resolution is 15 minutes, and the prediction time scale is ultra-short-term.
[0114] like Figure 2As shown in Figure 1, the random forest classifies each wind power feature and assigns a corresponding importance value to each feature. The specific values of these importance values are shown in Table 1. After analysis, it can be clearly seen that wind speed is considered to be the most important feature and has the greatest impact on wind power. Based on this result, wind speed and historical wind power are combined as inputs to the model to capture the main changes and trends in wind power.
[0115] Tables 2 to 4 show the performance comparison of different prediction models. Although ELM can roughly reflect the trend of wind power fluctuations, it lacks the ability to flexibly capture complex spatiotemporal patterns in the sequence due to its strategy of randomly initializing weights, so the prediction performance is poor; in contrast, CNN extracts local spatiotemporal features through convolution, which can better capture short-term and local patterns in wind power sequences; LSTM can capture long-term spatiotemporal correlations in sequences, so CNN and LSTM have higher accuracy than ELM; BiLSTM considers both past and future information, which can more comprehensively understand the patterns and trends in time series; and the gated recurrent forest model proposed in this paper reduces the parameters of the model, improves the prediction ability of instantaneous changes in wind power, and has the best prediction performance.
[0116] Figures 3 to 5 The wind power prediction curves for 1 hour ahead, 2 hours ahead, and 4 hours ahead are shown respectively. By observing the graphs, it can be clearly seen that there is a very close numerical relationship between the predicted value and the true value, indicating that the proposed method can accurately capture the time series law and has good fitting performance in ultra-short-term prediction.
[0117] Table 1 Importance values of wind power characteristics
[0118]
[0119] Table 2 Performance comparison of 1-hour-ahead prediction models
[0120]
[0121] Table 3 Performance comparison of 2-hour advance prediction models
[0122]
[0123]
[0124] Table 4 Performance comparison of 4-hour advance prediction models
[0125]
[0126] In summary, the method proposed in the present invention can achieve high-precision wind power forecasting, providing strong support for optimizing the operation and planning of wind power generation systems.
[0127] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in the field without departing from the purpose of the present invention. These changes involve related technologies well known to those skilled in the art, which all fall within the scope of protection of the patent of the present invention.
[0128] Many other changes and modifications may be made without departing from the concept and scope of the present invention.It should be understood that the present invention is not limited to the specific embodiments, and the scope of the present invention is defined by the appended claims.
Claims
1. Ultra-short-term wind power forecasting method based on gated cycle forest, It is characterized in that The following steps are involved: Step 1: Detection and elimination of outliers in wind power data; The wind power data set was divided into four equal parts using the quartile method, and the values outside the boundaries were considered as abnormal data and removed; Step 2: data filling; The cubic spline interpolation algorithm is used to fill in the eliminated data; Step 3: Calculate the importance of wind power features through the random forest algorithm; The importance of each wind power feature is evaluated through the random forest algorithm, and the most important features and the power itself are selected as input variables; Step 4: Make deterministic predictions through gated recurrent units; Import the feature-selected data into the gated recurrent unit for training to capture the relationships in the time series data to generate deterministic forecasts of wind power; Step 5: Evaluate the deterministic wind power prediction results.
2. The ultra-short-term wind power prediction method based on gated cycle forest according to claim 1, It is characterized in that The step 1 specifically includes the following steps: Step 1.1 Arrange the power values in the wind power data set in ascending order and obtain the power sequence P = (p1, p2, ..., p n ),p1≤p2≤...≤p n ; Step 1.2 Determine the quartiles Q1, Q2, and Q3, and the calculation formulas are: Q2=median(p1,p2,...,p n ) (2) In formulas (1), (2), and (3): median represents the median operation; Step 1.3 Calculate the upper and lower limits of the quartile method, classify the values in the data set that are lower than the lower limit or higher than the upper limit as outliers, and remove the outliers; the calculation formulas are: L P =Q1-1.5×(Q3-Q1) (4) U P =Q3+1.5×(Q3-Q1) (5) In formula (4) and formula (5): L P represents the lower bound of the quartile method; U P Represents the upper bound of the quartile method.
3. The ultra-short-term wind power prediction method based on gated cycle forest according to claim 1, It is characterized in that In step 2, the cubic spline interpolation function is defined as: Suppose that in the interval [a,b], there are n+1 sampling points, satisfying a=x0<x1<x2<...<x n = b; if there exists a function f(x) such that the following conditions hold, then f(x) is a cubic spline interpolation function: (1) The interpolation condition is satisfied, i.e. f(x) = y i ,i=0,1,2,...,n; (2) f(x) has a continuous second-order derivative on the interval [a, b], that is, f(x), f′(x), and f″(x) are all continuous; (3) In each subinterval [x i ,x i+1 ], f(x) is a cubic polynomial; If the above conditions are met, then f(x) is a cubic spline interpolation function; x i The cubic spline interpolation function f at i (x) can usually be expressed as: f i (x)=a i (x-x i ) 3 +b(x-x i ) 2 +c(x-x i )+d i ,x∈[x i ,x i+1 ] (6) In formula (6): a i , b i , c i , d i They all represent the coefficients of the polynomial function.
4. The ultra-short-term wind power prediction method based on gated cycle forest according to claim 1, It is characterized in that The step 3 specifically includes the following steps: Step 3.1: Collect the original data and use the Bootstrap self-sampling technique to randomly select a certain number of samples to construct B training sets, represented as {D1,D2,...,D B }; Step 3.2: For each training set D i , use the decision tree algorithm to build a decision tree T i In a decision tree, each feature is evaluated for its importance in predicting the outcome. Step 3.3: Repeat steps 3.1 and 3.2 to build multiple decision trees {T1, T2, ..., T B }; Step 3.4: For each feature, add up the importance values of the feature in all decision trees to get the total contribution of the feature in the entire random forest model; based on the results, select the most important feature as the input variable of the prediction model.
5. The ultra-short-term wind power prediction method based on gated cycle forest according to claim 1, It is characterized in that The step 4 specifically includes the following steps: Step 4.
1. Reset gate r t Calculation; The reset gate controls the influence of the previous hidden state on the candidate state. The calculation formula is: r t =σ(W ir x t +W hr h t-1 +b r ) (7) Where: σ represents the activation function; x t Indicates the current input data; h t-1 Indicates hidden state; W ir , W hr Respectively represent the weights from input, hidden state to reset gate; b r Represents the reset gate bias term; Step 4.2, update gate z t Calculation; The update gate controls the weight between the previous hidden state and the candidate state, and determines how much previous information to retain. The calculation formula is: z t =σ(W iz x t +W hz h t-1 +b z ) (8) Where: W iz , W hz Respectively represent the weights of input and hidden state to update gate; b z represents the update gate bias term; Step 4.3: Candidate hidden states Calculation; it is the candidate hidden state at the current moment, which contains the information of the current input and the previous hidden state. The calculation formula is: Where: W in , W hn Respectively represent the weights of input, hidden state to candidate state; b n represents the candidate state bias term; Step 4.4, hidden state h t Update; combine the previous hidden state and the current candidate hidden state to generate the current hidden state, the calculation formula is:
6. The ultra-short-term wind power prediction method based on gated cycle forest according to claim 1, It is characterized in that The step 5 adopts three evaluation indicators to evaluate the performance of the prediction model, namely, root mean square error (RMSE), mean absolute error (MAE) and coefficient of determination (R 2 ), the calculation formulas are: In formula (11), (12) and (13): N, y i , represent the number of samples, predicted value, true value, and the average of the true values, respectively.
Citation Information
Patent Citations
Short-term wind power prediction method based on random forest algorithm and TCN
CN112580874A
Short-term wind power prediction method based on two-stage feature selection and random forest improved model
CN114819369A
Short-term wind power prediction method considering fluctuation process division
CN115423174A
Wind power ultra-short-term prediction method for optimizing and improving extreme learning machine
CN116307139A
Winter abnormal snowfall prediction method based on meteorological data and statistical model
CN118332496A