Wind power prediction method and device based on K-means clustering and grey correlation-TCN, electronic equipment and storage medium

Through K-means clustering and gray correlation analysis combined with time convolution network (TCN), the problem of failure to fully consider unit similarity and differences and environmental conditions in wind power prediction is solved, and more accurate wind power prediction is achieved .

CN119448258AInactive Publication Date: 2025-02-14ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID NINGXIA ELECTRIC POWER COMPANY
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411565482.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art fails to fully consider the similarity and differences between units in wind power prediction, and ignores the impact of environmental conditions on wind power output and the single problem of key feature extraction methods.

Method used

K-means clustering is used to classify and label wind power data, combine gray correlation analysis to calculate the similarity measurements between characteristic quantities such as humidity, temperature, air pressure, wind direction, and wind speed in wind power, and use the time-mode attention mechanism Time convolutional network (TCN) predicts similarity.

Benefits of technology

Through this method, wind power can be predicted more accurately, and the prediction accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119448258A_ABST
    Figure CN119448258A_ABST
Patent Text Reader

Abstract

The invention discloses a wind power prediction method and device based on K-means clustering and grey correlation-TCN, electronic equipment and a storage medium, and aims to solve the problem of inaccurate wind power prediction in the prior art. The prediction method specifically comprises the following steps that (1) an n * T dimensional matrix X composed of n feature time sequences is input, weight coefficients delta and beta, the minimum K0 and the maximum clustering number Kmax are initialized, and the feature quantities include the temperature feature quantity, the humidity feature quantity, the air pressure feature quantity, the wind speed feature quantity and the wind direction feature quantity; (2) inputting all the selected characteristic quantities, and classifying a wind power related characteristic matrix by using a K-means algorithm; step (3), calculating correlation coefficients among different characteristic quantities by using a grey correlation model; step (4), training, extracting and testing the features by adopting TCN; and step (5), adopting an average error MAPE, an average relative error MAE and a root-mean-square error RMSE as error indexes of the wind power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to wind power prediction, and in particular to a wind power prediction method based on K-means clustering and grey correlation-TCN. Background Art

[0002] In wind power forecasting, traditional wind power output forecasting methods usually fail to fully consider the similarities and differences between units, ignore the impact of environmental conditions on wind power output and the single key feature extraction method. Therefore, the present invention proposes a fault diagnosis method based on K-means algorithm and grey correlation-TCN. First, the data of the four seasons of spring, summer, autumn and winter in a year are preprocessed, the data that does not meet the algorithm is cleaned, and K-means clustering and labeling are used; then grey correlation analysis is used to calculate the similarity measure between humidity, temperature, air pressure, wind direction, wind speed, and wind speed in wind power; finally, the temporal convolution of the temporal pattern attention mechanism is used to predict the similarity. Summary of the invention

[0003] The embodiment of the present invention provides a wind power prediction method based on K-means clustering and grey correlation-TCN to solve the problem of inaccurate wind power prediction in the prior art.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] In the first aspect, the present invention discloses a wind power prediction method based on K-means clustering and grey correlation-TCN.

[0006] The data of the four seasons of spring, summer, autumn and winter are normalized, the data that does not conform to the algorithm are cleaned, and K-means clustering and labeling are used. The specific steps are as follows:

[0007] Step (1): Input the n×T dimensional matrix X consisting of n feature time series, initialize the weight coefficients δ and β, the minimum K0 and the maximum number of clusters K max, The characteristic quantities are temperature, humidity, air pressure, wind speed and wind direction;

[0008] Step (2): input all the selected feature quantities and classify the wind power related feature matrix using the K-means algorithm;

[0009] Step (3): Use the grey relational model to calculate the correlation coefficients between different feature quantities;

[0010] Step (4): Use TCN to train, extract and test features;

[0011] Step (5): Use mean error MAPE, mean relative error MAE and root mean square error RMSE as error indicators of wind power.

[0012] As a preferred embodiment of the prediction method disclosed in the present invention,

[0013] The specific calculation process of the correlation coefficient in step (3) includes:

[0014] S31: Assume that the sequence X i ={x(1),x(2),…,x i (n)}, xi is the data sequence, x i represents a comparison sequence;

[0015] S32: The correlation coefficient between the sequence and the comparison sequence is expressed as:

[0016]

