Photovoltaic power generation power short-term prediction method considering various weather conditions
By identifying the meteorological characteristics that affect photovoltaic power generation power, dividing multiple weather types, and training multiple weather sub-models, combining gray wolf optimization algorithm and error weighting coefficients, the problem of difficult to deal with multiple weather conditions in the existing technology is solved, and the accuracy of short-term prediction of photovoltaic power generation power is improved.
Patent Information
- Application Number
- CN202411792150.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-04
AI Technical Summary
In the short-term prediction of photovoltaic power generation, it is difficult to effectively deal with the complexity of photovoltaic output in various weather conditions, resulting in a decrease in prediction accuracy.
The meteorological characteristics affecting the power of photovoltaic power are identified through distance-weighted correlation analysis, a cube is constructed, and the historical weather is divided into multiple weather types using the K-means++ algorithm. Then, multiple weather sub-models are trained, and the optimal weight combination of the sub-model is calculated through the Gray Wolf optimization algorithm, the weather type is adaptively captured, and the error weighting coefficients of each sub-model are calculated to obtain the final photovoltaic power prediction output.
It improves the accuracy of short-term prediction of photovoltaic power generation, can more accurately capture the laws of different weather characteristics, reduce distribution differences between data, and enhance the stability and robustness of the model.
Smart Images

