Photovoltaic power generation power prediction method and system based on similar daily clustering and FEDformer
Through the photovoltaic power generation prediction method based on similar daily clustering and FEDformer, the problem of insufficient prediction accuracy of photovoltaic power generation in the prior art is solved, and higher prediction accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411431786.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-03-11
AI Technical Summary
The existing photovoltaic power prediction methods have limitations in processing complex nonlinear distributed data, resulting in improved prediction accuracy.
The photovoltaic power generation power prediction method based on similar daily clustering and FEDformer is adopted. First, the historical data is divided into three types: sunny, sunny to cloudy and rainy days through the KFCM clustering algorithm, and the correlation analysis is performed on the data sets of each meteorological type using Spearman rank correlation coefficient. Secondly, the data set is decomposed by the variational modal decomposition method to reduce nonlinearity and non-stationarity. Finally, the FEDformer model is used to predict each subsequence and the subsequence prediction results are accumulated to obtain the final photovoltaic power prediction results.
Good prediction results were achieved on historical data of different meteorological types, significantly improving the stability of photovoltaic power generation and the accuracy of prediction effects.
Smart Images

Figure CN119602215A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic power generation prediction, and in particular to a photovoltaic power generation prediction method and system based on similar day clustering and FEDformer. Background Art
[0002] With the deterioration of global climate and the growth of energy consumption, solar energy resources have attracted widespread attention due to their richness, safety and environmental protection. At the same time, the cost of photovoltaic power generation technology has continued to decline, making it widely used in the field of power supply and bringing significant economic benefits. However, photovoltaic power generation systems are affected by a variety of conditions, and there are problems such as uncertainty and intermittency, which have brought many impacts on the power system. Therefore, accurate prediction of photovoltaic power generation is crucial to ensure the safe and stable operation of the power grid system.
[0003] At present, photovoltaic power generation prediction methods can be mainly divided into two methods: physical statistical model and deep learning model. Among them, the physical statistical model method refers to a simulation model built based on specific parameters to calculate the output power of the photovoltaic power system. This type of model has certain limitations in dealing with nonlinear and non-stationary time series. However, the deep learning model method relies on its multi-layer neural network structure to automatically extract time series features and capture complex nonlinear relationships. Due to its excellent prediction performance, it has gradually become a research hotspot and has achieved some results, such as the record in the literature [1]: Gao Hanxu, Yuan Zuqing, Zhang Shuting, et al. Short-term photovoltaic power prediction based on LSTM model [J]. Acta Energiae Solaris Sinica, 2024, 45(06): 376-381.
[0004] The output of photovoltaic power is closely related to meteorological characteristics, and the regular curves of photovoltaic power generation under different meteorological conditions also have significant differences. In order to improve the accuracy of photovoltaic power generation prediction, one of the commonly used data preprocessing methods is to apply clustering algorithm to process historical data. At present, existing studies have proved that it is of great significance in photovoltaic power generation prediction and has achieved good prediction results. However, the existing clustering algorithm has certain limitations in processing complex nonlinear distribution data, resulting in the need for further improvement in prediction accuracy. For example, the literature [2]: Li Zheng, Zhang Jie, Xu Ruosi, et al. Short-term photovoltaic power prediction based on similar day clustering and PCC-VMD-SSA-KELM model [J]. Acta Energiae Solaris Sinica, 2024, 45(02): 460-468.2778-2785.
[0005] In addition, considering that photovoltaic power data is affected by factors such as meteorological changes, sunshine cycles and seasonal changes, it shows nonlinear and non-stationary characteristics. In order to improve the overall prediction performance of the model, signal decomposition technology is used for data preprocessing, such as traditional signal decomposition methods such as wavelet decomposition and empirical mode decomposition (EMD). However, wavelet decomposition has the problem that the mother wavelet function is difficult to determine, and empirical mode decomposition (EMD) has the problem of mode aliasing and endpoint effects in the decomposition process. In contrast, variational mode decomposition (VMD) is an adaptive decomposition method. By introducing variational constraints, the limitations of traditional signal decomposition methods are solved, with good results. Summary of the invention
[0006] The present invention provides a photovoltaic power prediction method and system based on similar day clustering and FEDformer. The prediction method first uses the kernel fuzzy C-means (KFCM) clustering algorithm to divide the historical data set into three types: sunny, sunny to cloudy and rainy, and uses the Spearman rank correlation coefficient (SRCC) to perform correlation analysis of meteorological characteristic factors on each meteorological type data set; secondly, the variational mode decomposition (VMD) method is used to decompose the data set into several subsequences to reduce nonlinearity and non-stationarity; finally, the frequency domain enhanced decomposition Transformer (FEDformer) is used to predict each subsequence, and the subsequence prediction results are accumulated to obtain the final photovoltaic power prediction result. The present invention achieves good prediction results on historical data of different meteorological types, and can significantly improve the stability of photovoltaic power and the accuracy of prediction results.
[0007] The technical solution adopted by the present invention is:
[0008] The photovoltaic power generation prediction method based on similar day clustering and FEDformer includes the following steps:
[0009] Step 1: Obtain the historical data of photovoltaic power generation of the photovoltaic power station, pre-process the historical data of photovoltaic power generation using the mean filling method, and replace the missing values with the mean of the data at the same time node;
[0010] Step 2: Use the KFCM clustering algorithm to cluster the photovoltaic power history data set replaced in step 1, and evaluate the clustering effect in combination with the clustering evaluation index;
[0011] Step 3: Through the Spearman rank correlation coefficient (SRCC) method, the historical data set after the KFCM clustering algorithm similar day clustering is analyzed for correlation, and the meteorological characteristic factors with strong correlation with photovoltaic power generation are determined as the input variables of the FEDformer prediction model;
[0012] Step 4: Use the VMD method to decompose the correlation data set to obtain multiple groups of subsequences to further extract features at different time scales;
[0013] Step 5: Use the FEDformer prediction model to predict each subsequence, and accumulate the prediction results of the subsequences to obtain the final photovoltaic power generation prediction result.
[0014] Step 6: Use the root mean square error RMSE, mean absolute error MAE and determination coefficient R 2 Three evaluation indicators are used to analyze the prediction results of the FEDformer prediction model.
[0015] The step 1 comprises the following steps:
[0016] S1.1: Determine where missing values exist in the PV power historical dataset, where missing values are represented as NaN or blank.
[0017] S1.2: For each variable with missing values, calculate the mean of the non-missing values. For a variable X, the mean calculation formula is as follows:
[0018]
[0019] Where: x i represents the non-missing observations; n represents the number of non-missing values.
[0020] S1.3: Fill all missing value positions of variable X with the calculated mean Mean(X).
[0021] The step 2 comprises the following steps:
[0022] S2.1: Use the KFCM clustering algorithm to cluster the photovoltaic power history data set after the replacement in step 1. Suppose the mapping function is Φ:X→H, where X represents the original feature data set and H represents the high-dimensional feature space. Map the sample points from the original feature space to the high-dimensional feature space. Given the original feature data set X={x1,x2,…x i ,…x n},x1,x2,…x i ,…x n Respectively represent different sample points in the original feature data set. Then the objective function of the KFCM clustering algorithm can be expressed as:
[0023]
[0024] Where: J m (U,v) represents the objective function of the KFCM clustering algorithm; c represents the number of clusters; m represents the fuzzy factor, and n1 represents the number of sample points. Represents the sample point x j For cluster center v i The membership degree of ||Φ(x j )-Φ(v i )|| 2 represents Φ(x j ) to Φ(v i ) is the square of the distance between j ) represents the original sample point x through the mapping function Φ j Feature representation mapped to high-dimensional space; Φ(v i ) represents the cluster center v through the mapping function Φ i Feature representation mapped to high-dimensional space; K(x j ,v i ) is the Gaussian kernel function.
[0025]
[0026] Where: σ is the smoothness parameter, x j represents the jth sample point, v i represents the i-th cluster center.
[0027]
[0028] S2.2: Combined with clustering evaluation indicators such as Davidson-Bourdin index, silhouette coefficient and Calinski-Harabaz index, the clustering effect is evaluated. The specific formula is as follows:
[0029]
[0030] Where: DBI represents the calculation formula of Davidson-Borgin Index; k represents the number of clusters, s i represents the intra-cluster distance of the ith cluster, s j represents the intra-cluster distance of the jth cluster; d(c i ,c j ) represents the distance between the centers of cluster i and cluster j;
[0031]
[0032] Where: SC is the calculation formula of silhouette coefficient; a(i) is the average distance from sample i to other samples in its cluster; b(i) is the average distance from sample i to its nearest cluster; max{a(i),b(i)} means taking the larger value between a(i) and b(i).
[0033]
[0034] Where: CH represents the Calinski-Harabaz index calculation formula; Bk is the inter-cluster dispersion matrix, which indicates the degree of dispersion between the center of each cluster and the total sample mean; W k is the intra-cluster dispersion matrix, which indicates the degree of dispersion between the samples in the cluster and the cluster center; trace(B k ) means B k Matrix trace; trace(W k ) indicates W k The trace of the matrix; n2 represents the total number of samples.
[0035] In step 3, correlation calculation is performed on the meteorological historical data sets of sunny days, sunny to cloudy days and rainy days after clustering similar days, so as to select meteorological characteristic factors with strong correlation as input variables of the FEDformer prediction model. The specific calculation formula is as follows:
[0036]
[0037] Where: ρ represents the Spearman rank correlation coefficient; d i is the rank difference of each pair of observations; n3 is the number of observations.
[0038] In step 4, VMD is used to decompose the photovoltaic power sequences of sunny days, sunny to cloudy days, and rainy days respectively. By solving the following variational problem, the sum of all subsequences is constrained to be equal to the original photovoltaic power sequence, and the formula is as follows:
[0039]
[0040] Where: u k (t) is the kth mode function; ω k is the center frequency of the kth mode; δ(t) is the Dirac function; is a multiplication operator; K represents the number of modal decompositions; f(t) represents the original photovoltaic power sequence.
[0041] In order to solve the unconstrained variational problem, the Lagrange multiplier λ(t) and the quadratic penalty factor α are introduced, and the formula is as follows:
[0042]
[0043] In the formula, L(u k ,ω k ,λ) represents the augmented Lagrangian function.
[0044] The modal function u of each subsequence component is obtained by the alternating direction multiplier method: k (t) and the corresponding center frequency ω k , and its update formula is as follows:
[0045]
[0046] In the above formula, and They represent f(t) and u respectively. i (t), λ(t), and The frequency domain representation of , ω represents the frequency, and n4 represents the number of iterations. represents the frequency domain representation of the kth mode at the n4+1th iteration, represents the center frequency of the n4+1th iteration, Represents the frequency domain expression of the i-th mode, where i represents the mode index.
[0047] Through iterative updates, until the stopping condition is met, K subsequences u are obtained k and the corresponding center frequency ω k In step 5, the FEDformer model consists of an encoder and a decoder. The encoder extracts important trend information from the input time series and represents it as a feature vector; the decoder generates future prediction values based on the feature representation generated by the encoder and the input target sequence.
[0048] The FEDformer model is used to predict each subsequence and the prediction results of the subsequences are accumulated. i (t), which is represented by the encoder as a feature vector h i (t). The specific formula is as follows:
[0049] h i (t) = Encoder(x i (t))
[0050] In the formula, h i (t) represents the feature representation of the i-th subsequence, and Encoder represents the encoder.
[0051] The decoder represents h according to the current input sequence x(t) and each subsequence feature. i (t), generating future predictions The specific formula is as follows:
[0052]
[0053] Where T represents the predicted time step and Decoder represents the decoder.
[0054] After the predicted value of each subsequence is generated, the predicted values of all subsequences are accumulated to obtain the final predicted value The specific formula is as follows:
[0055]
[0056] In the formula, n5 represents the number of subsequences.
[0057] In step 6: the root mean square error RMSE, mean absolute error MAE and determination coefficient R are used. 2 The specific calculation formulas of the three evaluation indicators are as follows:
[0058]
[0059] Where: n6 represents the number of samples; y i and Represent the actual value and predicted value of the i-th sample respectively; is the mean of the actual values, that is
[0060] In a second aspect, the present invention provides a photovoltaic power generation prediction system based on similar day clustering and FEDformer, the system comprising the following modules: a data acquisition module, a data preprocessing module, a model training module and a model prediction module, wherein:
[0061] The data acquisition module is used to collect the photovoltaic power generation power history data set of the photovoltaic power station. The historical data set contains instantaneous power data with a collection resolution of 15 minutes and meteorological characteristic factor data such as total horizontal irradiance, scattered horizontal irradiance, ambient temperature, relative humidity, wind speed and wind direction, which will serve as the key input of the subsequent prediction model;
[0062] The data preprocessing module first uses the SRCC method to perform correlation analysis on the historical data set, screens out meteorological characteristic factors that have a significant impact on photovoltaic power generation, and reconstructs the optimized historical data set; and decomposes the historical data set after the correlation analysis into multiple subsequences through the VMD method, thereby extracting information of different frequency components;
[0063] The model training module uses the processed subsequence as input data of the prediction model, sets corresponding model hyperparameters according to specific requirements, and trains the photovoltaic power prediction model based on FEDformer;
[0064] The model prediction module imports the power generation data of the current photovoltaic power station to be predicted as input data into the trained FEDformer-based photovoltaic power generation prediction model after the same data preprocessing process, and predicts the photovoltaic power generation in the future time period.
[0065] In the third aspect, the present invention provides a device comprising at least one memory and a processor; the memory is used to store computer programs and instructions, and the processor is used to execute the stored programs and instructions to ensure the implementation of the method described in the first aspect of the present invention, while being able to efficiently perform complex data processing and model calculation tasks, providing a solid hardware foundation for the accurate prediction of photovoltaic power generation.
[0066] The present invention provides a photovoltaic power generation prediction method and system based on similar day clustering and FEDformer, and the technical effects are as follows:
[0067] 1) The present invention uses the KFCM clustering algorithm to divide the meteorological types of historical data into three types, including sunny, sunny to cloudy and rainy. The SRCC method is used to perform correlation analysis on the three meteorological types to determine the key input factors and avoid prediction errors.
[0068] 2) The present invention adopts the VMD method to decompose the photovoltaic power generation power of different meteorological types, decomposing it into several subsequences to reduce nonlinearity and non-stationarity. At the same time, the FEDformer model is used to predict each subsequence separately, and the subsequence prediction results are accumulated to obtain the final photovoltaic power generation power prediction result.
[0069] 3) The present invention verifies the superiority of a photovoltaic power prediction method based on similar day clustering and FEDformer by comparing and analyzing the experimental results under three typical meteorological types, and achieves good prediction results on historical data of different meteorological types, significantly improving the stability of the prediction model and the accuracy of the prediction effect.
[0070] 4) The advantage of step 1 of the present invention is that it uses the mean filling method to effectively eliminate the impact of missing values on data analysis, thereby improving data quality, providing high-quality input data for subsequent steps, and further improving the accuracy of cluster analysis.
[0071] 5) The advantage of step 2 of the present invention is that it combines the three clustering evaluation indicators of Davidson-Borgin index, silhouette coefficient and Calinski-Harabaz index to quantitatively evaluate the clustering effect from different angles, thereby ensuring that the clustering analysis is more scientific and reasonable.
[0072] 6) The advantage of step 3 of the present invention is that the SRCC method is used to perform correlation analysis on the historical data after clustering similar days, and the meteorological characteristic factors with a strong correlation with photovoltaic power generation are effectively screened out, thereby reducing the redundancy and complexity of the input variables and improving the overall performance of the FEDformer prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a flow chart of the present invention.
[0074] Figure 2 This is the clustering result diagram of the KFCM algorithm in the present invention.
[0075] Figure 3 It is the decomposition result diagram of the VMD method in the present invention.
[0076] Figure 4 It is a comparison chart of the predicted value and the actual value using the present invention.
[0077] Figure 5 This is the structure diagram of the FEDformer encoder and decoder. DETAILED DESCRIPTION
[0078] The photovoltaic power generation prediction method based on similar day clustering and FEDformer specifically includes: obtaining the historical data of photovoltaic power generation in photovoltaic power stations, and preprocessing the historical data by the mean filling method; clustering the preprocessed photovoltaic power generation historical data set using the KFCM clustering algorithm, and dividing it into three meteorological types: sunny, sunny to cloudy, and rainy, and evaluating the clustering effect by combining clustering evaluation indicators such as the Davidson-Botting index, the silhouette coefficient, and the Calinski-Harabaz index; using the SRCC method to perform correlation analysis on the meteorological characteristic factors under the three meteorological types to determine the key input factors; using the VMD method to decompose the photovoltaic power generation of the three meteorological types into several subsequences; dividing the data set into a training set and a test set, using the FEDformer model to predict each subsequence, and accumulating the subsequence prediction results to obtain the final photovoltaic power generation prediction result. The invention has a high prediction accuracy. The prediction process is as follows: Figure 1 As shown, the specific steps include:
[0079] The photovoltaic power generation prediction method based on similar day clustering and FEDformer includes the following steps:
[0080] Step 1: Obtain the historical data of photovoltaic power generation of the photovoltaic power station, pre-process the historical data of photovoltaic power generation using the mean filling method, and replace the missing values with the mean of the data at the same time node;
[0081] Step 2: Use the KFCM clustering algorithm to cluster the photovoltaic power history data set replaced in step 1, and evaluate the clustering effect by combining clustering evaluation indicators such as the Davidson-Botting index, silhouette coefficient, and Calinski-Harabaz index;
[0082] Step 3: Through the Spearman rank correlation coefficient (SRCC) method, the historical data set after the KFCM clustering algorithm similar day clustering is analyzed for correlation, and the meteorological characteristic factors with strong correlation with photovoltaic power generation are determined as the input variables of the FEDformer prediction model;
[0083] Step 4: Use the VMD method to decompose the correlation data set of sunny days, sunny to cloudy days, and rainy days to obtain multiple groups of subsequences to further extract features of different time scales;
[0084] Step 5: Use the FEDformer prediction model to predict each subsequence, and accumulate the prediction results of the subsequences to obtain the final photovoltaic power generation prediction result.
[0085] Step 6: Use the root mean square error RMSE, mean absolute error MAE and determination coefficient R 2 Three evaluation indicators are used to analyze the prediction results of the FEDformer prediction model.
[0086] The step 1 comprises the following steps:
[0087] S1.1: Determine where missing values exist in the historical PV power data set. Missing values can be represented as NaN or blank.
[0088] S1.2: For each variable with missing values, calculate the mean of the non-missing values. For a variable X, the mean calculation formula is as follows:
[0089]
[0090] Where: x i represents the non-missing observations; n represents the number of non-missing values.
[0091] S1.3: Fill all missing value positions of variable X with the calculated mean Mean(X).
[0092] The step 2 comprises the following steps:
[0093] S2.1: Use the KFCM clustering algorithm to cluster the photovoltaic power history data set after step 1. Assume that the mapping function is Φ:X→H, where X represents the original feature data set and H represents the high-dimensional feature space. Map the sample points from the original feature space to the high-dimensional feature space. Given the original feature data set X={x1,x2,…x i ,…x n},x1,x2,…x i ,…x n Respectively represent different sample points in the original feature data set. Then the objective function of the KFCM clustering algorithm can be expressed as:
[0094]
[0095] Where: J m (U,v) represents the objective function of the KFCM clustering algorithm; c represents the number of clusters; m represents the fuzzy factor, n1 represents the number of sample points, u ij represents the membership of the i-th sample to the j-th class, Represents the sample point x j For cluster center v i The membership degree of ||Φ(x j )-Φ(v i )|| 2 represents Φ(x j ) to Φ(v i ) is the square of the distance between j ) represents the original sample point x through the mapping function Φ j Feature representation mapped to high-dimensional space; Φ(v i ) represents the cluster center v through the mapping function Φ i Feature representation mapped to high-dimensional space; K(x j ,v i ) is the Gaussian kernel function.
[0096]
[0097] Where: σ is the smoothness parameter, x j represents the jth sample point, v i represents the i-th cluster center.
[0098]
[0099] S2.2: Combined with clustering evaluation indicators such as Davidson-Bourdin index, silhouette coefficient and Calinski-Harabaz index, the clustering effect is evaluated. The specific formula is as follows:
[0100]
[0101] Where: DBI represents the calculation formula of Davidson-Borgin Index; k represents the number of clusters, s i represents the intra-cluster distance of the ith cluster, s j represents the intra-cluster distance of the jth cluster; d(c i ,c j ) represents the distance between the centers of cluster i and cluster j;
[0102]
[0103] Where: SC is the calculation formula of silhouette coefficient; a(i) is the average distance from sample i to other samples in its cluster; b(i) is the average distance from sample i to its nearest cluster (excluding the cluster to which it belongs); max{a(i),b(i)} means taking the larger value between a(i) and b(i).
[0104]
[0105] Where: CH represents the Calinski-Harabaz index calculation formula; B k is the inter-cluster dispersion matrix, which indicates the degree of dispersion between the center of each cluster and the total sample mean; W k is the intra-cluster dispersion matrix, which indicates the degree of dispersion between the samples in the cluster and the cluster center; trace(B k ) means B k Matrix trace; trace(W k ) indicates W k The trace of the matrix; n2 represents the total number of samples.
[0106] In step 3, correlation calculation is performed on the meteorological historical data sets of sunny days, sunny to cloudy days and rainy days after clustering similar days, so as to select meteorological characteristic factors with strong correlation as input variables of the FEDformer prediction model. The specific calculation formula is as follows:
[0107]
[0108] Where: ρ represents the Spearman rank correlation coefficient; d i is the rank difference of each pair of observations; n3 is the number of observations.
[0109] In step 3, the Spearman rank correlation coefficient (SRCC) method Spearman rank correlation coefficient is a nonparametric statistical method used to measure the monotonic correlation between two variables.
[0110] In step 3, the meteorological characteristic factors with a strong correlation with photovoltaic power generation are determined. The correlation of meteorological characteristic factors is shown in Table 1. Four meteorological characteristic factors, namely, total horizontal irradiance, diffuse horizontal irradiance, relative humidity and wind speed, are selected as input variables of the FEDformer prediction model.
[0111] Table 1 Correlation of meteorological characteristic factors
[0112]
[0113] In step 4, VMD is used to decompose the photovoltaic power sequences of sunny days, sunny to cloudy days, and rainy days respectively. By solving the following variational problem, the sum of all subsequences is constrained to be equal to the original photovoltaic power sequence, and the formula is as follows:
[0114]
[0115] Where: u k (t) is the kth mode function; ω k is the center frequency of the kth mode; δ(t) is the Dirac function; is a multiplication operator; K represents the number of modal decompositions; f(t) represents the original photovoltaic power sequence.
[0116] In order to solve the unconstrained variational problem, the Lagrange multiplier λ(t) and the quadratic penalty factor α are introduced, and the formula is as follows:
[0117]
[0118] In the formula, L(u k ,ω k ,λ) represents the augmented Lagrangian function.
[0119] The modal function u of each subsequence component is obtained by the alternating direction multiplier method: k (t) and the corresponding center frequency ω k , and its update formula is as follows:
[0120]
[0121] In the above formula, and They represent f(t) and u respectively. i (t), λ(t), and The frequency domain representation of , ω represents the frequency, and n4 represents the number of iterations. represents the frequency domain representation of the kth mode at the n4+1th iteration, represents the center frequency of the n4+1th iteration, Represents the frequency domain expression of the i-th mode, where i represents the mode index.
[0122] Through iterative updates, until the stopping condition is met, K subsequences u are obtained k and the corresponding center frequency ω k .
[0123] In step 5, the FEDformer model is a new deep learning model for time series prediction, which combines time series decomposition technology and frequency domain analysis technology. It consists of an encoder and a decoder. The model structure is as follows: Figure 5 As shown in Figure 2, the encoder extracts important trend information from the input time series and represents it as a feature vector; the decoder generates future predictions based on the feature representation generated by the encoder and the input target sequence.
[0124] The FEDformer model is used to predict each subsequence and the prediction results of the subsequences are accumulated. i (t), which is represented by the encoder as a feature vector h i (t). The specific formula is as follows:
[0125] h i (t) = Encoder(x i (t))
[0126] In the formula, h i (t) represents the feature representation of the i-th subsequence, and Encoder represents the encoder.
[0127] The decoder represents h according to the current input sequence x(t) and each subsequence feature. i (t), generating future predictions The specific formula is as follows:
[0128]
[0129] Where T represents the predicted time step and Decoder represents the decoder.
[0130] After the predicted value of each subsequence is generated, the predicted values of all subsequences are accumulated to obtain the final predicted value The specific formula is as follows:
[0131]
[0132] In the formula, n5 represents the number of subsequences.
[0133] In step 6, the root mean square error RMSE, mean absolute error MAE and determination coefficient R are used. 2 The specific calculation formulas of the three evaluation indicators are as follows:
[0134]
[0135] Where: n6 represents the number of samples; y i and Represent the actual value and predicted value of the i-th sample respectively; is the mean of the actual values, that is
[0136] Embodiment:
[0137] In order to fully demonstrate the effectiveness of the photovoltaic power generation prediction method based on similar day clustering and FEDformer in the present invention, the proposed model SRCC-VMD-FEDformer is compared with BPNN, LSTM, Transformer, FEDformer and VMD-FEDformer, and the prediction comparison results of the proposed model are shown in Figure 2. Figure 4 As shown, RMSE, MAE and R 2 The prediction performance of all experimental models is quantitatively evaluated, and the evaluation index results of different models are shown in Table 1.
[0138] from Figure 4 It can be seen that the photovoltaic power generation power prediction curve of the SRCC-VMD-FEDformer model proposed in the present invention is consistent with the actual curve for the most part, and has a high prediction accuracy, which proves the superiority and effectiveness of the present invention.
[0139] Table 1 Evaluation indicators of different models
[0140]
[0141] As can be seen from Table 1, in the three types of sunny, sunny to cloudy and rainy days, among the BPNN, LSTM, Transformer, FEDformer, VMD-FEDformer and other models, the prediction effect of the BPNN model is the worst, and the prediction effect of the VMD-FEDformer model is better, but none of them is as high as the prediction accuracy of the SRCC-VMD-FEDformer model proposed in the present invention. Through clustering of similar days, since the trend of the photovoltaic power generation power curve on sunny days is very regular, compared with the sunny to cloudy and rainy days, each prediction model shows better prediction effects under the sunny type, which shows that reasonable clustering processing can significantly improve the accuracy of the prediction model.
[0142] In the sunny type, the RMSE of the BPNN model is 23.62, MAE is 18.39, and R 2 The RMSE of the VMD-FEDformer model is 3.75, the MAE is 2.56, and the R 2 The RMSE and MAE of the SRCC-VMD-FEDformer model proposed in this invention are reduced by 20.18 and 16.26 respectively compared with the BPNN model with the worst prediction effect. 2 Compared with the VMD-FEDformer model with better prediction effect, the RMSE and MAE of the proposed model are reduced by 0.31 and 0.43 respectively, and R 2The increase was 0.0006. Compared with the sunny type, the photovoltaic power generation power fluctuation of the sunny to cloudy type is more severe, resulting in a worse prediction effect of the prediction model.
[0143] Among them, the RMSE of the BPNN model is 37.83, MAE is 32.24, and R 2 is 0.6285, while the RMSE of the SRCC-VMD-FEDformer model proposed in this invention is 10.60, MAE is 8.00, and R 2 The rainy day type has more unstable weather changes than the first two types, and the trend of photovoltaic power generation is more unpredictable. The RMSE of the SRCC-VMD-FEDformer model proposed in this invention is 8.69, MAE is 6.26, and R 2 It is 0.9601.
[0144] In summary, under all clustered meteorological types, the prediction effect under the sunny type is better than that under the sunny to cloudy and rainy types. At the same time, the SRCC-VMD-FEDformer model proposed in the present invention achieves good prediction effects under the three meteorological types.
Claims
1. Photovoltaic power generation prediction method based on similar day clustering and FEDformer, characterized by The following steps are involved: Step 1: Obtain the historical data of photovoltaic power generation of the photovoltaic power station, pre-process the historical data of photovoltaic power generation using the mean filling method, and replace the missing values with the mean of the data at the same time node; Step 2: Use the KFCM clustering algorithm to cluster the photovoltaic power history data set replaced in step 1, and evaluate the clustering effect in combination with the clustering evaluation index; Step 3: Use the Spearman rank correlation coefficient method to perform correlation analysis on the historical data set after the KFCM clustering algorithm clusters similar days, and determine the meteorological characteristic factors with a strong correlation with photovoltaic power generation as input variables of the FEDformer prediction model; Step 4: Use the VMD method to decompose the correlation data set to obtain multiple groups of subsequences to further extract features at different time scales; Step 5: Use the FEDformer prediction model to predict each subsequence, and accumulate the prediction results of the subsequences to obtain the final photovoltaic power generation prediction result.
2. The photovoltaic power generation prediction method based on similar day clustering and FEDformer according to claim 1 is characterized by: Also includes step 6: using the root mean square error RMSE, mean absolute error MAE and determination coefficient R 2 Three evaluation indicators are used to analyze the prediction results of the FEDformer prediction model.
3. The photovoltaic power generation prediction method based on similar day clustering and FEDformer according to claim 1 is characterized by: The step 1 comprises the following steps: S1.1: Determine where missing values exist in the historical PV power data set. Missing values are represented as NaN or blank. S1.2: For each variable with missing values, calculate the mean of the non-missing values. For a variable X, the mean calculation formula is as follows: Where: x i represents non-missing observations; n represents the number of non-missing values; S1.3: Fill all missing value positions of variable X with the calculated mean Mean(X).
4. The photovoltaic power generation prediction method based on similar day clustering and FEDformer according to claim 1 is characterized by: The step 2 comprises the following steps: S2.1: Use the KFCM clustering algorithm to cluster the photovoltaic power history data set after the replacement in step 1. Suppose the mapping function is Φ:X→H, X represents the original feature data set, and H represents the high-dimensional feature space; map the sample points from the original feature space to the high-dimensional feature space. Given the original feature data set X={x1,x2,…x i ,…x n },x1,x2,…x i ,…x n Respectively represent different sample points in the original feature data set; then the objective function of the KFCM clustering algorithm can be expressed as: Where: J m (U,v) represents the objective function of the KFCM clustering algorithm; c represents the number of clusters; m represents the fuzzy factor, and n1 represents the number of sample points. Represents the sample point x j For cluster center v i The membership degree of ||Φ(x j )-Φ(v i )|| 2 represents Φ(x j ) to Φ(v i ) is the square of the distance between j ) represents the original sample point x through the mapping function Φ j Feature representation mapped to high-dimensional space; Φ(v i ) represents the cluster center v through the mapping function Φ i Feature representation mapped to high-dimensional space; K(x j ,v i ) is the Gaussian kernel function; Where: σ is the smoothness parameter, x j represents the jth sample point, v i represents the i-th cluster center; S2.2: Combined with clustering evaluation indicators such as Davidson-Bourdin index, silhouette coefficient and Calinski-Harabaz index, the clustering effect is evaluated. The specific formula is as follows: Where: DBI represents the calculation formula of Davidson-Borgin Index; k represents the number of clusters, s i represents the intra-cluster distance of the ith cluster, s j represents the intra-cluster distance of the jth cluster; d(c i ,c j ) represents the distance between the centers of cluster i and cluster j; Where: SC is the calculation formula of silhouette coefficient; a(i) is the average distance from sample i to other samples in its cluster; b(i) is the average distance from sample i to its nearest cluster; max{a(i),b(i)} means taking the larger value between a(i) and b(i); Where: CH represents the Calinski-Harabaz index calculation formula; B k is the inter-cluster dispersion matrix, which indicates the degree of dispersion between the center of each cluster and the total sample mean; W k is the intra-cluster dispersion matrix, which indicates the degree of dispersion between the samples in the cluster and the cluster center; trace(B k ) means B k Matrix trace; trace(W k ) indicates W k The trace of the matrix; n2 represents the total number of samples.
5. The photovoltaic power generation prediction method based on similar day clustering and FEDformer according to claim 1 is characterized by: In step 3, correlation calculation is performed on the meteorological historical data sets of sunny days, sunny to cloudy days and rainy days after clustering similar days, so as to select meteorological characteristic factors with strong correlation as input variables of the FEDformer prediction model. The specific calculation formula is as follows: Where: ρ represents the Spearman rank correlation coefficient; d i is the rank difference of each pair of observations; n3 is the number of observations.
6. The photovoltaic power generation prediction method based on similar day clustering and FEDformer according to claim 1 is characterized by: In step 4, VMD is used to decompose the photovoltaic power sequences of sunny days, sunny to cloudy days, and rainy days respectively; by solving the following variational problem, the sum of all subsequences is constrained to be equal to the original photovoltaic power sequence, and the formula is as follows: Where: u k (t) is the kth mode function; ω k is the center frequency of the kth mode; δ(t) is the Dirac function; is a multiplication operator; K represents the number of modal decompositions; f(t) represents the original photovoltaic power sequence; In order to solve the unconstrained variational problem, the Lagrange multiplier λ(t) and the quadratic penalty factor α are introduced, and the formula is as follows: In the formula, L(u k ,ω k ,λ) represents the augmented Lagrangian function; The modal function u of each subsequence component is obtained by the alternating direction multiplier method: k (t) and the corresponding center frequency ω k , and its update formula is as follows: In the above formula, and They represent f(t) and u respectively. i (t), λ(t), and Frequency domain representation, ω represents the frequency, and n4 represents the number of iterations; represents the frequency domain representation of the kth mode at the n4+1th iteration, represents the center frequency of the n4+1th iteration, represents the frequency domain expression of the i-th mode, where i represents the mode index number; Through iterative updates, until the stopping condition is met, K subsequences u are obtained k and the corresponding center frequency ω k .
7. The photovoltaic power generation prediction method based on similar day clustering and FEDformer according to claim 1 is characterized by: In step 5, the FEDformer model consists of an encoder and a decoder. The encoder extracts important trend information from the input time series and represents it as a feature vector; the decoder generates future prediction values based on the feature representation generated by the encoder and the input target sequence. The FEDformer model is used to predict each subsequence and the prediction results of the subsequences are accumulated; for each decomposed subsequence x i (t), which is represented by the encoder as a feature vector h i (t); the specific formula is as follows: h i (t)=Encoder(x i (t)) In the formula, h i (t) represents the feature representation of the i-th subsequence, and Encoder represents the encoder; The decoder represents h according to the current input sequence x(t) and each subsequence feature. i (t), generate future predictions The specific formula is as follows: In the formula, T represents the predicted time step, and Decoder represents the decoder; After the predicted value of each subsequence is generated, the predicted values of all subsequences are accumulated to obtain the final predicted value The specific formula is as follows: Where n5 represents the number of subsequences.
8. The photovoltaic power generation prediction method based on similar day clustering and FEDformer according to claim 2 is characterized by: In step 6: the root mean square error RMSE, mean absolute error MAE and determination coefficient R are used. 2 The specific calculation formulas of the three evaluation indicators are as follows: Where: n6 represents the number of samples; y i and Represent the actual value and predicted value of the i-th sample respectively; is the mean of the actual values, that is 9. A photovoltaic power generation prediction system based on similar day clustering and FEDformer, characterized by: The system includes: a data acquisition module, a data preprocessing module, a model training module and a model prediction module, wherein: The data acquisition module is used to collect the photovoltaic power generation power history data set of the photovoltaic power station. The historical data set contains instantaneous power data with a collection resolution of 15 minutes and meteorological characteristic factor data such as total horizontal irradiance, scattered horizontal irradiance, ambient temperature, relative humidity, wind speed and wind direction, which will serve as the key input of the subsequent prediction model; The data preprocessing module first uses the SRCC method to perform correlation analysis on the historical data set, screens out meteorological characteristic factors that have a significant impact on photovoltaic power generation, and reconstructs the optimized historical data set; and decomposes the historical data set after the correlation analysis into multiple subsequences through the VMD method, thereby extracting information of different frequency components; The model training module uses the processed subsequence as input data of the prediction model, sets corresponding model hyperparameters according to specific requirements, and trains the photovoltaic power prediction model based on FEDformer; The model prediction module imports the power generation data of the current photovoltaic power station to be predicted as input data into the trained FEDformer-based photovoltaic power generation prediction model after the same data preprocessing process, and predicts the photovoltaic power generation in the future time period.
Citation Information
Cited By
Photovoltaic power prediction method and system based on multi-strategy optimization MVMD
CN122365424A