Ultra-short-term wind power prediction method based on scene real-time switching
By segmenting the wind speed fluctuation characteristics in scenes and designing matching prediction models, the problem of low prediction accuracy of wind power in the prior art is solved, and higher prediction accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202510090719.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
Smart Images

Figure CN120012040A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wind power generation, and specifically relates to an ultra-short-term wind power prediction method based on real-time scene switching. Scenes are divided according to the wind speed fluctuation characteristics of annual historical data of wind farms, and scene recognition and corresponding model calls are performed on real-time data to obtain real-time ultra-short-term wind power prediction results. Background Art
[0002] As the global energy structure transforms to renewable energy, wind energy, as one of the important clean energy sources, has rapidly increased its share in the power system. However, wind energy resources have obvious intermittent and random characteristics, and wind power output is highly dependent on changes in wind speed, which poses a huge challenge to the accurate prediction of wind power.
[0003] Current research shows that the fluctuation characteristics of wind speed directly affect the output of wind power. However, most prediction methods, such as the document "A combined prediction model for short-term wind speed in wind farms", use a single model for wind power prediction, which is difficult to adapt to various wind speed fluctuation scenarios at the same time. This is mainly reflected in the following aspects: in complex wind speed fluctuation scenarios, a single model often finds it difficult to capture the nonlinear changes in wind speed, resulting in underfitting; while in relatively stable wind speed scenarios, the same model is too sensitive to slight fluctuations in data, resulting in overfitting, thereby reducing the prediction accuracy. The document "A data mining approachcombining K-means clustering with bagging neural network for short-term windpower forecasting" attempts to classify samples based on similar days and wind power according to meteorological factors such as wind speed, temperature, and air pressure, and realize grouped power prediction under different meteorological modes. However, when this method classifies samples with different wind speed levels on the same day into the same category, it is difficult to effectively distinguish high wind speed from low wind speed data, resulting in an increase in noise data in each cluster, thereby reducing the prediction accuracy. Summary of the invention
[0004] In order to solve the shortcomings of the prior art, the present invention provides an ultra-short-term wind power prediction method based on real-time scene switching. The method divides scenes by analyzing the wind speed fluctuation characteristics, and designs a more matching prediction model for each scene, and predicts the prediction data by real-time scene switching. The present invention realizes the detailed division of wind power operation scenes through more accurate analysis of wind speed fluctuation characteristics, effectively reduces noise interference, and significantly improves the accuracy of wind power prediction and the adaptability of the model.
[0005] In order to achieve the objective of the present invention, the following technical solution is adopted: a method for ultra-short-term wind power prediction based on real-time scene switching is designed, characterized in that the method comprises the following steps:
[0006] Step 1: Obtain the original data of historical wind speed, historical wind power and historical wind direction of the target wind farm for no less than one year, clean the original data, remove invalid data and use interpolation to supplement missing data, then sample data at a fixed time interval M to obtain historical wind speed time series data, historical wind power time series data and historical wind direction time series data; divide the historical wind speed time series data into multiple time series segments according to a fixed number of continuous sampling points D, and calculate the feature vector of each historical wind speed time series segment; D is not less than 3;
[0007] Step 2: Obtain the feature vectors of all historical wind speed time series segments, cluster these feature vectors using the K-Means clustering algorithm, and divide them into K wind power scenarios;
[0008] Step 3: Calculate the silhouette coefficients corresponding to different cluster numbers K respectively, and take the K value corresponding to the maximum silhouette coefficient as the most suitable cluster number for the feature vector of the historical wind speed time series segment, that is, obtain the optimal number of wind power scenarios;
[0009] Step 4: According to the number of optimal wind power scenarios obtained in step 3, calculate the sample entropy of the historical wind speed time series data and the sample entropy of the historical wind power time series data corresponding to each wind power scenario, and divide the strong fluctuation scenario into the weak fluctuation scenario according to the size of the sample entropy;
[0010] Step 5: Use the historical wind speed time series data, historical wind power time series data, and historical wind direction time series data of each strong fluctuation scenario to train the CNN-BIGRU model to obtain a prediction model for each strong fluctuation scenario;
[0011] Step 6: Use the historical wind speed time series data, historical wind power time series data, and historical wind direction time series data of weak fluctuation scenarios to train the LSSVM model and obtain a prediction model for weak fluctuation scenarios;
[0012] Step 7: Ultra-short-term wind power forecasting based on real-time scenario switching
[0013] The original data of historical wind speed, wind power and wind direction of the target wind farm before the sampling point to be predicted in step 1 are obtained in real time for a period of no less than D×M, and the original data are cleaned, invalid data are eliminated and missing data are supplemented by interpolation. Then, data sampling is performed at a fixed time interval M, and wind speed time series segments, wind power time series segments and wind direction time series segments of D consecutive sampling points before the sampling point to be predicted are selected; the characteristic vector of the wind speed time series segment is calculated according to the data values of the wind speed time series segments of the D sampling points by the method in the first step, and then the characteristic vector and the number of wind power scenarios in each cluster of the optimal wind power scenarios in step 3 are calculated. The Euclidean distance of the center point is the smallest, and the wind power scene with the smallest distance is the wind power scene to which the wind speed time series segment belongs; then, according to the type of strong fluctuation scene or weak fluctuation scene to which the wind power scene belongs, the corresponding prediction model is selected; according to the selected prediction model, the wind speed time series segments, wind power time series segments and wind direction time series segments of D-1 consecutive sampling points before the sampling point to be predicted are used to obtain the wind power prediction value of the sampling point to be predicted; the wind speed time series segments, wind power time series segments and wind direction time series segments of D consecutive sampling points are continuously collected in a rolling manner, and the above process of selecting the prediction model and obtaining the wind power prediction value of the sampling point to be predicted is repeated, and the prediction result can be obtained in real time.
[0014] Compared with the existing method, the beneficial effects of the present invention are:
[0015] (1) The present invention analyzes the fluctuation characteristics of the wind speed time series to obtain a feature vector that can characterize the degree of wind speed fluctuation. Subsequently, the K-means clustering algorithm is used for clustering, and the wind power time series segments in different time periods are divided into K wind power scenes. This process can not only effectively identify the differences in the fluctuation level and change law of wind speed time series data, but also lay a data foundation for the subsequent selection of a more adaptable prediction model.
[0016] (2) After completing the scene division, the present invention further distinguishes strong fluctuation and weak fluctuation scenes by combining the sample entropy values of each scene. For strong fluctuation scenes where wind speed and power data are highly nonlinear and strongly coupled, the CNN-BIGRU model is introduced to fully exploit the complex time series characteristics; in weak fluctuation scenes, since the wind power series fluctuation is relatively low and prone to overfitting, the present invention uses the least squares support vector machine (LSSVM) model for training, thereby taking into account both accuracy and generalization ability.
[0017] (3) In the actual application stage, by real-time monitoring of the wind speed fluctuation in the previous time series segment before the prediction moment, the corresponding characteristic index is calculated and compared with the existing scene cluster center to identify the current scene. Subsequently, the prediction model matching the scene is called to generate the wind power prediction result, realizing dynamic and high-precision prediction of wind power. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The present invention is a flow chart of an embodiment of an ultra-short-term wind power prediction method based on real-time scene switching.
[0019] Figure 2 This is a schematic diagram of an embodiment of an ultra-short-term wind power prediction method based on real-time scene switching of the present invention.
[0020] Figure 3 The annual wind power sequence fragment of an embodiment is divided into a historical wind speed (Wind Speed, the same below) and historical wind power (Power Output, the same below) distribution diagram in the first scene of six scenes using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention.
[0021] Figure 4 In one embodiment, an annual wind power sequence fragment is divided into a historical wind speed and historical wind power distribution diagram in the second scene among six scenes using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention.
[0022] Figure 5 An annual wind power sequence fragment of an embodiment is divided into a historical wind speed and historical wind power distribution diagram in the third scene among six scenes using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention.
[0023] Figure 6 An annual wind power sequence fragment of an embodiment is divided into a historical wind speed and historical wind power distribution diagram in the fourth scene among six scenes using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention.
[0024] Figure 7 An annual wind power sequence fragment of an embodiment is divided into a historical wind speed and historical wind power distribution diagram in the fifth of six scenes using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention.
[0025] Figure 8 An annual wind power sequence fragment of an embodiment is divided into a historical wind speed and historical wind power distribution diagram in the sixth scene among six scenes using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention.
[0026] Fig. 9 This is a diagram of prediction results when using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention on data set 1 in different scene divisions.
[0027] Fig.10 This is a diagram of prediction results when using an ultra-short-term wind power prediction method based on real-time scene switching of the present invention on data set 2 in different scene divisions. DETAILED DESCRIPTION
[0028] The present invention is further explained below in conjunction with the embodiments and drawings, but this is not intended to limit the scope of protection of the present application.
[0029] This embodiment provides an ultra-short-term wind power prediction method based on real-time scene switching, the method comprising the following steps:
[0030] Step 1: Obtain the original data of historical wind speed, historical wind power and historical wind direction of the target wind farm for no less than one year, clean the original data, remove invalid data and use interpolation to supplement missing data, then sample the data at a fixed time interval M to obtain the time series data of historical wind speed, historical wind power and historical wind direction; divide the historical wind speed time series data into multiple time series segments according to a fixed number of continuous sampling points D, and calculate the feature vector of each historical wind speed time series segment; D is not less than 3; M is not more than 30 minutes.
[0031] The annual wind turbine operation data set and weather forecast data (wind speed, wind power, wind direction, temperature) of a wind farm in Zhangjiakou, China from January 1, 2019 to December 30, 2019 were selected. The sampling time interval was 10 minutes, and the historical wind speed, historical wind power and historical wind direction time series data were obtained. First, the wind speed time series data for one year was grouped according to 6 sampling points per hour and divided into multiple time series segments, one of which was represented by {x wi}={x w (i), x w (i+1), x w (i+2), x w (i+3), x w (i+4), x w (i+5)}. For each historical wind speed time series segment {x wi}, calculate the average wind speed M speed 、Maximum wind speed speed 、Minimum wind speed speed and wind speed residual Res speedFour statistical indicators are used to comprehensively describe the wind speed fluctuations in the segment. The average wind speed reflects the overall level of wind speed in the time segment, the maximum wind speed and the minimum wind speed capture the peak and valley values of the wind speed respectively, and the wind speed residual is used to evaluate the randomness and complexity of wind speed fluctuations. In order to eliminate the dimensional influence between different statistical indicators, each statistical indicator is standardized, and the four standardized statistical indicators are denoted as M speedi , Max speedi 、Min speedi 、Res speedi , record the historical wind speed time series fragment {x wi The eigenvector of} is F i , then F i =[M speedi ,Max speedi ,Min speedi ,Res speedi ].
[0032] Step 2: Obtain the feature vectors of all historical wind speed time series segments, cluster these feature vectors using the K-Means clustering algorithm, and divide them into K wind power scenarios.
[0033] In the ultra-short-term forecasting of wind power, accurately classifying different wind speed fluctuation scenarios is crucial to improving the forecasting accuracy. This paper adopts the K-Means clustering algorithm to effectively divide the wind power scenarios based on the wind speed fluctuation index, thereby providing a classification basis for the subsequent forecasting model.
[0034] The specific steps of the K-Means clustering algorithm are as follows: First, randomly initialize and select the feature vectors of K historical wind speed time series segments as the initial cluster centers. Then, calculate the Euclidean distance between the feature vector of each historical wind speed time series segment and all cluster centers, and assign it to the cluster to which the nearest cluster center belongs. Next, calculate the average value of all data in each cluster to modify the cluster center point u j , N k represents the number of eigenvectors of the historical wind speed time series segments in the kth class, The feature vector representing the i-th historical wind speed time series segment in the k-th category. The iteration is repeated until the preset number of iterations is reached. Through this iterative process, the K-Means clustering algorithm can effectively cluster time segments with similar wind speed fluctuation characteristics into the same category, thereby realizing the division of wind power scene data.
[0035] Step 3: Calculate the silhouette coefficients corresponding to different cluster numbers K respectively, and take the K value corresponding to the maximum silhouette coefficient as the most suitable cluster number for the feature vector of the historical wind speed time series segment, that is, obtain the optimal number of wind power scenarios.
[0036] The silhouette coefficient SC is used as a clustering effect evaluation index to evaluate the quality of clustering by measuring the closeness of each data point in its cluster and the degree of separation from its nearest neighbor cluster. The value range of SC is -1 to 1, and the higher the value, the better the clustering effect. The calculation formula of the silhouette coefficient SC is as follows:
[0037]
[0038] In the formula, a i is the sample point i and its cluster C i The average Euclidean distance of all other sample points in b i is the distance between sample point i and the nearest non-cluster C e The average Euclidean distance of all sample points in K clusters, B represents the number of sample points in K clusters; C i represents the cluster where the sample point i belongs, |C i | is cluster C i The number of sample points in C e represents the cluster where the sample point e is located, |C e | is cluster C e The number of sample points in ; K is the number of clusters, d(i,j) represents the Euclidean distance between sample point i and sample point j, and d(i,e) is similar to this; the sample point refers to the feature vector of a historical wind speed time series segment.
[0039] Table 1 Clustering indicators under different K values
[0040]
[0041] It can be seen from Table 1 that when K=6, the value of SC is the highest, indicating that its clustering effect is the best.
[0042] Based on the above K-Means clustering method and the method for determining the optimal number of clusters, the annual wind power sequence fragments of the embodiment are divided into 6 scenes, and the scene division results are as follows: Figure 3-Figure 8 shown.
[0043] Step 4: According to the number of optimal wind power scenarios obtained in step 3, calculate the sample entropy of the historical wind speed time series data and the sample entropy of the historical wind power time series data corresponding to each wind power scenario, and divide the strong fluctuation scenario and the weak fluctuation scenario according to the size of the sample entropy.
[0044] This embodiment uses sample entropy to evaluate the volatility of wind power sequences in different scenarios, and divides strong and weak scenarios into strong and weak scenarios based on the strength of volatility. Taking historical wind power time series data as an example, the same operation is performed on historical wind speed time series data, and the specific calculation method of sample entropy is as follows:
[0045] Extract the corresponding wind power time series data in each divided scene. Assume that the corresponding historical wind power time series data in one of the scenes is {x p (1),x p (2),……,x p (N)}, where N is the number of sampling points in the scene, and then perform the following operations:
[0046] 1) Set the embedding dimension m and similarity tolerance r, and divide the historical wind power time series data into a set of vectors with dimension m in sequence. Then the i-th vector X m (i) is: X m (i) = {x p (i),x p (i+1),...,x p (i+m-1)}, where i=1, 2, ..., N-m+1, and similarly obtain the j-th m-dimensional vector X m (j).
[0047] 2) Calculate vector X m (i) With X m (j) The Euclidean distance d(X m (i),X m (j)); For each pair of vectors, if their distance is less than the similarity tolerance r, the two vectors are considered similar, and the number of vectors similar to the i-th vector is recorded, and its ratio to the total number of distances Nm is calculated, recorded as
[0048]
[0049] In the formula, i=1, 2,…, N-m+1, j≠i, and num represents the number.
[0050] 3) Definition The average value of A(m,r)
[0051]
[0052] 4) Increase the dimension to m+1, repeat the above steps 1-3, and obtain The average value A(m+1,r) is as follows:
[0053]
[0054] 5) The sample entropy value SE is defined as:
[0055]
[0056] The sample entropy values of each scene are compared, and any scene with a sample entropy value greater than 50% of the minimum sample entropy value is defined as a strong fluctuation scene, otherwise it is a weak fluctuation scene.
[0057] Table 2 Entropy values of samples in each scene
[0058]
[0059]
[0060] As shown in Table 2, the sample entropy values of scene 1 and scene 2 are both lower than 3, while the sample entropy values of the other scenes are relatively high. Scene 1 and scene 2 are defined as weak fluctuation scenes, and scenes 3, 4, 5 and scene 6 are defined as strong fluctuation scenes.
[0061] Step 5: Use the historical wind speed time series data, historical wind power time series data, and historical wind direction time series data of each strong fluctuation scenario to train the CNN-BIGRU model respectively to obtain a prediction model for each strong fluctuation scenario.
[0062] First, the historical wind speed time series data, historical wind power time series data and historical wind direction time series data in each strong fluctuation scene are uniformly normalized and preprocessed to eliminate the influence of different dimensions. In each strong fluctuation scene, the wind speed time series fragments, wind power time series fragments and historical wind direction time series fragments of 6 sampling points that are continuous in time are selected as a data sample, and several data samples are obtained in each strong fluctuation scene. The data samples of each strong fluctuation scene are divided according to the number of samples, of which no less than 60% are divided into training sets, and the rest are validation sets, which are used to train the CNN-BIGRU model to obtain the prediction model of the strong fluctuation scene. The wind speed data, wind power data and wind direction data of the first 5 sampling points in a data sample are used as the input of the CNN-BIGRU model, and the wind power data of the 6th sampling point are used as the reference value of the model output.
[0063] The CNN-BIGRU model first uses a convolutional neural network to extract local features in the time series. The convolution layer performs convolution operations on the input data through a sliding window, which can capture short-term patterns and local dependencies in the time series and improve the model's perception of complex fluctuations. After the convolution layer, the BiGRU layer is connected to capture long-term dependencies and bidirectional information flows in the time series. In the standard GRU layer, information is usually transmitted only from the past to the future along the time dimension, and the hidden state of the model at each moment is updated only based on the previous historical data. However, for some time series prediction tasks, information at future moments may also affect the prediction at the current moment. The BiGRU layer is a bidirectional GRU layer, which contains two standard GRU layers in opposite directions. The forward GRU reads data from front to back in normal time order, and the reverse GRU traverses the entire sequence in reverse order from the last time step, so that the sequence data can be processed in the forward and backward channels respectively, thereby extracting the historical features and potential future features of the time series at the same time. The GRU consists of a reset gate and an update gate. Let the input sequence be X T , the time step is marked as t = 1, 2, ..., 5, and at t = 1 to 5, the reset gate r of GRU is calculated in sequence t and update gate z t :
[0064] z t =σ(W xz x t +W hz h t-1 +b z )
[0065] r t =σ(W xr x t +W hr h t-1 +b r )
[0066]
[0067] In the formula, x t is the sequence X T The data corresponding to time step t, is the forward hidden state. The forward hidden state sequence obtained in the forward calculation of time step t=1,2,…,5 is σ(·) represents the sigmoid activation function, {W xr ,W hr, W xz ,W hz} and {b r ,b z} respectively represent the set of weight matrix and bias vector; is the candidate hidden state, W xh With W hh Represents two weight matrices, b r is the bias vector. Similarly, the backward hidden state of each time step is calculated separately to obtain the backward hidden state sequence Concatenate the hidden states of time step t to obtain a bidirectional hidden state vector h t .
[0068]
[0069] Take the bidirectional hidden state h of the last time step 5 As the final representation of the sequence, after linear mapping, the final output is the sequence X T The predicted data y T , that is, the predicted data of wind power data at the 6th sampling point, the calculation formula is:
[0070] y T =σ(W y h 5 +b y )
[0071] Where: W y and b y are the weight matrix and bias vector of the output layer respectively.
[0072] The CNN-BIGRU model was trained using the training set and validation set of each strong fluctuation scenario. During the model training process, the network parameters of the CNN-BIGRU model were first initialized using the random assignment method, the maximum number of iterations (Epoch) was set to 300, and the mean square error (MSE) was selected as the loss function. The Adam optimizer was used to reversely update the network parameters of the model. When the loss change was no more than 10 in 20 consecutive iterations on the validation set, the model was -4 , that is, the model is considered to have converged and the training is terminated early, retaining the model parameters with the best current performance, that is, the prediction model for the current strong fluctuation scenario is obtained.
[0073] Step 6: Use the historical wind speed time series data, historical wind power time series data, and historical wind direction time series data of weak fluctuation scenarios to train the LSSVM model and obtain a prediction model for weak fluctuation scenarios.
[0074] In weak fluctuation scenarios, the volatility of wind power series is low, and it is suitable to adopt traditional time series prediction models. The embodiment selects the least squares support vector machine (LSSVM) as the wind power prediction model in weak fluctuation scenarios.
[0075] In weak fluctuation scenarios, the volatility of wind speed data is usually more significant than that of power data. In order to further explore the potential correlation of wind speed characteristics on output power and reduce the interference of high-frequency fluctuations in wind speed data on model fitting, this study logarithmically transformed the wind speed data in weak fluctuation scenarios. Through logarithmic transformation, the dynamic range of the data can be effectively reduced, making the relationship between wind speed characteristics and power output more linear, thereby improving the performance of the prediction model. When establishing the LSSVM model, the appropriate kernel function-radial basis function is selected to enhance the nonlinear fitting ability of the model.
[0076] First, the data values in the historical wind speed time series data in all weak fluctuation scenarios are preprocessed by logarithmic transformation. Then, the logarithmically transformed historical wind speed time series data, historical wind power time series data, and historical wind direction time series data are selected, and the time series fragment data of 6 sampling points that are continuous in time are selected as a data sample, and several data samples are obtained. The data samples are divided according to the number of samples, of which no less than 60% are divided into training sets, and the rest are validation sets, which are used to train the LSSVM model to obtain a prediction model for weak fluctuation scenarios. The one-dimensional vector spliced from the wind speed data, wind power data, and wind direction data of the first 5 sampling points in a data sample is used as the input of the LSSVM model, and the wind power data of the 6th sampling point is used as the reference value of the LSSVM model output value.
[0077] LSSVM uses a nonlinear mapping function φ(x) to map the data samples in the training set to a high-dimensional feature space. Assume that the regression function is:
[0078] y=f(x)=ω T ·φ(x)+b
[0079] Where ω is the weight vector and b is the bias term.
[0080] In LSSVM regression, in order to measure the balance between prediction error and model complexity, the following objective function is introduced:
[0081]
[0082] sty i =ω T φ(x)+b+ξ i ,i=1,2,...,n
[0083] Where C is the regularization coefficient, which measures the trade-off between the complexity of the model and the fitting error; n is the number of data samples in the training set in the scenario; ξ i is the error term of the ith data sample, ξ i =y i -ω T Φ(x i)-b;y i is the true value of the ith data sample.
[0084] To solve the above optimization problem, the Lagrangian function is usually used:
[0085]
[0086] where λ i Denotes the i-th Lagrangian operator, calculates partial derivatives of ω, b, ξ, and λ respectively and sets them equal to zero, and then solves a set of linear equations. Finally, the linear expression of LSSVM is obtained as follows:
[0087]
[0088] where K(x,x i ) represents the kernel function, x represents the concatenated vector of wind speed data, wind power data and wind direction data input at the current moment, and x i is the concatenated vector corresponding to the i-th data sample in the training set, from which the λ of the regression function can be obtained i With b.
[0089] The LSSVM model was trained using the training set. During the model training process, the maximum number of iterations was set to 8000, and the mean square error (MSE) was selected as the loss function. At the same time, the early stopping strategy was adopted. When the loss change was no more than 10 in 50 consecutive iterations on the validation set, the model was stopped. -4 , that is, the model is considered to have converged and the training is terminated early, retaining the model parameters with the best current performance, that is, the prediction model for the weak fluctuation scenario is obtained.
[0090] Step 7: Ultra-short-term wind power forecasting based on real-time scenario switching
[0091] Obtain in real time the historical wind speed original data, historical wind power original data and historical wind direction original data of no less than 6M before the sampling point to be predicted of the target wind farm in step 1, clean the above original data, remove invalid data and use interpolation method to supplement missing data, then sample data at a fixed time interval M, select the wind speed time series segments, wind power time series segments and wind direction time series segments of 6 consecutive sampling points before the sampling point to be predicted. According to the wind speed time series segment data values of the 6 sampling points, use the method in the first step to calculate the feature vector of the wind speed time series segment, and then calculate the Euclidean distance between the feature vector and the cluster center point of each wind power scenario of the optimal wind power scenario number in step 3. The wind power scenario with the smallest distance is the wind power scenario to which the wind speed time series segment belongs. Then, according to the type of strong fluctuation scenario or weak fluctuation scenario to which the wind power scenario belongs, the corresponding prediction model is selected; according to the selected prediction model, the wind speed time series segments, wind power time series segments and wind direction time series segments of the 5 consecutive sampling points before the sampling point to be predicted are used to obtain the wind power prediction value of the sampling point to be predicted. The wind speed time series segments, wind power time series segments and wind direction time series segments of 6 consecutive sampling points are continuously collected, and the above process of selecting the prediction model and obtaining the wind power prediction value of the sampling point to be predicted is repeated, and the prediction result can be obtained in real time.
[0092] For the prediction model of the strong fluctuation scenario, the wind speed time series fragments, wind power time series fragments and wind direction time series fragments of the five consecutive sampling points before the sampling point to be predicted are first subjected to the same normalization preprocessing as in step 5, and then input into the prediction model of the corresponding strong fluctuation scenario to obtain the wind power prediction value of the corresponding sampling point to be predicted. For the prediction model of the weak fluctuation scenario, the data values of the wind speed time series fragments of the five consecutive sampling points before the sampling point to be predicted are first preprocessed by logarithmic transformation, and then the one-dimensional vector formed by splicing the logarithmic transformed historical wind speed time series data and the historical wind power time series data and the historical wind direction time series data is input into the prediction model of the weak fluctuation scenario to obtain the wind power prediction value of the corresponding sampling point to be predicted.
[0093] On Dataset 1 and Dataset 2, the scene division method of the present invention, the non-optimal scene division method, and the prediction method without scene division method were used to verify the effect. Except for the difference in scene division, the other parts all adopted the operation of the prediction method of the present invention. After obtaining the prediction results, the determination coefficient (R 2 ), root mean square error (RMSE) and mean absolute error (MAE) indicators are used to evaluate the trained CNN-BIGRU model and LSSVM model to verify their prediction accuracy. The calculation formulas for each indicator are as follows:
[0094]
[0095]
[0096] In the formula, L is the number of predicted sample points, y i is the true value, is the predicted value, is the average of the actual values.
[0097] The results of prediction evaluation indicators for different scene divisions are shown in Table 3. It can be seen that the prediction effect is the best under the optimal scene division.
[0098] Table 3 Results of prediction evaluation indicators for different scene divisions
[0099]
[0100] Any matters not described in the present invention are applicable to the prior art.
Claims
1. A method for ultra-short-term wind power prediction based on real-time scene switching, characterized in that: The method comprises the following steps: Step 1: Obtain the original data of historical wind speed, historical wind power and historical wind direction of the target wind farm for no less than one year, clean the original data, remove invalid data and use interpolation to supplement missing data, then sample the data at a fixed time interval M to obtain the time series data of historical wind speed, historical wind power and historical wind direction; divide the time series data of historical wind speed into multiple time series segments according to a fixed number of continuous sampling points D, and calculate the feature vector of each time series segment of historical wind speed; Step 2: Obtain the feature vectors of all historical wind speed time series segments, cluster these feature vectors using the K-Means clustering algorithm, and divide them into K wind power scenarios; Step 3: Calculate the silhouette coefficients corresponding to different cluster numbers K respectively, and take the K value corresponding to the maximum silhouette coefficient as the most suitable cluster number for the feature vector of the historical wind speed time series segment, that is, obtain the optimal number of wind power scenarios; Step 4: According to the number of optimal wind power scenarios obtained in step 3, calculate the sample entropy of the historical wind speed time series data and the sample entropy of the historical wind power time series data corresponding to each wind power scenario, and divide the strong fluctuation scenario into the weak fluctuation scenario according to the size of the sample entropy; Step 5: Use the historical wind speed time series data, historical wind power time series data, and historical wind direction time series data of each strong fluctuation scenario to train the CNN-BIGRU model to obtain a prediction model for each strong fluctuation scenario; Step 6: Use the historical wind speed time series data, historical wind power time series data, and historical wind direction time series data of weak fluctuation scenarios to train the LSSVM model and obtain a prediction model for weak fluctuation scenarios; Step 7: Ultra-short-term wind power forecasting based on real-time scenario switching Acquire in real time the historical wind speed original data, historical wind power original data and historical wind direction original data of a period of D×M before the sampling point to be predicted of the target wind farm in step one, clean the above original data, remove invalid data and use interpolation method to supplement missing data, then sample data at a fixed time interval M, select the wind speed time series segments, wind power time series segments and wind direction time series segments of D consecutive sampling points before the sampling point to be predicted; calculate the characteristic vector of the wind speed time series segment according to the data values of the wind speed time series segments of the D sampling points using the method in the first step, and then calculate the clustering center of each wind power scenario of the characteristic vector and the number of optimal wind power scenarios in step three The Euclidean distance of the points is the smallest, and the wind power scene with the smallest distance is the wind power scene to which the wind speed time series segment belongs; then, according to the type of strong fluctuation scene or weak fluctuation scene to which the wind power scene belongs, the corresponding prediction model is selected; according to the selected prediction model, the wind speed time series segments, wind power time series segments and wind direction time series segments of D-1 consecutive sampling points before the sampling point to be predicted are used to obtain the wind power prediction value of the sampling point to be predicted; the wind speed time series segments, wind power time series segments and wind direction time series segments of D consecutive sampling points are continuously collected in a rolling manner, and the above process of selecting the prediction model and obtaining the wind power prediction value of the sampling point to be predicted is repeated, and the prediction result can be obtained in real time.
2. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: In step 1, the sampling time interval is 10 minutes.
3. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: In step 1, the fixed number of continuous sampling points D is 6.
4. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: In step 1, the specific process of obtaining the feature vector of the historical wind speed time series segment is as follows: for each historical wind speed time series segment, the average wind speed M is calculated respectively. speed 、Maximum wind speed speed 、Minimum wind speed speed and wind speed residual Res speed In order to eliminate the dimensional influence of different statistical indicators, the four statistical indicators are standardized. The four statistical indicators after standardization are denoted as M. speedi , Max speedi 、Min speedi 、Res speedi , record the historical wind speed time series fragment {x wi The eigenvector of} is F i , then F i =[M speedi ,Max speedi ,Min speedi ,Res speedi ].
5. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: In step 2, the specific steps of the K-Means clustering algorithm are as follows: first, the feature vectors of K historical wind speed time series segments are randomly initialized and selected as the initial cluster centers. Then, the Euclidean distance between the feature vector of each historical wind speed time series segment and all cluster centers is calculated, and it is assigned to the cluster to which the nearest cluster center belongs. Next, calculate the average value of all data in each cluster to modify the cluster center point u j , N k represents the number of eigenvectors of the historical wind speed time series segments in the kth class, The feature vector representing the i-th historical wind speed time series segment in the k-th category is continuously repeated until the preset number of iterations is reached. Through this iterative process, the K-Means clustering algorithm clusters time segments with similar wind speed fluctuation characteristics into the same category, thereby realizing the division of wind power scene data.
6. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: In step 3, the calculation formula of the silhouette coefficient SC is as follows: In the formula, a i is the sample point i and its cluster C i The average Euclidean distance of all other sample points in b i is the distance between sample point i and the nearest non-cluster C e The average Euclidean distance of all sample points in K clusters, B represents the number of sample points in K clusters; C i represents the cluster where the sample point i belongs, |C i | is cluster C i The number of sample points in C e represents the cluster where the sample point e is located, |C e | is cluster C e The number of sample points in ; K is the number of clusters, d(i,j) represents the Euclidean distance between sample point i and sample point j, and d(i,e) is similar to this; the sample point refers to the feature vector of a historical wind speed time series segment.
7. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: In step 4, taking the historical wind power time series data as an example, the same operation is performed on the historical wind speed time series data. The specific calculation method of sample entropy is as follows: Extract the corresponding wind power time series data in each divided scene. Assume that the corresponding historical wind power time series data in one of the scenes is {x p (1),x p (2),……,x p (N)}, where N is the number of sampling points in the scene, and then perform the following operations: 1) Set the embedding dimension m and similarity tolerance r, and divide the historical wind power time series data into a set of vectors with dimension m in sequence. Then the i-th vector X m (i) is: X m (i) = {x p (i),x p (i+1),...,x p (i+m-1)}, where i=1, 2, ..., N-m+1, and similarly obtain the j-th m-dimensional vector X m (j); 2) Calculate vector X m (i) With X m (j) The Euclidean distance d(X m (i),X m (j)); For each pair of vectors, if their distance is less than the similarity tolerance r, the two vectors are considered similar, and the number of vectors similar to the i-th vector is recorded, and its ratio to the total number of distances Nm is calculated, recorded as Wherein, i=1, 2, ..., N-m+1, j≠i, num represents the number; 3) Definition The average value of A(m,r) 4) Increase the dimension to m+1, repeat the above steps 1-3, and obtain The average value A(m+1,r) is as follows: 5) The sample entropy value SE is defined as:
8. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: In step 4, the sample entropy values of each scene are compared, and any scene with a sample entropy value greater than 50% of the minimum sample entropy value is defined as a strong fluctuation scene, otherwise it is a weak fluctuation scene.
9. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: The specific process of step five is as follows: first, the historical wind speed time series data, historical wind power time series data and historical wind direction time series data in each strong fluctuation scene are uniformly normalized and preprocessed to eliminate the influence of different dimensions, and in each strong fluctuation scene, the wind speed time series fragments, wind power time series fragments and historical wind direction time series fragments of D sampling points that are continuous in time are selected as a data sample, and several data samples are obtained in each strong fluctuation scene; the data samples of each strong fluctuation scene are divided according to the number of samples, of which no less than 60% are divided into training sets, and the rest are validation sets, which are used to train the CNN-BIGRU model to obtain the prediction model of the strong fluctuation scene; the wind speed data, wind power data and wind direction data of the first D-1 sampling points in a data sample are used as the input of the CNN-BIGRU model, and the wind power data of the Dth sampling point is used as the reference value of the model output; The CNN-BIGRU model first uses a convolutional neural network to extract local features in the time series. The convolution layer performs convolution operations on the input data through a sliding window. After the convolution layer, the BiGRU layer is connected to capture the long-term dependencies and bidirectional information flows in the time series. The BiGRU layer is a bidirectional GRU layer, which contains two standard GRU layers in opposite directions. The forward GRU reads data from front to back in normal time order, and the reverse GRU traverses the entire sequence in reverse order from the last time step, so that the sequence data can be processed in the forward and backward channels respectively, thereby extracting the historical features and potential future features of the time series at the same time. The GRU consists of a reset gate and an update gate. Suppose the input sequence is X T , the time step is marked as t=1,…,D-1, and at t=1 to D-1, the reset gate r of GRU is calculated in sequence t and update gate z t : z t =σ(W xz x t +W hz h t-1 +b z ) r t =σ(W xr x t +W hr h t-1 +b r ) In the formula, x t is the sequence X T The data corresponding to time step t, is the forward hidden state, and the forward hidden state sequence is obtained in the forward calculation of time step t=1,…,D-1; σ(·) represents the sigmoid activation function, {W xr ,W hr, W xz ,W hz } and {b r ,b z } respectively represent the set of weight matrix and bias vector; is the candidate hidden state, W xh With W hh Represents two weight matrices, b r is the bias vector; Similarly, the backward hidden state of each time step is calculated separately to obtain the backward hidden state sequence; the hidden state of time step t is concatenated to obtain a bidirectional hidden state vector h t ; Take the bidirectional hidden state h of the last time step D-1 As the final representation of the sequence, after linear mapping, the final output is the sequence X T The predicted data y T , that is, the predicted data of wind power data at the Dth sampling point; The CNN-BIGRU model was trained using the training set and validation set of each strong fluctuation scenario. During the model training process, the network parameters of the CNN-BIGRU model were first initialized using the random assignment method, the maximum number of iterations was set to 300, and the mean square error was selected as the loss function. The Adam optimizer was used to reversely update the network parameters of the model. When the loss change was no more than 10 in 20 consecutive iterations on the validation set, the network parameters of the model were updated. -4 , that is, the model is considered to have converged and the training is terminated early, retaining the model parameters with the best current performance, that is, the prediction model for the current strong fluctuation scenario is obtained.
10. The ultra-short-term wind power prediction method based on real-time scene switching according to claim 1 is characterized in that: The specific process of step six is as follows: Firstly, the data values in the historical wind speed time series data in all weak fluctuation scenarios are preprocessed by logarithmic transformation, and then the logarithmically transformed historical wind speed time series data, historical wind power time series data and historical wind direction time series data are selected, and the time series fragment data of D sampling points continuous in time are taken as a data sample, and several data samples are obtained; the data samples are divided according to the number of samples, of which no less than 60% are divided into training sets, and the rest are divided into validation sets, which are used to train the LSSVM model to obtain the prediction model of the weak fluctuation scenario; the one-dimensional vector formed by splicing the wind speed data, wind power data and wind direction data of the first D-1 sampling points in a data sample is taken as the input of the LSSVM model, and the wind power data of the Dth sampling point is taken as the reference value of the output value of the LSSVM model; LSSVM uses a nonlinear mapping function φ(x) to map the data samples in the training set to a high-dimensional feature space. Assume that the regression function is: y=f(x)=ω T ·φ(x)+b In the formula, ω is the weight vector and b is the bias term; In LSSVM regression, in order to measure the balance between prediction error and model complexity, the following objective function is introduced: style i =ω T φ(x)+b+ξ i ,i=1,2,...,n Where C is the regularization coefficient; n is the number of data samples in the training set in this scenario; ξ i is the error term of the ith data sample, ξ i =y i -ω T Φ(x i )-b;y i is the true value of the i-th data sample; To solve the above optimization problem, the Lagrangian function is usually used: where λ i Denotes the i-th Lagrangian operator, calculates partial derivatives of ω, b, ξ, and λ respectively and sets them equal to zero, and then solves a set of linear equations. Finally, the linear expression of LSSVM is obtained as follows: where K(x,x i ) represents the kernel function, x represents the concatenated vector of wind speed data, wind power data and wind direction data input at the current moment, and x i is the concatenated vector corresponding to the i-th data sample in the training set, from which the λ of the regression function can be obtained i and b; The LSSVM model was trained using the training set. During the model training process, the maximum number of iterations was set to 8000, and the mean square error was selected as the loss function. At the same time, the early stopping strategy was adopted. When the loss change was no more than 10 in 50 consecutive iterations on the validation set, the model was stopped. -4 , that is, the model is considered to have converged and the training is terminated early, retaining the model parameters with the best current performance, that is, the prediction model for the weak fluctuation scenario is obtained.
Citation Information
Cited By
Wind power prediction method and device based on algorithm and scene adaptive matching
CN121457846A
Wind power prediction method and device based on algorithm and scene adaptive matching
CN121457846B