[0017] In formula (1), x 0i =x0(k)-x i (k) represents the k-point x0(k) and x i (k) the minimum absolute difference between represents the maximum absolute difference of k points; λ represents the resolution coefficient ∈ [0,1];

[0018] S33: X0 and X i The grey relational degree γ i It is expressed as follows:

[0019]

[0020] As a preferred embodiment of the prediction method disclosed in the present invention,

[0021] The specific steps of step (4) include:

[0022] S41: Using a one-dimensional convolution kernel {x1(t),x2(t),…,x k (t)}, the multivariate features and subsequences are combined into a multivariate feature time series x(t), and multiple one-dimensional convolution kernels are combined into a one-dimensional convolution network, whose feature extraction formula is as follows:

[0023]

[0024] In formula (3), n is n = {1, 2, ..., m}, and m represents the dimension of the multivariate time series dataset. Considering the TCN temporal convolutional network layer, TCN is used to capture information by giving a time series;

[0025] S42: CNN is used to extract the features of TCN for the second time, and the feature matrix is ​​as follows:

[0026]

[0027] In formula (4), H = {h1,h2,…,h i-1}, represents the convolution output value of the i-th row vector and the j-th convolution kernel, V represents all convolution kernels, and J represents the length of the time series;

[0028] S43: Temporal pattern attention layer, F1 is expressed as the evaluation function, sigmoid is selected as the activation function of the weight output, and the weight is expressed as follows:

[0029]

[0030] In formula (5) and formula (6), β i Represents the weight, through β i For H I After weighted calculation, the comprehensive timing information is finally obtained. The specific expression is as follows:

[0031]

[0032] By combining hi and ν t , weight coefficient matrix Q is fused to obtain the final predicted value y t+1 , the calculation results are as follows:

[0033]

[0034] y t+1 =Q h′ h t ′ (9)

[0035] As a preferred embodiment of the prediction method disclosed in the present invention,

[0036] The error index calculation of step (5) is as follows:

[0037]

[0038] In formula (10), formula (11) and formula (12), n represents the number of prediction samples; y(t) represents the measured value of the sample at the i-th prediction; Represents the predicted value at the i-th prediction.

[0039] In a second aspect, the present invention also discloses a wind power prediction device based on K-means clustering and grey correlation-TCN.

[0040] include:

[0041] Acquisition module: used to input the n×T-dimensional matrix X composed of n feature time series, initialize the weight coefficients δ and β, the minimum K0 and the maximum number of clusters K max, The characteristic quantities are temperature, humidity, air pressure, wind speed and wind direction;

[0042] Classification module: input all selected feature quantities and use K-means algorithm to classify the wind power related feature matrix;

[0043] Correlation module: The grey correlation model is used to calculate the correlation coefficient between different feature quantities;

[0044] Training module: Use TCN to train, extract and test features;

[0045] Error index evaluation module: Average error MAPE, average relative error MAE and root mean square error RMSE are used as error indicators of wind power.

[0046] In a third aspect, the present invention further discloses an electronic device,

[0047] The invention comprises a memory and a processor, and a computer program stored and run on the memory. When the processor executes the program, it realizes any of the above-mentioned wind power prediction methods based on K-means clustering and grey correlation-TCN.

[0048] In a fourth aspect, the present invention further discloses a computer-readable storage medium.

[0049] A computer program is stored thereon, and when the computer program is executed by a processor, any of the above-mentioned wind power prediction methods based on K-means clustering and grey correlation-TCN is implemented.

[0050] The beneficial effects of the present invention are as follows:

[0051] The present invention pre-processes the data of the four seasons of spring, summer, autumn and winter in a year, cleans the data that does not conform to the algorithm, and uses K-means clustering and labeling; then uses grey correlation analysis to calculate the similarity measures among humidity, temperature, air pressure, wind direction, wind speed, and wind speed in wind force; finally, uses temporal convolution of the temporal pattern attention mechanism to predict the similarity; the prediction result is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A flow chart showing the method proposed by the present invention;

[0053] Figure 2 A comparison diagram showing the method proposed in the present invention. DETAILED DESCRIPTION

[0054] The specific implementation of the present invention is described below in conjunction with the accompanying drawings and embodiments:

[0055] like Figure 1-2 As shown, Example 1:

[0056] The embodiment of the present invention provides a wind power prediction method based on K-means clustering and grey correlation-TCN to solve the problem of inaccurate wind power prediction in the prior art.

