Wind power confidence interval prediction method, device and medium based on wavelet transform
Through the combination of wavelet transformation and random forest model, the problem of wind power uncertainty prediction is solved, the complete probability distribution prediction of wind power is achieved, and the prediction accuracy and reliability are improved.
Patent Information
- Application Number
- CN202011298195.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to accurately predict the uncertainty of wind power, and can only provide a single point prediction value, which cannot meet the accurate estimate of the wind power volatility range in power grid planning and safety and stability analysis.
Wavelet transform is used to decompose the historical data of wind power into approximate components and detailed components, and the random forest model is trained in combination with meteorological data for prediction, and the confidence interval of wind power is calculated through the logical core density estimation method to achieve the complete probability distribution prediction of wind power.
The accuracy of wind power prediction is improved, artificial assumption of prior distribution is avoided, and a detailed description of wind power volatility is provided, which is suitable for the interval prediction of wind power.
Smart Images

Figure CN114548464B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of wind power prediction, and in particular relates to a wind power confidence interval prediction method, device and medium based on wavelet transform. Background Art
[0002] As the proportion of wind power in the power grid increases, the randomness and volatility of wind power are gradually magnified, which brings huge challenges to the power grid in the case of large-scale development of wind power. Accurately predicting wind power in advance can better guide the power grid's power generation and dispatching, as well as prevent and eliminate wind power ramping and other wind power events that pose a greater threat to the power grid.
[0003] At present, there have been a lot of studies on short-term wind power forecasting both at home and abroad. In the statistical learning model, wind power forecasting is divided into point prediction (deterministic prediction) and interval prediction (uncertainty prediction). The current prediction methods for point prediction mainly include support vector machines, time series, neural networks, etc.
[0004] However, deterministic prediction cannot quantitatively describe the uncertainty of wind power. In the field of wind power grid planning, operation and safety and stability analysis, a more accurate estimate of the fluctuation range of wind power is needed. It is not enough to obtain a single point prediction value. Uncertainty prediction requires the assumption of a prior distribution, and the artificial selection of distribution has a great influence on the result. It is difficult to find a suitable prior distribution.
[0005] Therefore, it is necessary to design a new wind power confidence interval prediction method. Summary of the invention
[0006] The present invention provides a wind power confidence interval prediction method, device and medium based on wavelet transform, which can obtain more useful information than point prediction and realize the prediction of the complete probability distribution of future wind power.
[0007] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0008] A wind power confidence interval prediction method based on wavelet transform comprises the following steps:
[0009] Step 1, obtaining historical meteorological data and historical wind power data, performing wavelet decomposition on the historical wind power data, and obtaining approximate components and detailed components of wind power;
[0010] Step 2: Taking the meteorological historical data as input and the approximate component of wind power as output, the first random forest RF model is trained to obtain the first prediction model of wind power; taking the meteorological historical data as input and the detailed component of wind power as output, the second random forest RF model is trained to obtain the second prediction model of wind power;
[0011] Step 3, inputting the meteorological historical data into the first wind power prediction model and the second wind power prediction model respectively, and summing the prediction results obtained by output to obtain the predicted wind power;
[0012] Step 4, subtracting the predicted wind power from the actual wind power to obtain a wind power prediction error;
[0013] Step 5, using all sample points of wind power prediction error, a logistic kernel density estimation method is used to fit the prediction error probability density distribution function;
[0014] Step 6, calculating the confidence interval of the wind power prediction according to the wind power prediction error probability density distribution function and the pre-selected confidence level;
[0015] Step 7, obtaining meteorological data for the target prediction period, inputting the meteorological data into the first wind power prediction model and the second wind power prediction model respectively, summing the output prediction results, and obtaining the wind power predicted by the deterministic wind power prediction result for the target prediction period;
[0016] Step 8: According to the confidence interval of the wind power prediction, the deterministic prediction result of the wind power in the target prediction period is interval-expanded to obtain the wind power prediction interval in the target prediction period.
[0017] In a more optimal technical solution, the wavelet decomposition is performed on the historical data of wind power to obtain the approximate component and the detailed component of the wind power, specifically: the historical data of wind power is decomposed by wavelet, the wavelet coefficients obtained are analyzed by the Mallat algorithm to obtain the wavelet coefficients of the historical data of wind power in the high-frequency part and the low-frequency part, the wavelet coefficients of the high-frequency part are used to reconstruct the detailed part of the wind power, and the wavelet coefficients of the low-frequency part are used to reconstruct the approximate part of the wind power. In a more optimal technical solution, the training method of the first random forest RF model and the second random forest RF model is as follows: for the training sample set of each random forest RF model, m independent training subsets are extracted with replacement, and a random forest RF model consisting of m decision trees is established; each decision tree is trained as a base learner using its own training subset, and the prediction results of the m decision trees are calculated using the average principle to obtain the final prediction result of the final prediction model.
[0018] In a more optimal technical solution, the absolute error probability density distribution function obtained by fitting the kernel density estimation method in step 5 is:
[0019]
[0020] Where x is the variable of the absolute error probability density distribution function, ε i is the absolute error of wind power at the i-th sample point of wind power prediction error, N is the number of sample points included in the wind power prediction error, h is the window width; and ∫f N (x)dx=1.
[0021] In a more optimal technical solution, the step 6 is specifically as follows:
[0022] Step 6.1, integrating the probability density distribution function of the wind power prediction error to obtain the error cumulative distribution function;
[0023] Step 6.2, find the inverse function of the error cumulative distribution function to obtain the error inverse cumulative distribution function;
[0024] Step 6.3, according to the pre-selected confidence level, the confidence interval of the wind power forecast is calculated using the inverse cumulative distribution function of the error:
[0025]
[0026] In the formula, is the pre-selected confidence level, and are confidence intermediate variables respectively; is the inverse cumulative distribution function of the error, that is, the inverse function of the cumulative distribution function of the error F(·).
[0027] In a more optimal technical solution, step 8 performs interval expansion to obtain the wind power forecast interval for the target forecast period: P pred It is the deterministic forecast result of wind power in the target forecast period.
[0028] In a more preferred technical solution, the meteorological data includes wind speed, wind direction, air pressure, temperature and humidity.
[0029] A wind power confidence interval prediction device based on wavelet transform comprises a processor and a memory; wherein: the memory is used to store computer instructions; the processor is used to execute the computer instructions stored in the memory, specifically executing the method described in any of the above technical solutions.
[0030] A computer storage medium is used to store a program, and when the program is executed, it is used to implement the method described in any of the above technical solutions.
[0031] Beneficial Effects
[0032] The present invention uses historical meteorological data as the input of two random forest RF models, uses wavelet decomposition to obtain approximate components and detail components of wind power, and respectively uses them as output training targets of the two random forest RF models for training to obtain a prediction model, which can be used to predict wind power for a future target prediction period based on future meteorological data, completing the first step of point prediction of wind power; in addition, the prediction model and historical meteorological data are used for prediction to obtain the absolute error of wind power, and a logical distribution kernel function kernel density estimation function is established, which is used to calculate the confidence interval of wind power prediction according to a preselected confidence level; finally, the wind power prediction interval of the future target prediction period is calculated from the point prediction data of wind power and the confidence interval of wind power prediction, thereby realizing the prediction of the complete probability distribution of future wind power.
[0033] The present invention introduces a random forest regression method with high accuracy, not prone to local optimality, few model parameters and good robustness to predict wind power, which is beneficial to improving the prediction accuracy. At the same time, the wavelet transform can quickly extract information from the historical data sequence of wind power; the logical kernel density estimation method does not use prior knowledge about data distribution, does not add any assumptions to data distribution, and avoids the introduction of human subjective factors into prior knowledge. The logical kernel density estimation fully utilizes the information of the data itself, so that the sample data can be approximated to the greatest extent. It is a method for studying data distribution characteristics from the data sample itself.
[0034] The present invention combines the advantages of wavelet transform, random forest regression algorithm and logical kernel density estimation. By using the wind power data of a certain place for training, simulation examples show that the method has high prediction accuracy and provides a certain theoretical basis for the appropriate output of wind turbines in wind power plants under different conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of the method according to an embodiment of the present invention;
[0036] Figure 2 The wind power time series (i.e., wind power historical data) in the method described in the embodiment of the present invention and the approximate component and detail component of the wind power obtained by performing wavelet decomposition on the wind power time series;
[0037] Figure 3 This is a comparison chart of wind power output between the RF prediction model and the WT-RF prediction model;
[0038] Figure 4 The prediction interval of the WT-RF model at an 80% confidence level according to the method of the embodiment of the present invention is
[0039] Figure 5The prediction interval of the WT-RF model at the confidence level of 85% according to the method of the embodiment of the present invention is
[0040] Figure 6 The prediction interval of the WT-RF model at a confidence level of 90% according to the method of the embodiment of the present invention is
[0041] Figure 7 It is the prediction interval of the WT-RF model at a confidence level of 95% according to the method described in the embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following is a detailed description of an embodiment of the present invention. This embodiment is based on the technical solution of the present invention, and provides a detailed implementation method and a specific operation process to further explain the technical solution of the present invention.
[0043] refer to Figure 1 As shown, a wind power confidence interval prediction method based on wavelet transform provided by an embodiment of the present invention includes the following steps:
[0044] Step 1, obtaining historical meteorological data and historical wind power data, performing wavelet decomposition on the historical wind power data, and obtaining approximate components and detailed components of wind power;
[0045] Among them, the meteorological historical data includes meteorological data such as wind speed, wind direction, air pressure, temperature and humidity. The calculation formula for wavelet decomposition of wind power historical data (actually wind power time series) is:
[0046]
[0047] Where f(t) represents the historical data of wind power, ξ(t) is the continuous wavelet generated by the mother wavelet, a is the scale factor, b is the translation factor, R is the real number domain, and W f (a, b) are the wavelet coefficients obtained by wavelet decomposition;
[0048] After wavelet decomposition to obtain wavelet coefficients, the Mallat algorithm is used to analyze the obtained wavelet coefficients to obtain the wavelet coefficients of the wind power historical data in the high-frequency part and the low-frequency part, and then the wavelet coefficients of the high-frequency part are used to reconstruct the subdivided components of the wind power, and the wavelet coefficients of the low-frequency part are used to reconstruct the approximate components of the wind power, such as Figure 2 As shown. The formula for wavelet reconstruction is:
[0049]
[0050] In the formula, is the wavelet coefficient of the high-frequency part or the low-frequency part, Reason The detailed component or approximate component of the reconstructed wind power.
[0051] Step 2: Taking the meteorological historical data as input and the approximate component of wind power as output, the first random forest RF model is trained to obtain the first prediction model of wind power; taking the meteorological historical data as input and the detailed component of wind power as output, the second random forest RF model is trained to obtain the second prediction model of wind power;
[0052] The random forest RF model establishes multiple decision trees. Each decision tree is randomly generated and independent of each other. In order to solve the same task and achieve the same final goal, the modeling results of multiple decision trees will be considered and averaged to determine the result.
[0053] In this embodiment, the training method of the first random forest RF model and the second random forest RF model is as follows: for the training sample set of each random forest RF model, m independent training subsets are extracted with replacement, and a random forest RF model consisting of m decision trees is established; each decision tree is trained using its own training subset as a base learner, and the prediction results of the m decision trees are calculated using the average principle to obtain the final prediction result of the final prediction model.
[0054] In this embodiment, each training sample is meteorological data and wind power time series within a certain historical period.
[0055] Step 3: Input the historical meteorological data into the first wind power prediction model and the second wind power prediction model respectively, and sum the output prediction results to obtain the predicted wind power.
[0056] Step 4: Subtract the predicted wind power from the actual wind power to obtain the wind power prediction error:
[0057] e=|P truth -P pred |;
[0058] Where P pred is the predicted wind power, P truth is the actual wind power;
[0059] Step 5: Use all sample points of wind power forecast error to fit the forecast error probability density distribution function using the logistic kernel density estimation method:
[0060]
[0061] Where x is the variable of the absolute error probability density distribution function, ε iis the absolute error of wind power at the i-th sample point of wind power prediction error e, N is the number of sample points included in the wind power prediction error e, h is the window width; and ∫f N (x)dx=1, thus ensuring the reasonable validity of KDE (Kernel Density Estimation);
[0062] Step 6: Calculate the confidence interval of wind power prediction based on the wind power prediction error probability density distribution function and the pre-selected confidence level; specifically:
[0063] Step 6.1: The probability density distribution function f of the wind power forecast error N (x) is integrated to obtain the error cumulative distribution function F(·);
[0064] Step 6.2, find the inverse function of the error cumulative distribution function F(·) and obtain the error inverse cumulative distribution function
[0065] Step 6.3, based on the pre-selected confidence level Compute confidence intervals for wind power forecasts using the inverse cumulative error distribution function:
[0066]
[0067] In the formula, is the pre-selected confidence level, is the inverse cumulative distribution function of the error, that is, the inverse function of the cumulative distribution function of the error F(·); and Respectively indicate that after determining the confidence Then, substitute the inverse error cumulative distribution function The two independent variable values of , that is, the two probability values: When calculating the lower limit of the wind power forecast interval, remove the other part of the function expression independent variables of the predicted wind power; When calculating the upper limit of the wind power forecast interval, remove the other part of the function expression independent variables of the predicted wind power; In this embodiment, and The value of is symmetric about 0.5, that is
[0068] Step 7, obtain the meteorological data of the target prediction period, input it into the first wind power prediction model and the second wind power prediction model respectively, sum the output prediction results, and obtain the deterministic prediction result of wind power in the target prediction period. The predicted wind power P pred ;
[0069] Step 8: Confidence interval of wind power forecast The deterministic forecast result P of wind power in the target forecast period pred By expanding the interval, the wind power forecast interval for the target forecast period is obtained as follows:
[0070]
[0071] Example 1
[0072] The data from November 8th to November 11th are used as the training set, and the data from the fifth day (November 12th) are used as the test set.
[0073] Before the experiment, the wind power was first decomposed by wavelet and Python was used for experimental simulation.
[0074] According to the above content, firstly, the wavelet transform is used to decompose the wind power historical data into approximate components and detailed components, and then each component is combined with the meteorological historical data to predict using the random forest RF algorithm (wherein the meteorological historical data includes: wind speed, wind direction, air pressure, temperature, humidity and other factors). Finally, the two prediction results are summed to obtain the final prediction result.
[0075] In order to reflect the prediction accuracy of the WT-RF model (i.e., the prediction model combining wavelet transform WT with random forest RF in the present invention), it is compared with the single random forest RF model. The prediction index comparison of the two algorithms is shown in Table 1. The comparison between the predicted wind power output and the actual value is shown in Table 1. Figure 3 As shown in the table, it can be seen that the mean square error (MSE) of the WT-RF model is 0.013645 lower than that of the RF model; the mean absolute error (MAE) of the WT-RF model is 0.001744 lower than that of the RF model; the coefficient of determination (R 2 ) index is 0.01783 higher; the prediction indexes of WT-RF model are obviously better than those of single RF model. Therefore, the prediction accuracy of this method is significantly improved compared with other algorithms.
[0076] In addition, this experiment also sets the pre-selected confidence levels to 80%, 85%, 90%, and 95%, respectively, and uses the WT-RF model of the present invention to perform interval prediction of wind power, and obtains the following: Figure 4-7 The schematic diagram of wind power prediction interval is shown, and it can be obtained that the actual wind power output is basically within the prediction interval.
[0077] Table 1 Comparison of prediction errors of two models
[0078]
[0079] The invention has been described with reference to a few embodiments. However, it is readily apparent to a person skilled in the art that other embodiments than the ones disclosed above are equally within the scope of the invention, as defined by the appended patent claims.
[0080] The above embodiments are preferred embodiments of the present application. Ordinary technicians in this field can also make various changes or improvements on this basis. Without departing from the overall concept of the present application, these changes or improvements should fall within the scope of protection required by the present application.
Claims
1. A wind power confidence interval prediction method based on wavelet transform, characterized in that: The following steps are involved: Step 1, obtaining historical meteorological data and historical wind power data, performing wavelet decomposition on the historical wind power data, and obtaining approximate components and detailed components of wind power; The wavelet decomposition is performed on the historical data of wind power to obtain the approximate component and the detailed component of the wind power, specifically: the historical data of wind power is decomposed by wavelet, the wavelet coefficients obtained are analyzed by using the Mallat algorithm to obtain the wavelet coefficients of the historical data of wind power in the high-frequency part and the low-frequency part respectively, the wavelet coefficients of the high-frequency part are used to reconstruct the detailed part of the wind power, and the wavelet coefficients of the low-frequency part are used to reconstruct the approximate part of the wind power; Step 2, using meteorological historical data as input and the approximate component of wind power as output, training a first random forest RF model to obtain a first wind power prediction model; Taking meteorological historical data as input and detailed components of wind power as output, the second random forest RF model is trained to obtain the second wind power prediction model; The training method of the first random forest RF model and the second random forest RF model is as follows: for each random forest RF model training sample set, both are extracted with replacement independent training subsets, and establish A random forest RF model consisting of decision trees; each decision tree is trained as a base learner using its own training subset. The prediction results of the decision trees are calculated using the average principle to obtain the final prediction results of the final prediction model; Step 3, inputting the meteorological historical data into the first wind power prediction model and the second wind power prediction model respectively, and summing the prediction results obtained by output to obtain the predicted wind power; Step 4, subtracting the predicted wind power from the actual wind power to obtain a wind power prediction error; Step 5, using all sample points of wind power prediction error, a logistic kernel density estimation method is used to fit the prediction error probability density distribution function; The absolute error probability density distribution function obtained by fitting using the kernel density estimation method is: ; In the formula, is the variable of the absolute error probability density distribution function, is the wind power prediction error The absolute error of wind power at each sample point is is the number of sample points included in the wind power prediction error, is the window width; and ; Step 6, calculating the confidence interval of the wind power prediction according to the wind power prediction error probability density distribution function and the pre-selected confidence level; Step 7, obtaining meteorological data for the target prediction period, inputting the meteorological data into the first wind power prediction model and the second wind power prediction model respectively, summing the output prediction results, and obtaining the wind power predicted by the deterministic wind power prediction result for the target prediction period; Step 8: According to the confidence interval of the wind power prediction, the deterministic prediction result of the wind power in the target prediction period is interval-expanded to obtain the wind power prediction interval in the target prediction period.
2. The method according to claim 1, characterized in that The step 6 is specifically as follows: Step 6.1, integrating the probability density distribution function of the wind power prediction error to obtain the error cumulative distribution function; Step 6.2, find the inverse function of the error cumulative distribution function to obtain the error inverse cumulative distribution function; Step 6.3, calculate the confidence interval of wind power forecast using the inverse cumulative distribution function of error according to the pre-selected confidence level: ; In the formula, , is the pre-selected confidence level, , and are confidence intermediate variables respectively; is the inverse cumulative distribution function of the error, that is, the cumulative distribution function of the error The inverse function of .
3. The method according to claim 2, characterized in that Step 8 performs interval expansion to obtain the wind power forecast interval for the target forecast period: , It is the deterministic forecast result of wind power in the target forecast period.
4. The method according to claim 1, characterized in that Meteorological data includes wind speed, direction, air pressure, temperature and humidity.
5. A wind power confidence interval prediction device based on wavelet transform, characterized in that: It comprises a processor and a memory; wherein: the memory is used to store computer instructions; the processor is used to execute the computer instructions stored in the memory, specifically executing the method according to any one of claims 1-4.
6. A computer storage medium, characterized in that: Used to store a program, which, when executed, is used to implement the method according to any one of claims 1 to 4.
