Wind power prediction method based on clustering analysis and convolutional neural network
By employing wavelet soft thresholding denoising, k-means++ clustering, and grey relational analysis, combined with convolutional neural networks, a wind power prediction model was constructed. This model solved the problems of noise and uncertainty in wind power data, achieving high-precision wind power prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID FUJIAN ELECTRIC POWER CO LTD
- Filing Date
- 2023-04-20
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies are insufficient to effectively improve the prediction accuracy of wind power data, especially when wind power penetration is high. The uncertainty of wind power in the power system brings operational challenges, and the noise of the raw wind power data has a significant impact.
A wavelet soft thresholding denoising method is used to process wind power data. Combined with k-means++ clustering analysis and grey relational analysis, a wind power prediction model based on convolutional neural network is constructed. By obtaining the correlation between historical wind speed reference scenarios and wind power, short-term predictions are made.
It achieves more accurate and efficient wind power forecasting, effectively reducing the impact of wind power uncertainty on the power system and providing reliable forecast values for grid dispatch.
Smart Images

Figure CN116565839B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy power prediction in power systems, specifically to a wind power prediction method based on cluster analysis and convolutional neural networks. Background Technology
[0002] Wind power generation is one of the important means for power grids to respond to energy transition. However, the high penetration rate of wind power will bring huge challenges to the normal operation of the power system. Researching how to improve the prediction accuracy of wind power data can effectively promote the grid's ability to absorb wind power, thereby reducing the harm caused by the uncertainty of wind power. Wind power prediction methods can be broadly divided into physical calculation methods and statistical learning methods. The accuracy of wind power prediction using physical calculation methods depends on the accuracy of the established model. The model has a large amount of computation and high complexity, making it difficult to be widely promoted. Statistical learning methods can achieve relatively accurate wind power prediction results by learning the features of historical wind power data. In recent years, deep learning algorithms have developed rapidly, providing an effective technical method for wind power prediction. Deep learning methods can achieve short-term or ultra-short-term wind power prediction by mining the deep features of historical data and establishing implicit models of data mapping. In addition, wind power has strong fluctuation characteristics and the original wind power data often carries noise components. To mitigate the impact of noise on wind power prediction, it is necessary to preprocess or decompose the original wind power data before prediction to improve the accuracy of the subsequent prediction model. Summary of the Invention
[0003] The purpose of this invention is to provide a wind power prediction method based on cluster analysis and convolutional neural networks. By acquiring typical scenarios of historical wind power and predicting the wind power fluctuation range of the target day through the optimal scenario set, it can effectively take into account the uncertainty of wind power and achieve short-term prediction of wind power.
[0004] To achieve the above objectives, the technical solution of this invention is as follows: a wind power prediction method based on clustering analysis and convolutional neural networks. First, wavelet soft thresholding denoising is used to process the original wind power data, and k-means++ clustering is used to perform clustering analysis on the denoised wind power data to obtain a set of historical wind speed reference scenarios. Second, the median sequence of wind speed reference intervals is calculated, using wind power data as the parent sequence and the median sequence of wind speed reference intervals as the child sequence. Grey relational analysis is used to analyze the correlation between the two, matching a set of wind speed reference scenarios for each set of wind power data to construct a comprehensive dataset. Then, a wind power prediction model based on convolutional neural networks is built and trained offline using the comprehensive dataset. Finally, correlation analysis is performed on the predicted NWP wind speed value and the historical wind speed reference interval for the prediction day to obtain the optimal reference scenario set for the prediction day, which is then input into the wind power prediction model to obtain the wind power value for the prediction day. By adding random noise to the wind speed forecast value, multiple sets of predicted output values are obtained, constructing an interval value for wind power output. The specific implementation steps of this method are as follows:
[0005] Step S1: Input historical NWP wind speed forecast data and wind power data;
[0006] Step S2: Select a wavelet basis to decompose the original wind speed forecast data and extract wavelet coefficients;
[0007] Step S3: Select an adaptive threshold for the time series using the unbiased risk estimation threshold method;
[0008] Step S4: Select a soft thresholding function to filter the wavelet coefficients containing noise, where the soft thresholding function is:
[0009]
[0010] In the formula, sign is the sign function, and ω j,k w represents the k-th wavelet coefficient at the j-th scale after wavelet decomposition of the time series. j,k The λ represents the wavelet estimation coefficients, and the λ represents the threshold.
[0011] Step S5: Reconstruct the wavelet coefficients after filtering to obtain the reconstructed wind speed sequence set;
[0012] Step S6: Use the elbow method to determine the optimal number of clusters k, and randomly select a wind speed sequence from the reconstructed wind speed sequence set as the first initial cluster center C1;
[0013] Step S7: Calculate the shortest Euclidean distance between each sequence in the wind speed sequence set and the current existing cluster center C1. The formula for calculating the distance is:
[0014]
[0015] In the formula, x i Let N represent the i-th sequence, and N be the total number of wind speed sequences in the wind speed sequence set.
[0016] Step S8: Select other cluster centers based on the principle of maximizing the distance between cluster centers, and calculate the probability that each wind speed sequence is selected as a cluster center:
[0017]
[0018] In the formula, x i Let X represent the i-th sequence, and C represent the set of wind speed sequences. now Let D(x) be the current cluster center. i C now ) represents the distance between the i-th sequence and the current cluster center;
[0019] Step S9: Select the sequence with the highest probability P(x) as the new cluster center, and repeat this process until k cluster centers are selected;
[0020] Step S10: Calculate the distance between each sequence and the cluster center, determine the cluster of each sequence based on the minimum distance, and recalculate the cluster center for each cluster.
[0021]
[0022] Step S11: Repeat the iterative process until the preset number of iterations is reached to obtain a set of k wind speed sequence reference scenarios;
[0023] Step S12: Calculate the upper and lower limits of the k wind speed sequence reference scene sets as wind speed reference intervals, and calculate the median of the wind speed reference intervals.
[0024] Step S13: Select a historical wind power sequence as the mother wind speed sequence, denoted as y0, and use the median of all wind speed reference intervals as the subsequence of wind speed, denoted as (y1, y2, …, y m );
[0025] Step S14: Preprocess the wind speed mother sequence and wind speed subsequence, that is, first calculate the mean of each sequence, then divide the entire sequence by the mean to obtain the standardized sequence:
[0026]
[0027] Step S15: Calculate the correlation coefficient between each wind speed subsequence and the wind speed parent sequence:
[0028]
[0029] Where y0(j) represents the j-th sample value of the wind speed mother sequence, y i (j) represents the j-th sample value of the i-th wind speed subsequence, a represents the minimum range between the wind speed mother sequence and the wind speed subsequence, b represents the maximum range between the wind speed mother sequence and the wind speed subsequence, and ρ represents the resolution coefficient.
[0030]
[0031] Step S16: Calculate the mean of each column of correlation coefficients and calculate the grey correlation degree between each wind speed subsequence and the preset wind speed parent sequence;
[0032]
[0033] Step S17: Based on the grey relational degree calculated in step 16, select the wind speed subsequence with the highest correlation to the mother sequence, and use the wind speed reference scene set corresponding to the wind speed subsequence as the optimal reference scene set of the mother sequence.
[0034] Step S18: Repeat steps 13 to 17 to calculate the optimal reference scenario set corresponding to all wind power sequences. Each wind power sequence and its corresponding optimal reference scenario set is a set of data, and there are N sets of data in total.
[0035] Step S19: Construct a wind power prediction model based on convolutional neural networks. Split the N sets of data into training and test sets in an 8:2 ratio. The model structure has five layers, each consisting of a 2D convolutional layer and an activation function. The activation function of layers 1-4 is set to LeakyReLU, and the activation function of the last layer is set to ReLU.
[0036] Step S20: Iteratively train the wind power prediction model;
[0037] Step S21: During the testing phase, the wind speed forecast value provided by the NWP for the day to be predicted is used. Similarly, the grey relational analysis method is used to analyze the wind speed forecast value and the wind speed reference scenario set to obtain the optimal wind speed reference scenario set for the day to be predicted, and use it as the input of the wind power prediction model to obtain the wind power on the predicted day.
[0038] Step S22: Add random Gaussian noise to the original wind speed forecast value provided by NWP, and construct the interval value of wind power output after multiple predictions;
[0039] Step S23: Output the wind power data range for the predicted day and perform the next prediction.
[0040] Compared with existing technologies, this invention has the following advantages: The wavelet soft thresholding denoising method effectively removes noise from the original wind power data, facilitating the extraction of data distribution features. The k-means++ clustering algorithm effectively solves the problem of initial value selection in the original k-means algorithm, enabling better clustering of wind power data and obtaining a reference scene set for wind speed. Grey relational analysis is used to obtain the statistical correlation between wind power data and the historical optimal scene set, thereby establishing a wind power prediction model based on a convolutional neural network. The proposed wind power prediction method based on clustering analysis and convolutional neural networks can fully explore the probability distribution characteristics of historical wind power data and consider the correlation between wind power data from multiple time periods, ultimately obtaining a wind power prediction model that can more accurately and efficiently predict wind power on target days, thus providing more reliable wind power prediction values for subsequent power system dispatch and operation. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0042] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.
[0043] like Figure 1 As shown, this invention provides a wind power prediction method based on cluster analysis and convolutional neural networks, comprising the following steps:
[0044] Step S1: Input historical NWP wind speed forecast data and wind power data;
[0045] Step S2: Select a wavelet basis to decompose the original wind speed forecast data and extract wavelet coefficients;
[0046] Step S3: Select an adaptive threshold for the time series using the unbiased risk estimation threshold method;
[0047] Step S4: Select a soft thresholding function to filter the wavelet coefficients containing noise, where the soft thresholding function is:
[0048]
[0049] In the formula, sign is the sign function, and ω j,k w represents the k-th wavelet coefficient at the j-th scale after wavelet decomposition of the time series. j,k The λ represents the wavelet estimation coefficients, and the λ represents the threshold.
[0050] Step S5: Reconstruct the wavelet coefficients after filtering to obtain the reconstructed wind speed sequence set;
[0051] Step S6: Use the elbow method to determine the optimal number of clusters k, and randomly select a wind speed sequence from the reconstructed wind speed sequence set as the first initial cluster center C1;
[0052] Step S7: Calculate the shortest Euclidean distance between each sequence in the wind speed sequence set and the current existing cluster center C1. The formula for calculating the distance is:
[0053]
[0054] In the formula, x i Let N represent the i-th sequence, and N be the total number of wind speed sequences in the wind speed sequence set.
[0055] Step S8: Select other cluster centers based on the principle of maximizing the distance between cluster centers, and calculate the probability that each wind speed sequence is selected as a cluster center:
[0056]
[0057] In the formula, x i Let X represent the i-th sequence, and C represent the set of wind speed sequences. now Let D(x) be the current cluster center. i C now ) represents the distance between the i-th sequence and the current cluster center;
[0058] Step S9: Select the sequence with the highest probability P(x) as the new cluster center, and repeat this process until k cluster centers are selected;
[0059] Step S10: Calculate the distance between each sequence and the cluster center, determine the cluster of each sequence based on the minimum distance, and recalculate the cluster center for each cluster.
[0060]
[0061] Step S11: Repeat the iterative process until the preset number of iterations is reached to obtain a set of k wind speed sequence reference scenarios;
[0062] Step S12: Calculate the upper and lower limits of the k wind speed sequence reference scene sets as wind speed reference intervals, and calculate the median of the wind speed reference intervals.
[0063] Step S13: Select a historical wind power sequence as the mother wind speed sequence, denoted as y0, and use the median of all wind speed reference intervals as the subsequence of wind speed, denoted as (y1, y2, …, y m );
[0064] Step S14: Preprocess the wind speed mother sequence and wind speed subsequence, that is, first calculate the mean of each sequence, then divide the entire sequence by the mean to obtain the standardized sequence:
[0065]
[0066] Step S15: Calculate the correlation coefficient between each wind speed subsequence and the wind speed parent sequence:
[0067]
[0068] Where y0(j) represents the j-th sample value of the wind speed mother sequence, y i (j) represents the j-th sample value of the i-th wind speed subsequence, a represents the minimum range between the wind speed mother sequence and the wind speed subsequence, b represents the maximum range between the wind speed mother sequence and the wind speed subsequence, and ρ represents the resolution coefficient.
[0069]
[0070] Step S16: Calculate the mean of each column of correlation coefficients and calculate the grey correlation degree between each wind speed subsequence and the preset wind speed parent sequence;
[0071]
[0072] Step S17: Based on the grey relational degree calculated in step 16, select the wind speed subsequence with the highest correlation to the mother sequence, and use the wind speed reference scene set corresponding to the wind speed subsequence as the optimal reference scene set of the mother sequence.
[0073] Step S18: Repeat steps 13 to 17 to calculate the optimal reference scenario set corresponding to all wind power sequences. Each wind power sequence and its corresponding optimal reference scenario set is a set of data, and there are N sets of data in total.
[0074] Step S19: Construct a wind power prediction model based on a convolutional neural network. Split the N sets of data into training and test sets in an 8:2 ratio. The structure of the convolutional neural network is shown in Table 1. The model has five layers, each consisting of a 2D convolutional layer and an activation function. The activation function of layers 1-4 is set to LeakyReLU, and the activation function of the last layer is set to ReLU.
[0075] Table 1. Convolutional Neural Network Structure
[0076]
[0077] Step S20: Iteratively train the wind power prediction model.
[0078] Step S21: During the testing phase, the wind speed forecast value provided by the NWP for the day to be predicted is used. Similarly, the grey relational analysis method is used to analyze the wind speed forecast value and the wind speed reference scenario set to obtain the optimal reference scenario set for the wind speed on the day to be predicted. This scenario set is used as the input of the convolutional neural network to obtain the wind power on the predicted day.
[0079] Step S22: Add random Gaussian noise to the original wind speed forecast value provided by NWP, and construct the interval value of wind power output after multiple predictions;
[0080] Step S23: Output the wind power data range for the predicted day and perform the next prediction.
[0081] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.
Claims
1.A wind power prediction method based on cluster analysis and convolutional neural network, characterized in that, The specific implementation steps of this method are as follows: Step S1: Input historical NWP wind speed forecast data and wind power data; Step S2: Select a wavelet basis to decompose the original wind speed forecast data and extract wavelet coefficients; Step S3: Select an adaptive threshold for the time series using the unbiased risk estimation threshold method; Step S4: Select a soft thresholding function to filter the wavelet coefficients containing noise, where the soft thresholding function is: In the formula, sign is the sign function, and ω j,k w represents the k-th wavelet coefficient at the j-th scale after wavelet decomposition of the time series. j,k The λ represents the wavelet estimation coefficients, and λ represents the threshold. Step S5: Reconstruct the wavelet coefficients after filtering to obtain the reconstructed wind speed sequence set; Step S6: Use the elbow method to determine the optimal number of clusters k, and randomly select a wind speed sequence from the reconstructed wind speed sequence set as the first initial cluster center C1; Step S7: Calculate the shortest Euclidean distance between each sequence in the wind speed sequence set and the current existing cluster center C1. The formula for calculating the distance is: In the formula, x i Let N represent the i-th sequence, and N be the total number of wind speed sequences in the wind speed sequence set. Step S8: Select other cluster centers based on the distance between cluster centers, and calculate the probability that each wind speed sequence is selected as a cluster center: In the formula, x i Let X represent the i-th sequence, and C represent the set of wind speed sequences. now Let D(x) be the current cluster center. i C now ) represents the distance between the i-th sequence and the current cluster center; Step S9: Select probability The largest sequence is selected as the new cluster center, and this process is repeated until k cluster centers are selected. Step S10: Calculate the distance between each sequence and the cluster center, determine the cluster of each sequence based on the minimum distance, and recalculate the cluster center for each cluster. Step S11: Repeat the iterative process until the preset number of iterations is reached to obtain a set of k wind speed sequence reference scenarios; Step S12: Calculate the upper and lower limits of the k wind speed sequence reference scene sets as wind speed reference intervals, and calculate the median of the wind speed reference intervals. Step S13: Select a historical wind power sequence as the mother wind speed sequence, denoted as y0, and use the median of all wind speed reference intervals as the subsequence of wind speed, denoted as (y1, y2, …, y m ); Step S14: Preprocess the wind speed mother sequence and wind speed subsequence, that is, first calculate the mean of each sequence, then divide the entire sequence by the mean to obtain the standardized sequence: Step S15: Calculate the correlation coefficient between each wind speed subsequence and the wind speed parent sequence: Where y0(j) represents the j-th sample value of the wind speed mother sequence, y i (j) represents the j-th sample value of the i-th wind speed subsequence, a represents the minimum range between the wind speed mother sequence and the wind speed subsequence, b represents the maximum range between the wind speed mother sequence and the wind speed subsequence, and ρ represents the resolution coefficient. Step S16: Calculate the mean of each column of correlation coefficients and calculate the grey correlation degree between each wind speed subsequence and the preset wind speed parent sequence; Step S17: Based on the grey relational degree calculated in step 16, select the wind speed subsequence with the highest grey relational degree to the mother sequence, and use the wind speed reference scene set corresponding to the wind speed subsequence as the optimal reference scene set of the mother sequence. Step S18: Repeat steps 13 to 17 to calculate the optimal reference scenario set corresponding to all wind power sequences. Each wind power sequence and its corresponding optimal reference scenario set is a set of data, and there are N sets of data in total. Step S19: Construct a wind power prediction model based on convolutional neural networks. Split the N sets of data into training and test sets in an 8:2 ratio. The model structure has five layers, each consisting of a 2D convolutional layer and an activation function. The activation function of layers 1-4 is set to LeakyReLU, and the activation function of the last layer is set to ReLU. Step S20: Iteratively train the wind power prediction model; Step S21: During the testing phase, the wind speed forecast value provided by the NWP for the day to be predicted is used. Similarly, the grey relational analysis method is used to analyze the wind speed forecast value and the wind speed reference scenario set to obtain the optimal wind speed reference scenario set for the day to be predicted, and use it as the input of the wind power prediction model to obtain the wind power on the predicted day. Step S22: Add random Gaussian noise to the original wind speed forecast value provided by NWP, and construct the interval value of wind power output after multiple predictions; Step S23: Output the wind power data range for the predicted day and perform the next prediction.