Figure CN119760629A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a short-term prediction method for photovoltaic power generation taking into account various weather conditions. Background Art
[0002] As the global demand for renewable energy continues to increase, photovoltaic power generation systems have become an important source of clean energy. However, photovoltaic power generation has significant intermittent and random characteristics, and its output is significantly affected by meteorological conditions (such as solar radiation, temperature, cloud cover, etc.). Accurate prediction of photovoltaic power can provide an important reference for grid dispatching, help balance power supply and demand in real time, and reduce power shortages or surpluses caused by fluctuations in photovoltaic power generation. At the same time, fluctuations in photovoltaic power generation may cause problems such as frequency fluctuations or voltage instability. Through accurate power prediction, control strategies (such as energy storage dispatching, standby unit startup, etc.) can be formulated in advance to significantly reduce the impact of photovoltaic power generation access on grid stability.
[0003] Compared with training with the entire data set, training the model with a data set under specific meteorological conditions can significantly improve the model performance. Sub-models for different weather characteristics can more accurately capture the laws of their respective data, reduce the distribution differences between data, and improve the prediction performance. A single model needs to adapt to multiple weather conditions and is easily affected by sample imbalance or insufficient data of a few weather conditions, resulting in a decrease in generalization ability. By decomposing it into sub-models, the model can focus on processing specific weather characteristics and avoid mutual interference between different weather characteristics. At the same time, the method of adaptively capturing weather types can dynamically determine the weights of each weather type based on similarity combined with optimization objectives, so that the model can respond to complex weather changes or mixed weather conditions in real time and improve the accuracy of prediction. For some weather (such as sunny to cloudy) with transitional characteristics, it is difficult to define it with a single category. The characteristics of multiple sub-models can be integrated under these conditions through adaptive weighted summation, and the weights can be dynamically adjusted according to actual conditions to capture the impact of transitional weather on photovoltaic power.
[0004] In the prior art CN118983780A, a multi-model integrated distributed photovoltaic short-term power prediction method and system discloses collecting and calculating the weather forecast for the prediction day, and finding similar historical prediction days from a pre-generated data set; respectively obtaining the average prediction accuracy of multiple pre-trained prediction models for the similar historical prediction days, and screening out multiple preferred prediction models based on the ranking of the average prediction accuracy; with the goal of minimizing the prediction error, constructing a power prediction model using the multiple preferred prediction models, and optimizing the weight of each preferred prediction model in the power prediction model using a random convergence method, so as to obtain the power prediction model for the prediction day; using the power prediction model of the prediction day, and using the weather forecast of the prediction day to predict the distributed photovoltaic short-term power on the prediction day.
[0005] In the prior art, the weather data of the forecast day is predicted through multiple forecast models, and then the distributed photovoltaic short-term power of the forecast day is predicted. The forecast results of multiple models are superimposed in a weighted manner. However, it does not take into account that the actual photovoltaic output is affected by the environment under different weather conditions. The data of a whole day cannot be used as the basis for prediction. It is necessary to consider the actual weather conditions on the forecast day, and to make photovoltaic short-term power predictions separately under different weather conditions, and then superimpose them for a more accurate method. Summary of the invention
[0006] In order to solve the above problems existing in the prior art, the present invention proposes a short-term prediction method for photovoltaic power generation taking into account various weather conditions.
[0007] The technical solution of the present invention is as follows:
[0008] On the one hand, the present invention proposes a short-term prediction method for photovoltaic power generation considering various weather conditions, and the specific steps include:
[0009] The meteorological features that affect photovoltaic power generation are identified through distance-weighted correlation analysis, and a multidimensional data set is constructed;
[0010] Collect historical PV power statistics and use K-means++ algorithm to classify historical weather into multiple weather types;
[0011] Input various weather type data into the constructed photovoltaic power prediction model to train multiple weather sub-models, and perform weather prediction based on the trained multiple weather sub-models;
[0012] The data of the day to be predicted is input into multiple weather sub-models at the same time, the similarity between the predicted day and each weather type is calculated, and the optimal weight combination of the sub-models is calculated by the Gray Wolf Optimization Algorithm to adaptively capture the weather type;
[0013] The error weighted coefficient of each sub-model is calculated, and the prediction results of each sub-model are weighted by combining them with the optimal weight to obtain the final photovoltaic power prediction output.
[0014] As a preferred implementation, the meteorological characteristics that affect photovoltaic power generation power include total horizontal radiation, total inclined radiation, temperature, humidity, wind speed, wind direction, daily rainfall and diffuse horizontal radiation.
[0015] As a preferred implementation, the step of identifying meteorological characteristics affecting photovoltaic power generation through distance-weighted correlation analysis is specifically as follows:
[0016] First, we construct data sets with environmental factors as comparison sequence, power as reference sequence, and meteorological factors as contrast sequence:
[0017] X power =(x p1 ,x p2 ,...,x pn )
[0018] Y data =(y d1 ,y d2 ,...,y dn )
[0019] Where, X power is the reference sequence, Y data is the comparison sequence, x pn is the nth sample of the reference sequence, y dn is the nth sample of the comparison sequence;
[0020] Each time a meteorological characteristic data is extracted as a comparison sequence, and then the correlation degree at the i-th moment is calculated by weighting based on the distance metric. The specific calculation formula is as follows:
[0021]
[0022] In the formula, ξ(x pi ,y di ) is the correlation between each pair of data points between PV output and meteorological factors, σ and τ are the scale factors of the Gaussian kernel, and ρ is the resolution coefficient;
[0023] The feature sequences with correlation greater than a preset threshold are determined as meteorological features that affect photovoltaic power generation and used as inputs to the photovoltaic power prediction model.
[0024] As a preferred implementation, the steps of collecting historical photovoltaic power generation statistics and using the K-means++ algorithm to divide historical weather into multiple weather types are specifically as follows:
[0025] Calculate the average value based on the historical photovoltaic power generation statistics Standard Deviation Coefficient of variation cv day , Kurtosis and skewness Five statistical indicators; these five statistical indicators are used as clustering features of the K-means++ algorithm to construct the input matrix x day , the matrix expression is as follows:
[0026]
[0027] Among them, the coefficient of variation cv day , Kurtosis and skewness The calculation formula is as follows:
[0028]
[0029] The historical data are divided into different weather types, and sub-datasets are constructed to ensure that each sub-dataset has similar output power characteristics. According to the final clustering center of the K-means++ model, the samples are assigned to the corresponding clusters to obtain clustering results of various weather types.
[0030] As a preferred implementation, the steps of inputting various weather type data into the constructed photovoltaic power prediction model to train multiple weather sub-models, and performing weather prediction based on the trained multiple weather sub-models are specifically as follows:
[0031] An LSTM module is added to the basic Informer model and connected to the output end of the encoder, and two layers of one-dimensional convolution are set in the encoder and the LSTM module; the constructed Informer-LSTM model is used as a photovoltaic power prediction model;
[0032] The historical photovoltaic power data and meteorological characteristic data of various weather conditions are used as the input features of the Informer-LSTM model. The loss function and optimizer of each weather sub-prediction model are defined respectively. The historical photovoltaic power data and meteorological characteristic data sets of various weather conditions are used to train various weather sub-models in the photovoltaic power prediction model, and then weather prediction is performed based on the trained various weather sub-models.
[0033] As a preferred implementation, the step of simultaneously inputting the data of the day to be predicted into multiple weather sub-models and calculating the similarity between the predicted day and each weather type is specifically as follows:
[0034] First, the meteorological characteristic data of each weather type is input into the variational autoencoder for training, and the data of each weather type is mapped to different areas in the latent space; for the data of the day to be predicted, the trained variational autoencoder is used to extract features and map them to the same latent space; then the Euclidean distance in the latent space is calculated as the similarity. The specific calculation formula is as follows:
[0035] Similarity = exp(-||Embedding(x 待预测日 )-Embedding(y 天气类型 )||2)
[0036] In the formula, Embedding(x 待预测日 ) is the feature representation of the day to be predicted, Embedding(x 天气类型 ) is the average characteristic representation of historical data of the selected weather type.
[0037] As a preferred implementation, the step of calculating the optimal weight combination of sub-models by the Grey Wolf Optimization Algorithm is specifically as follows:
[0038] The similarity is used as the initial weight vector combination ω of the sub-model, and the constraints are set as Where k is the number of weather types; then the weight coefficient and the corresponding forecast output are weighted and summed to obtain the output of the adaptive forecast model; finally, the optimization target is defined as the mean square error between the final forecast value and the true value based on logarithmic transformation. The specific calculation formula is as follows:
[0039]
[0040] In the formula, is the weighted prediction output of photovoltaic meteorological data, Y i is the real value of photovoltaic power;
[0041] The weight vector combination ω is updated using the optimization objective to obtain the optimal weight combination among different weather forecast sub-models.
[0042] As a preferred implementation, the step of calculating the error weighted coefficient of each sub-model and weighting the prediction results of each sub-model with the optimal weight combination is specifically as follows:
[0043] First, calculate the prediction error for each weather prediction sub-model:
[0044]
[0045] In the formula, e i is the absolute error sum of the i-th sub-model, y t is the true value of the sub-model at time t, is the predicted value at time t;
[0046] For each weather prediction sub-model, calculate its error weight coefficient:
[0047]
[0048] In the formula, μ i is the error weighting coefficient of the ith sub-model, and λ is the coefficient that controls the exponential decay speed;
[0049] Finally, the optimal weight coefficient and the error weight coefficient are combined to obtain the final photovoltaic power short-term prediction output:
[0050]
[0051] In the formula, It is a short-term prediction output for the final photovoltaic power generation.
[0052] On the other hand, the present invention proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a short-term prediction method for photovoltaic power generation taking into account multiple weather conditions as described in any embodiment of the present invention is implemented.
[0053] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a short-term prediction method for photovoltaic power generation taking into account multiple weather conditions as described in any embodiment of the present invention.
[0054] The present invention has the following beneficial effects:
[0055] 1. The present invention maps the variational autoencoder to the weather similarity calculation in the latent space, and the weight initialization can more accurately reflect the potential relationship between the predicted day and each weather type, so that the initial solution of the gray wolf optimization algorithm is closer to the global optimal solution, reducing the difficulty of iterative optimization.
[0056] 2. The present invention introduces the Grey Wolf Optimization Algorithm into the dynamic adjustment of sub-model weights and the optimization process of prediction errors, and combines the mean square error between the actual value and the predicted value of photovoltaic power based on logarithmic transformation as the overall optimization goal, so as to obtain the global optimal weight of the sub-model weights and improve the prediction accuracy.
[0057] 3. The present invention dynamically adjusts the global optimal weight by considering the prediction error of each sub-model, introduces the sub-model error information into the weight calculation, and performs local constraints in combination with the results of the optimization algorithm to further enhance the rationality of the weight allocation.
[0058] 4. The present invention introduces a distance weighting method to assign higher weights to indicators that are closer to the target value, thereby more accurately reflecting their contribution to the target system, improving the accuracy and rationality of correlation calculations, and being able to more accurately process high-dimensional data and improve the discrimination of calculation results.
[0059] 5. The present invention uses the statistical characteristics of daily power generation as the input features of the clustering algorithm, which can effectively reduce the data dimension while retaining key information, smooth random fluctuations in the data, reduce the impact of data noise on clustering results, and improve the stability and robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a schematic diagram of the steps of the present invention;
[0061] Figure 2 This is the structural diagram of the Informer-LSTM model;
[0062] Figure 3 This is the structural diagram of the short-term prediction model for photovoltaic power generation;
[0063] Figure 4 This is the weight distribution diagram of various weather models. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0066] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0067] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0068] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0069] Embodiment 1:
[0070] See also Figure 1 , a short-term prediction method for photovoltaic power generation considering various weather conditions, the specific steps include:
[0071] The meteorological features that affect photovoltaic power generation are identified through distance-weighted correlation analysis, and a multidimensional data set is constructed;
[0072] Collect historical PV power statistics and use K-means++ algorithm to classify historical weather into multiple weather types;
[0073] Input various weather type data into the constructed photovoltaic power prediction model to train multiple weather sub-models, and perform weather prediction based on the trained multiple weather sub-models;
[0074] The data of the day to be predicted is input into multiple weather sub-models at the same time, the similarity between the predicted day and each weather type is calculated, and the optimal weight combination of the sub-models is calculated by the Gray Wolf Optimization Algorithm to adaptively capture the weather type;
[0075] The error weighted coefficient of each sub-model is calculated, and the prediction results of each sub-model are weighted by combining them with the optimal weight to obtain the final photovoltaic power prediction output.
[0076] As a preferred implementation manner of this embodiment, the meteorological characteristics that affect photovoltaic power generation power include total horizontal radiation, total inclined radiation, temperature, humidity, wind speed, wind direction, daily rainfall and diffuse horizontal radiation.
[0077] In this embodiment, several meteorological characteristics that have the most significant impact on weather types are summarized from a large number of meteorological characteristics.
[0078] As a preferred implementation of this embodiment, the step of identifying meteorological characteristics affecting photovoltaic power generation through distance weighted correlation analysis is specifically as follows:
[0079] First, we construct data sets with environmental factors as comparison sequence, power as reference sequence, and meteorological factors as contrast sequence:
[0080] X power =(x p1 ,x p2 ,...,x pn )
[0081] Y data =(y d1 ,y d2 ,...,ydn )
[0082] Where, X power is the reference sequence, Y data is the comparison sequence, x pn is the nth sample of the reference sequence, y dn is the nth sample of the comparison sequence;
[0083] In this embodiment, the collected data needs to be preprocessed by missing value filling, outlier correction and normalization.
[0084] Each time a meteorological characteristic data is extracted as a comparison sequence, and then the correlation degree at the i-th moment is calculated by weighting based on the distance metric. The specific calculation formula is as follows:
[0085]
[0086] In the formula, ξ(x pi ,y di ) is the correlation between each pair of data points between PV output and meteorological factors, σ and τ are the scale factors of the Gaussian kernel, and ρ is the resolution coefficient;
[0087] The feature sequences with correlation greater than a preset threshold are determined as meteorological features that affect photovoltaic power generation and used as inputs to the photovoltaic power prediction model.
[0088] In this embodiment, the preset threshold of the correlation degree is set to 0.6.
[0089] As a preferred implementation of this embodiment, the steps of collecting historical photovoltaic power generation statistical data and using the K-means++ algorithm to divide historical weather into multiple weather types are specifically as follows:
[0090] Calculate the average value based on the historical photovoltaic power generation statistics Standard Deviation Coefficient of variation cv day , Kurtosis and skewness Five statistical indicators; these five statistical indicators are used as clustering features of the K-means++ algorithm to construct the input matrix x day , the matrix expression is as follows:
[0091]
[0092] Among them, the coefficient of variation cv day , Kurtosis and skewness The calculation formula is as follows:
[0093]
[0094] The historical data are divided into different weather types, and sub-datasets are constructed to ensure that each sub-dataset has similar output power characteristics. According to the final clustering center of the K-means++ model, the samples are assigned to the corresponding clusters to obtain clustering results of various weather types.
[0095] In this embodiment, since the dimension of meteorological characteristics is high and some changes may be unrelated to power generation, and the statistical characteristics of daily power reduce the characteristic dimension and have regularity independent of time and weather, the average values of the five statistical indicators of daily photovoltaic power generation are selected. Standard Deviation Coefficient of variation cv day , Kurtosis and skewness Clustering features as input to the K-means++ model.
[0096] As a preferred implementation of this embodiment, the steps of inputting various weather type data into the constructed photovoltaic power prediction model to train multiple weather sub-models, and performing weather prediction based on the trained multiple weather sub-models are specifically as follows:
[0097] An LSTM module is added to the basic Informer model and connected to the output end of the encoder, and two layers of one-dimensional convolution are set in the encoder and the LSTM module; the constructed Informer-LSTM model is used as a photovoltaic power prediction model;
[0098] The historical photovoltaic power data and meteorological characteristic data of various weather conditions are used as the input features of the Informer-LSTM model. The loss function and optimizer of each weather sub-prediction model are defined respectively. The historical photovoltaic power data and meteorological characteristic data sets of various weather conditions are used to train various weather sub-models in the photovoltaic power prediction model, and then weather prediction is performed based on the trained various weather sub-models.
[0099] In this embodiment, the traditional Informer model is susceptible to the influence of short-term dependencies in time series prediction, and it is difficult to capture and retain sudden changes in information in a short time. Photovoltaic power generation is affected by meteorological factors and may change greatly at different times. Therefore, a local enhanced LSTM module is added to the Informer model so that the model can selectively retain and discard information and filter out irrelevant or outdated data that has the least impact on the current state. First, the photovoltaic power historical data and historical meteorological data are input into the Informer model, and the attention weights of each feature vector are dynamically allocated through the self-attention mechanism. Next, the output of the Informer encoder is reduced in dimension through two layers of one-dimensional convolution as the input of the LSTM module, and finally the prediction output of the long sequence is obtained through the fully connected layer.
[0100] The historical photovoltaic power data and total horizontal radiation, total tilted radiation, temperature, wind speed, and diffuse horizontal radiation were selected as the input features of the Informer-LSTM model. Each weather type dataset was divided into a training set, a validation set, and a test set. The loss function and optimizer were defined. The Informer-LSTM model was trained with the training set, optimized and adjusted with the validation set, and evaluated with the test set.
[0101] The structure of the Informer-LSTM model is as follows Figure 2 shown.
[0102] As a preferred implementation of this embodiment, the step of simultaneously inputting the data of the day to be predicted into multiple weather sub-models and calculating the similarity between the predicted day and each weather type is specifically as follows:
[0103] First, the meteorological characteristic data of each weather type is input into the variational autoencoder for training, and the data of each weather type is mapped to different areas in the latent space; for the data of the day to be predicted, the trained variational autoencoder is used to extract features and map them to the same latent space; then the Euclidean distance in the latent space is calculated as the similarity. The specific calculation formula is as follows:
[0104] Similarity = exp(-||Embedding(x 待预测日 )-Embedding(y 天气类型 )||2)
[0105] In the formula, Embedding(x 待预测日 ) is the feature representation of the day to be predicted, Embedding(x 天气类型 ) is the average characteristic representation of historical data of the selected weather type.
[0106] In this embodiment, since the day to be predicted may have different weather types, when initializing the weight coefficients of each weather prediction model, a variational auto-encoder (VAE) is used to learn the characteristic distribution of different weathers and output the probability similarity between the day to be predicted and each weather type.
[0107] As a preferred implementation of this embodiment, the step of calculating the optimal weight combination of sub-models by using the Grey Wolf Optimization Algorithm is specifically as follows:
[0108] In the Grey Wolf Optimization (GWO) algorithm, the similarity is used as the initial weight vector combination ω of the sub-model, and the constraint condition is set as Where k is the number of weather types; then the weight coefficient and the corresponding forecast output are weighted and summed to obtain the output of the adaptive forecast model; finally, the optimization target is defined as the mean square error between the final forecast value and the true value based on logarithmic transformation. The specific calculation formula is as follows:
[0109]
[0110] In the formula, is the weighted prediction output of photovoltaic meteorological data, Y i is the real value of photovoltaic power;
[0111] The weight vector combination ω is updated using the optimization objective to obtain the optimal weight combination among different weather forecast sub-models.
[0112] In this embodiment, the optimization target is defined as the mean square error between the final predicted value and the true value based on logarithmic transformation, which can make the model more sensitive to smaller error terms.
[0113] As a preferred implementation of this embodiment, the step of calculating the error weighted coefficient of each sub-model and weighting the prediction results of each sub-model with the optimal weight combination is specifically as follows:
[0114] First, calculate the prediction error for each weather prediction sub-model:
[0115]
[0116] In the formula, e i is the absolute error sum of the i-th sub-model, y t is the true value of the sub-model at time t, is the predicted value at time t;
[0117] For each weather prediction sub-model, calculate its error weight coefficient:
[0118]
[0119] In the formula, μ i is the error weighting coefficient of the ith sub-model, and λ is the coefficient that controls the exponential decay speed;
[0120] Finally, the optimal weight coefficient and the error weight coefficient are combined to obtain the final photovoltaic power short-term prediction output:
[0121]
[0122] In the formula, It is a short-term prediction output for the final photovoltaic power generation.
[0123] In this embodiment, the structure of the photovoltaic power short-term prediction model based on the above method is as follows: Figure 3 shown.
[0124] Embodiment 2:
[0125] Based on the above-mentioned short-term prediction method of photovoltaic power generation considering various weather conditions, actual data is substituted for simulation experiments:
[0126] The data of photovoltaic power stations in a certain area are selected for case analysis. The photovoltaic power generation data from September 2015 to August 2016 are used as the research object, the sampling time is 5 minutes, and the data from 07:00 to 19:00 every day are selected. Through clustering of similar days, the data sets of each weather type are obtained. The Informer-LSTM is trained with the data sets of each weather type to obtain the prediction sub-model. In the prediction stage, September 4 and 5, September 27 and 28, 2016 are selected as the days to be predicted for sunny, cloudy and rainy days respectively. The error indicators of different weather types are shown in Tables 1, 2, and 3 below:
[0127]
[0128] Table 1 Effects of various models on sunny day prediction
[0129]
[0130]
[0131] Table 2 Effects of various models on cloudy day prediction
[0132]
[0133] Table 3 Effects of various models on rainy day prediction
[0134] For different weather forecast days, the weights assigned to various weather models are as follows Figure 4The color depth in the figure represents the size of the weight. The larger the weight, the darker the color. It can be seen that on the forecast days of sunny, cloudy and rainy days, the model assigns higher weights to the corresponding weather type sub-models.
[0135] Embodiment three:
[0136] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for short-term prediction of photovoltaic power generation taking into account multiple weather conditions as described in any embodiment of the present invention is implemented.
[0137] Embodiment 4:
[0138] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for short-term prediction of photovoltaic power generation taking into account multiple weather conditions as described in any embodiment of the present invention.
[0139] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for short-term prediction of photovoltaic power generation considering various weather conditions, characterized in that: The specific steps include: The meteorological features that affect photovoltaic power generation are identified through distance-weighted correlation analysis, and a multidimensional data set is constructed; Collect historical PV power statistics and use K-means++ algorithm to classify historical weather into multiple weather types; Input various weather type data into the constructed photovoltaic power prediction model to train multiple weather sub-models, and perform weather prediction based on the trained multiple weather sub-models; The data of the day to be predicted is input into multiple weather sub-models at the same time, the similarity between the predicted day and each weather type is calculated, and the optimal weight combination of the sub-models is calculated by the Gray Wolf Optimization Algorithm to adaptively capture the weather type; The error weighted coefficient of each sub-model is calculated, and the prediction results of each sub-model are weighted by combining them with the optimal weight to obtain the final photovoltaic power prediction output.
2. A method for short-term prediction of photovoltaic power generation considering various weather conditions according to claim 1, characterized in that: The meteorological characteristics that affect photovoltaic power generation include total horizontal radiation, total inclined radiation, temperature, humidity, wind speed, wind direction, daily rainfall and diffuse horizontal radiation.
3. A method for short-term prediction of photovoltaic power generation considering various weather conditions according to claim 2, characterized in that: The steps of identifying meteorological characteristics affecting photovoltaic power generation through distance-weighted correlation analysis are specifically as follows: First, we construct data sets with environmental factors as comparison sequence, power as reference sequence, and meteorological factors as contrast sequence: X power =(x p1 ,x p2 ,...,x pn ) AND data (and d1 ,and d2 ,...,and dn ) Where, X power is the reference sequence, Y data is the comparison sequence, x pn is the nth sample of the reference sequence, y dn is the nth sample of the comparison sequence; Each time a meteorological characteristic data is extracted as a comparison sequence, and then the correlation degree at the i-th moment is calculated by weighting based on the distance metric. The specific calculation formula is as follows: In the formula, ξ(x pi ,y di ) is the correlation between each pair of data points between PV output and meteorological factors, σ and τ are the scale factors of the Gaussian kernel, and ρ is the resolution coefficient; The feature sequences with correlation greater than a preset threshold are determined as meteorological features that affect photovoltaic power generation and used as inputs to the photovoltaic power prediction model.
4. The method for short-term prediction of photovoltaic power generation considering various weather conditions according to claim 1, characterized in that: The steps of collecting the statistical data of historical photovoltaic power generation and using the K-means++ algorithm to classify historical weather into multiple weather types are as follows: Calculate the average value based on the historical photovoltaic power generation statistics Standard Deviation Coefficient of variation cv day , Kurtosis and skewness Five statistical indicators; these five statistical indicators are used as clustering features of the K-means++ algorithm to construct the input matrix x day , the matrix expression is as follows: Among them, the coefficient of variation cv day , Kurtosis and skewness The calculation formula is as follows: The historical data are divided into different weather types, and sub-datasets are constructed to ensure that each sub-dataset has similar output power characteristics. According to the final clustering center of the K-means++ model, the samples are assigned to the corresponding clusters to obtain clustering results of various weather types.
5. The method for short-term prediction of photovoltaic power generation considering various weather conditions according to claim 1, characterized in that: The steps of inputting various weather type data into the constructed photovoltaic power prediction model to train multiple weather sub-models, and performing weather prediction based on the trained multiple weather sub-models are specifically as follows: An LSTM module is added to the basic Informer model and connected to the output end of the encoder, and two layers of one-dimensional convolution are set in the encoder and the LSTM module; the constructed Informer-LSTM model is used as a photovoltaic power prediction model; The historical photovoltaic power data and meteorological characteristic data of various weather conditions are used as the input features of the Informer-LSTM model. The loss function and optimizer of each weather sub-prediction model are defined respectively. The historical photovoltaic power data and meteorological characteristic data sets of various weather conditions are used to train various weather sub-models in the photovoltaic power prediction model, and then weather prediction is performed based on the trained various weather sub-models.
6. A method for short-term prediction of photovoltaic power generation considering various weather conditions according to claim 1, characterized in that: The step of simultaneously inputting the data of the day to be predicted into multiple weather sub-models and calculating the similarity between the predicted day and each weather type is specifically as follows: First, the meteorological characteristic data of each weather type is input into the variational autoencoder for training, and the data of each weather type is mapped to different areas in the latent space; for the data of the day to be predicted, the trained variational autoencoder is used to extract features and map them to the same latent space; then the Euclidean distance in the latent space is calculated as the similarity. The specific calculation formula is as follows: Similarity = exp(-||Embedding(x 待预测日 )-Embedding(y 天气类型 )||2) In the formula, Embedding(x 待预测日 ) is the feature representation of the day to be predicted, Embedding(x 天气类型 ) is the average characteristic representation of historical data of the selected weather type.
7. A method for short-term prediction of photovoltaic power generation considering various weather conditions according to claim 6, characterized in that: The step of calculating the optimal weight combination of sub-models by the grey wolf optimization algorithm is specifically as follows: The similarity is used as the initial weight vector combination ω of the sub-model, and the constraints are set as Where k is the number of weather types; then the weight coefficient and the corresponding forecast output are weighted and summed to obtain the output of the adaptive forecast model; finally, the optimization target is defined as the mean square error between the final forecast value and the true value based on logarithmic transformation. The specific calculation formula is as follows: In the formula, is the weighted prediction output of photovoltaic meteorological data, Y i is the real value of photovoltaic power; The weight vector combination ω is updated using the optimization objective to obtain the optimal weight combination among different weather forecast sub-models.
8. The method for short-term prediction of photovoltaic power generation considering various weather conditions according to claim 6, characterized in that: The step of calculating the error weighted coefficient of each sub-model and weighting the prediction results of each sub-model with the optimal weight combination is specifically as follows: First, calculate the prediction error for each weather prediction sub-model: In the formula, e i is the absolute error sum of the i-th sub-model, y t is the true value of the sub-model at time t, is the predicted value at time t; For each weather prediction sub-model, calculate its error weight coefficient: In the formula, μ i is the error weighting coefficient of the ith sub-model, and λ is the coefficient that controls the exponential decay speed; Finally, the optimal weight coefficient and the error weight coefficient are combined to obtain the final photovoltaic power short-term prediction output: In the formula, It is a short-term prediction output for the final photovoltaic power generation.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, a short-term prediction method for photovoltaic power generation taking into account multiple weather conditions as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a short-term prediction method for photovoltaic power generation taking into account multiple weather conditions as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Transform model-based photovoltaic power generation prediction method
CN120450104A
Photovoltaic power station prediction method and prediction model adaptive to meteorological change
CN122118661A
A photovoltaic power station prediction method and prediction model adaptive to weather changes
CN122118661B