[0057] The specific contents are as follows:

[0058] The data of the four seasons of spring, summer, autumn and winter are normalized, the data that does not conform to the algorithm are cleaned, and K-means clustering and labeling are used. The specific steps are as follows:

[0059] 6) Input the n×T dimensional matrix X composed of n feature time series, initialize the weight coefficients δ and β, the minimum K0 and the maximum number of clusters K max , where the characteristic quantities are temperature, humidity, air pressure, wind speed and wind direction.

[0060] 7) Input all the selected feature quantities and classify the wind power related feature matrix using K-means algorithm;

[0061] 8) The grey correlation model is used to calculate the correlation coefficient between different feature quantities. The specific calculation is as follows:

[0062] ①Assume that the sequence X i ={x(1),x(2),…,x i (n)}, xi is the data sequence, x i represents a comparison sequence;

[0063] ②The correlation coefficient between the data sequence and the comparison sequence is expressed as:

[0064]

[0065] In formula (1), x 0i =x0(k)-x i (k) represents the k-point x0(k) and x i (k) the minimum absolute difference between represents the maximum absolute difference of k points; λ represents the resolution coefficient ∈ [0,1]

[0066] between.

[0067] ③X0 and X i The grey relational degree γ i It is expressed as follows:

[0068]

[0069] 9) Use TCN to train, extract and test features. The specific steps are as follows:

[0070] ① This patent uses a one-dimensional convolution kernel {x1(t),x2(t),…,x k (t)}, the multivariate features and subsequences are combined into a multivariate feature time series x(t), and multiple one-dimensional convolution kernels are combined into a one-dimensional convolution network, whose feature extraction formula is as follows:

[0071]

[0072] In formula (3), n is n = {1, 2, ..., m}, and m represents the dimension of the multivariate time series dataset. Considering the TCN temporal convolutional network layer, TCN is used to capture information by giving a time series;

[0073] ② The second time, CNN is used to extract the features of TCN, forming a feature matrix as shown below:

[0074]

[0075] In formula (4), H = {h1,h2,…,h i-1}, represents the convolution output value of the i-th row vector and the j-th convolution kernel, V represents all convolution kernels, and J represents the length of the time series.

[0076] ③ Temporal mode attention layer, F1 is expressed as the evaluation function, sigmoid is selected as the activation function of the weight output, and the weight is expressed as follows:

[0077]

[0078] In formula (5) and formula (6), β i Represents the weight, through β i For H I After weighted calculation, the comprehensive timing information is finally obtained. The specific expression is as follows:

[0079]

[0080] By combining hi and ν t , weight coefficient matrix Q is fused to obtain the final predicted value y t+1 , the calculation results are as follows:

[0081]

[0082] y t+1 =Q h′h t ′ (9)

[0083] 10) The average error MAPE, average relative error MAE and root mean square error (RMSE) are used as error indicators of wind power, and the indicators are as follows:

[0084]

[0085]

[0086] In formula (10), formula (11) and formula (12), n represents the number of prediction samples; y(t) represents the measured value of the sample at the i-th prediction; Represents the predicted value at the i-th prediction.

[0087] The data from a certain place in Ningxia Hui Autonomous Region are used for analysis, and the comparison methods are one-dimensional convolutional neural network (CNN), temporal convolutional network (TCN), extreme learning machine (ELM) and TCN-ELM. The specific comparison is shown in Table 1. As can be seen from the table, the method proposed by grey correlation-TCN is the best among all methods.

[0088] Table 1 Comparison of different methods

[0089] Comparison Algorithms ELM TCN TCN-ELM LSTM Grey Correlation-TCN MAP / kW 7.4435 4.322 7.545 7.343 2.123 MAPE / % 8.2334 6.456 9.344 5.454 1.677 RMSE / kW 5.2343 7.754 8.344 9.343 2.465

[0090] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in the field without departing from the purpose of the present invention. These changes involve related technologies well known to those skilled in the art, which all fall within the scope of protection of the patent of the present invention.

[0091] Many other changes and modifications may be made without departing from the concept and scope of the present invention.It should be understood that the present invention is not limited to the specific embodiments, and the scope of the present invention is defined by the appended claims.

Claims

1. Wind power prediction method based on K-means clustering and grey correlation-TCN, Features: The data of the four seasons of spring, summer, autumn and winter are normalized, the data that does not conform to the algorithm are cleaned, and K-means clustering and labeling are used. The specific steps are as follows: Step (1): Input the n×T dimensional matrix X consisting of n feature time series, initialize the weight coefficients δ and β, the minimum K0 and the maximum number of clusters K max , where the characteristic quantities are temperature, humidity, air pressure, wind speed and wind direction; Step (2): input all selected feature quantities and classify the wind power related feature matrix using K-means algorithm; Step (3): Use the grey relational model to calculate the correlation coefficients between different feature quantities; Step (4): Use TCN to train, extract and test features; Step (5): Use mean error MAPE, mean relative error MAE and root mean square error RMSE as error indicators of wind power.

2. The wind power prediction method based on K-means clustering and grey correlation-TCN according to claim 1, Features: The specific calculation process of the correlation coefficient in step (3) includes: S31: Assume that the sequence X i ={x(1),x(2),…,x i (n)}, xi is the data sequence, x i represents a comparison sequence; S32: The correlation coefficient between the sequence and the comparison sequence is expressed as: In formula (1), x 0i =x0(k)-x i (k) represents the k-point x0(k) and x i (k) the minimum absolute difference between represents the maximum absolute difference of k points; λ represents the resolution coefficient ∈ [0,1]; S33: X0 and X i The grey relational degree γ i It is expressed as follows:

3. The wind power prediction method based on K-means clustering and grey correlation-TCN according to claim 1, Features: The specific steps of step (4) include: S41: Using a one-dimensional convolution kernel {x1(t),x2(t),…,x k (t)}, the multivariate features and subsequences are combined into a multivariate feature time series x(t), and multiple one-dimensional convolution kernels are combined into a one-dimensional convolution network, whose feature extraction formula is as follows: In formula (3), n is n = {1, 2, ..., m}, and m represents the dimension of the multivariate time series dataset. Considering the TCN temporal convolutional network layer, TCN is used to capture information by giving a time series; S42: CNN is used to extract the features of TCN for the second time, and the feature matrix is ​​as follows: In formula (4), H = {h1,h2,…,h i-1 }, represents the convolution output value of the i-th row vector and the j-th convolution kernel, V represents all convolution kernels, and J represents the length of the time series; S43: Temporal pattern attention layer, F1 is expressed as the evaluation function, sigmoid is selected as the activation function of the weight output, and the weight is expressed as follows: In formula (5) and formula (6), β i Represents the weight, through β i For H I After weighted calculation, the comprehensive timing information is finally obtained. The specific expression is as follows: By combining hi and ν t , weight coefficient matrix Q is fused to obtain the final predicted value y t+1 , the calculation results are as follows: y t+1 =Q h′ h′ t (9)。 4. The wind power prediction method based on K-means clustering and grey correlation-TCN according to claim 1, Features: The error index calculation of step (5) is as follows: In formula (10), formula (11) and formula (12), n represents the number of prediction samples; y(t) represents the measured value of the sample at the i-th prediction; Represents the predicted value at the i-th prediction.

5. Wind power prediction device based on K-means clustering and grey correlation-TCN, Features: include: Acquisition module: used to input the n×T-dimensional matrix X composed of n feature time series, initialize the weight coefficients δ and β, the minimum K0 and the maximum number of clusters K max , where the characteristic quantities are temperature, humidity, air pressure, wind speed and wind direction; Classification module: input all selected feature quantities and use K-means algorithm to classify the wind power related feature matrix; Correlation module: The grey correlation model is used to calculate the correlation coefficient between different feature quantities; Training module: Use TCN to train, extract and test features; Error index evaluation module: Average error MAPE, average relative error MAE and root mean square error RMSE are used as error indicators of wind power.

6. An electronic device, Features: The invention comprises a memory and a processor, and a computer program stored in the memory and running thereon. When the processor executes the program, the wind power prediction method based on K-means clustering and grey correlation-TCN according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, Features: A computer program is stored thereon, and when the computer program is executed by a processor, the wind power prediction method based on K-means clustering and grey correlation-TCN as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Wind power prediction method based on grey-combined weight

    CN106529724A

  • Wind power station output power prediction method based on multi-model combination optimization

    CN111667098A

  • Method for establishing multi-step wind speed combined prediction model

    CN111985712A

  • Short-term wind power combined prediction method

    CN114037143A

  • Wind power prediction method based on clustering analysis and convolutional neural network

    CN116565839A