Photovoltaic power generation prediction optimization method and system

The optimization of the CNN-LSTM model with a snake optimization algorithm and comprehensive similarity determination addresses the limitations of existing photovoltaic power generation prediction models, enhancing prediction accuracy by selecting relevant historical data and improving model efficiency.

CN119227894APending Publication Date: 2024-12-31STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411410633.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing photovoltaic power generation prediction models suffer from algorithmic limitations and the presence of invalid information in historical data, leading to inaccurate predictions and reduced accuracy.

Method used

An optimization method and system that utilizes a CNN-LSTM model optimized by a snake optimization algorithm, selecting historical similar days based on meteorological factors and their correlation with photovoltaic power generation, and employing a twin network for comprehensive similarity determination to improve prediction accuracy.

Benefits of technology

Enhances the accuracy of photovoltaic power generation predictions by reducing the impact of invalid data and improving the correlation between historical and prediction day data, thereby ensuring more precise output forecasts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227894A_ABST
    Figure CN119227894A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a photovoltaic power generation prediction optimization method and system, and the method comprises the steps: obtaining the historical data of photovoltaic power generation, determining a target factor affecting the photovoltaic power generation based on the historical data, and increasing the correlation between the historical data and the prediction day data; the target factor is used as a selection index, and a historical similar day set of a to-be-predicted day is selected from historical data, so that the inherent limitation of an algorithm is broken through, and the similarity degree difference between the historical data of the historical day and the to-be-predicted day is reduced; inputting the historical data of the historical similar day set into a preset photovoltaic power generation prediction model for photovoltaic power generation prediction of the to-be-predicted day; wherein the step of presetting the photovoltaic power generation prediction model comprises the substeps of optimizing and screening historical data of a CNN-LSTM model and a historical similar day set through a snake optimization algorithm and then setting the historical data, so that the defect of poor practicability caused by the existence of a large amount of invalid information in a historical data sample is effectively overcome, and the accuracy of photovoltaic power generation power prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of photovoltaic power generation, and in particular to an optimization method and system for photovoltaic power generation prediction. Background Art

[0002] At present, the development and utilization of new energy sources are accelerating and expanding. As a typical clean energy, solar energy is favored by virtue of its wide geographical distribution, abundant reserves, clean and efficient, and short construction period. Using solar power as a beneficial supplement to traditional energy has become an important means to achieve energy structure transformation. Under the background of green and low-carbon development of solar energy, the scale of photovoltaic installed capacity continues to grow. However, the output power of photovoltaic power generation systems is easily affected by multiple factors such as local meteorological conditions, station equipment operation and maintenance, and human operation, showing volatility and randomness, resulting in a certain degree of safety hazards in the process of photovoltaic grid connection. Therefore, accurate photovoltaic power generation power prediction is of great significance.

[0003] The existing photovoltaic power generation prediction model, on the one hand, is subject to the inherent limitations of the algorithm itself, and may lead to inaccurate predictions due to the significant differences in the meteorological conditions and photovoltaic output of the historical day and the degree of similarity between the day to be predicted. On the other hand, the practicality of the historical data samples is poor, and there is a large amount of invalid information that interferes with the prediction, resulting in defects such as long training time of the prediction model, poor convergence and reduced prediction accuracy, and the accuracy of photovoltaic power generation prediction cannot be guaranteed. Summary of the invention

[0004] In view of this, in order to solve the problem that the existing photovoltaic power generation prediction model has inherent limitations of the algorithm itself and a large amount of invalid information in historical data samples, resulting in poor practicality, and thus cannot guarantee the accuracy of photovoltaic power generation prediction, an embodiment of the present invention provides an optimization method and system for photovoltaic power generation prediction.

[0005] A photovoltaic power generation prediction optimization method, characterized by comprising: Acquire historical data of photovoltaic power generation, and determine target factors affecting photovoltaic power generation based on the historical data; Taking the target factor as the selection index, a set of historical similar days of the day to be predicted is selected from the historical data; Inputting the historical data of the historical similar day set into a preset photovoltaic power generation prediction model to perform photovoltaic power generation prediction on the day to be predicted; Among them, the preset of the photovoltaic power generation prediction model includes: setting after optimizing and screening the CNN-LSTM model and the historical data of the historical similar day set through the snake optimization algorithm.

[0006] In a possible embodiment, the historical data includes: meteorological factors of historical days, photovoltaic power generation under current meteorological factors; The determining of target factors affecting photovoltaic power generation based on the historical data includes: Calculating the relationship coefficient between the meteorological factor and the photovoltaic power generation under the corresponding meteorological factor, the magnitude of the relationship coefficient is proportional to the correlation between the corresponding meteorological factor and the photovoltaic power generation; Sorting the relationship coefficients to determine meteorological factors that meet an influencing condition, wherein the influencing condition includes: the relationship coefficient being greater than a preset relationship coefficient; The meteorological factors that meet the influencing conditions are used as target factors affecting photovoltaic power generation.

[0007] In a possible embodiment, the method of using the target factor as a selection index and selecting a historically similar day of the to-be-predicted day from historical data includes: Acquire weather information of a day to be predicted, determine meteorological factors from the weather information, and then determine target factors corresponding to the meteorological factors of the day to be predicted; Filter out multiple historical days whose meteorological factors are consistent with the corresponding target factors from the historical data; Taking meteorological factors as variables, calculate the values ​​of the day series to be predicted and the values ​​of the historical day series respectively; Determine the comprehensive similarity between the to-be-predicted day sequence and the historical day sequence, and then determine the historical similar days of the to-be-predicted day.

[0008] In a possible embodiment, determining the comprehensive similarity between the sequence of days to be predicted and the sequence of historical days, and then determining the historical similar days of the days to be predicted, includes: Calculate the distance between any historical day sequence and the day sequence to be predicted to determine the distance similarity, and output the historical day sequence whose distance similarity is greater than the preset distance similarity; The historical day sequence with a similarity greater than a preset distance and the day sequence to be predicted are respectively input into two sub-networks sharing weights in the twin network to determine the shape similarity, and a loss function is established to screen out the historical day sequence whose shape similarity meets the preset similarity; Calculating a weighted sum of the distance proximity and the shape similarity, and determining the weighted sum as a comprehensive similarity; A plurality of historical days satisfying the comprehensive similarity are determined, and a set of historical similar days of the day to be predicted is generated.

[0009] In a possible embodiment, the photovoltaic power generation prediction model is set after the CNN-LSTM model and the historical data of the historical similar day set are optimized and screened by the snake optimization algorithm, including: Determining operating parameters of a photovoltaic power generation prediction model according to the CNN-LSTM combined model, wherein the operating parameters include: a learning rate, a hidden layer node, and a regularization coefficient; The operating parameters are optimized and screened by a snake optimization algorithm to determine the target parameters, and the historical data of the historical similar day set are optimized and screened to determine the target historical data; A photovoltaic power generation prediction model is set based on the target parameters and the target historical data.

[0010] In a possible embodiment, the optimization method includes: The preset of the photovoltaic power generation prediction model also includes: setting the photovoltaic power generation prediction model to an LSTM model and a CNN-LSTM model respectively.

[0011] In a possible embodiment, the optimization method further includes: Evaluate the preset photovoltaic power generation prediction model and then determine the optimal photovoltaic output prediction model.

[0012] In a possible embodiment, the step of evaluating a preset photovoltaic power generation prediction model to determine an optimal photovoltaic output prediction model includes: Determine the prediction results of the snake optimization algorithm and CNN-LSTM combined model, LSTM model, and CNN-LSTM model; The mean absolute error, root mean square error and goodness of fit value of the prediction results of each model were calculated respectively; The prediction result is evaluated by taking the sum of the mean absolute error and the root mean square error as less than the preset error and the goodness of fit value as greater than the preset goodness of fit value as evaluation criteria; The compliance rate of the prediction result evaluation standard is determined, and the photovoltaic power generation prediction model with the largest prediction result compliance rate is output as the optimal photovoltaic output prediction model.

[0013] Based on the same concept, an embodiment of the present invention provides an optimization system for photovoltaic power generation prediction, including: An identification module, used to obtain historical data of photovoltaic power generation and determine target factors affecting photovoltaic power generation based on the historical data; A selection module is used to select a set of historical similar days of the day to be predicted from historical data by taking the target factor as a selection index; A prediction module is used to input the historical data of the historical similar day set into a preset photovoltaic power generation prediction model to predict the photovoltaic power generation of the day to be predicted; wherein, the preset photovoltaic power generation prediction model includes: setting the CNN-LSTM model and the historical data of the historical similar day set after optimal screening through a snake optimization algorithm.

[0014] In a possible embodiment, the historical data includes: meteorological factors of historical days and photovoltaic power generation under current meteorological factors; the identification module includes: A coefficient calculation unit, used to calculate the relationship coefficient between the meteorological factor and the photovoltaic power generation under the corresponding meteorological factor by a convergent cross-mapping algorithm, wherein the magnitude of the relationship coefficient is proportional to the correlation between the corresponding meteorological factor and the photovoltaic power generation; A meteorological factor unit, used to sort the relationship coefficients to determine meteorological factors that meet an influencing condition, wherein the influencing condition includes: the relationship coefficient being less than a preset relationship coefficient; The target factor unit is used to take the meteorological factors that meet the influencing conditions as target factors that affect photovoltaic power generation.

[0015] The embodiment of the present invention provides an optimization method and system for photovoltaic power generation prediction, which increases the correlation between historical data and prediction day data by acquiring historical data of photovoltaic power generation and determining target factors affecting photovoltaic power generation based on the historical data; takes the target factors as selection indicators, selects a set of historical similar days of the day to be predicted from the historical data, breaks through the inherent limitations of the algorithm itself, and reduces the difference in the degree of similarity between the historical data of the historical day and the day to be predicted; inputs the historical data of the set of historical similar days into a preset photovoltaic power generation prediction model to perform photovoltaic power generation prediction on the day to be predicted; wherein, the preset photovoltaic power generation prediction model includes: setting after optimal screening of the CNN-LSTM model and the historical data of the set of historical similar days by a snake optimization algorithm, which effectively solves the disadvantage that a large amount of invalid information exists in the historical data samples, resulting in poor practicality, and improves the accuracy of photovoltaic power generation power prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of an embodiment of a photovoltaic power generation prediction optimization method provided by an embodiment of the present invention; Figure 2 A flowchart of another embodiment of a photovoltaic power generation prediction optimization method provided by an embodiment of the present invention; Figure 3 A flow chart of an embodiment of another photovoltaic power generation prediction optimization method provided by an embodiment of the present invention; Figure 4 A flow chart of another embodiment of a photovoltaic power generation prediction optimization method provided by an embodiment of the present invention; Figure 5 A flowchart of an embodiment of a photovoltaic power generation prediction optimization method provided by an embodiment of the present invention; Figure 6 A schematic diagram of the architecture of an optimization system for photovoltaic power generation prediction provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.

[0018] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.

[0019] See also Figure 1 , is a flow chart of an embodiment of a photovoltaic power generation prediction optimization method provided by an embodiment of the present invention, such as Figure 1 As shown, the process may include the following steps: Step 101: Acquire historical data of photovoltaic power generation, and determine target factors affecting photovoltaic power generation based on the historical data.

[0020] The historical data may include, but are not limited to: meteorological factors of historical days and photovoltaic power generation under current meteorological factors.

[0021] In one embodiment, the above-mentioned meteorological factors can be classified and determined by meteorological type, which is not limited here. For example, if the meteorological type is rainy, the factors following the rainy weather may be: wind, thunder, lightning, thunder and lightning, wind and hail, etc. within a set temperature range, wherein the temperature range can be set according to different seasons and different temperatures within a day, and the magnitude of the factors can also be quantified. For another example, if the meteorological type is sunny, the factors following the sunny weather may be: wind level within a set temperature range, light intensity, etc., which can be set according to actual application, and are not limited here.

[0022] In order to improve the prediction accuracy of photovoltaic power generation data on the predicted day, the meteorological factors of historical days in the historical data and the correlation of photovoltaic power generation under the current meteorological factors can be screened, and the target factors with high correlation and the photovoltaic power generation under the target factors can be retained, so as to reduce the impact of invalid meteorological factors on the subsequent prediction accuracy.

[0023] As for how to determine the target factors affecting photovoltaic power generation based on historical data, it can be seen from Figure 2 The embodiment flow chart shown is implemented. Figure 2The flowchart of another method for optimizing photovoltaic power generation prediction provided by an embodiment of the present invention is shown. The process may include the following steps: Step 201, calculating the relationship coefficient between the meteorological factor and the photovoltaic power generation under the corresponding meteorological factor, the size of the relationship coefficient is proportional to the correlation between the corresponding meteorological factor and the photovoltaic power generation.

[0024] Step 202: sort the relationship coefficients to determine the meteorological factors that meet the influencing conditions, where the influencing conditions include: a relationship coefficient greater than a preset relationship coefficient.

[0025] Step 203: taking the meteorological factors that meet the influencing conditions as target factors influencing photovoltaic power generation.

[0026] The following is a unified description of steps 201 to 203: In one embodiment, the meteorological factors of historical days with high correlation in the historical data and the photovoltaic power generation under the current meteorological factors are screened out, and the correlation between the two can be determined first. Specifically, the correlation between the two can be calculated by a convergent cross-mapping algorithm, a Pearson correlation coefficient algorithm, a Spearman correlation coefficient algorithm, a Kendall correlation coefficient algorithm, etc. This embodiment only uses the convergent cross-mapping algorithm as an example to illustrate that the relationship coefficient between each meteorological factor and the photovoltaic power generation is calculated by the convergent cross-mapping algorithm. It should be noted that the larger the relationship coefficient calculated by the convergent cross-mapping algorithm, the greater the correlation between the meteorological factor and the photovoltaic power generation, and the closer it is to the actual photovoltaic power generation data of the day to be predicted.

[0027] Specifically, the meteorological factors of historical days and photovoltaic power generation can be used to generate sequence values ​​of two common dimensions, set upper and lower limits of the sequence values, determine multiple shadow historical days close to the historical days within this limit, and calculate the shadow sequence values ​​of the shadow historical days. Then, the distance of meteorological factors from the historical day to the shadow historical day, the distance of meteorological factors between shadow historical days, and the distance of photovoltaic power generation between shadow historical days can be calculated based on the sequence value and the shadow sequence value, and then the relationship coefficient between meteorological factors and photovoltaic power generation can be determined. The following calculation formula can be used to perform repeated calculations of a preset length, and the relationship coefficient between meteorological factors and photovoltaic power generation can be determined after convergence. , as shown below:

[0028] =

[0029]

[0030]

[0031]

[0032] In the formula, is the preset length; For the Shadow History Day; For the The photovoltaic power generation sequence of the shadow history day; For the The vector transposed PV power generation sequence of the shadow history days; For the The sequence of meteorological factors for each shadow historical day; For the The vector transposed meteorological factor sequence of the shadow history days; For the The weight coefficient of each shadow history day; ] is the first Time series of photovoltaic power generation for shadow historical days For the Time series of meteorological factors for each shadow historical day; is the sequence of meteorological factors of historical days; for arrive distance; For the aforementioned arrive Function value of distance; For the aforementioned arrive The function value of the distance.

[0033] The distance here can be calculated by Euclidean distance, and there is no restriction here. ]and Corresponding to a sequence of preset length, ]and The time length is less than or equal to the preset length.

[0034] From the above, we can see that as the preset length increases, Gradually converge to , and finally determine a relationship coefficient greater than 0.

[0035] Through the calculation of the above formula, multiple relationship coefficients about the shadow historical days can be obtained. In order to further narrow the selection range and improve the prediction accuracy, the relationship coefficients can be sorted, and the meteorological factors that meet the influencing conditions can be determined as the target factors affecting photovoltaic power generation for subsequent prediction. Here, the influencing conditions may include: the relationship coefficient greater than the preset relationship coefficient.

[0036] Step 102: Using the target factor as a selection index, a set of historical similar days of the day to be predicted is selected from historical data.

[0037] In one embodiment, the factor that has the greatest impact on photovoltaic power generation is the weather, which can be understood as whether there is sun. When there is sun, the impact on photovoltaic power generation is small and more power can be produced, otherwise less power can be produced. Of course, if only one meteorological factor is used as an indicator, that is, the corresponding historical day is selected, it is not advisable. The selected historical data is not accurate enough to guarantee the accuracy of subsequent predictions. Therefore, the target factor after the relationship coefficient screening can be selected to select the historical day of the day to be predicted, and multiple historical days with similarity higher than the preset value can be selected to form a historical similar day set to provide more accurate prediction data for subsequent predictions.

[0038] As for how to use the target factor as a selection indicator and select a set of historical similar days to be predicted from historical data, it can be done through Figure 3 The embodiment flow chart shown is implemented. Figure 3 The flowchart of another method for optimizing photovoltaic power generation prediction provided by an embodiment of the present invention is shown. The process may include the following steps: Step 301: Obtain weather information of a day to be predicted, determine meteorological factors from the weather information, and then determine target factors corresponding to the meteorological factors of the day to be predicted.

[0039] Step 302: Filter out multiple historical days whose meteorological factors are consistent with corresponding target factors from the historical data.

[0040] Step 303: Taking meteorological factors as variables, respectively calculate the values ​​of the to-be-predicted day series and the values ​​of the historical day series.

[0041] Step 304: Determine the comprehensive similarity between the to-be-predicted day sequence and the historical day sequence, and then determine the historical similar days of the to-be-predicted day.

[0042] The following is a unified description of steps 301 to 304: In one embodiment, the target factor is used as a selection index, and the target factor corresponding to the day to be predicted can be determined in the historical data. Therefore, it is necessary to first know the meteorological factors of the day to be predicted and then determine the corresponding target factors. Here, the meteorological factors of the day to be predicted can be obtained by obtaining the weather information of the day to be predicted. The meteorological factors of the predicted day can be obtained through weather forecasts, meteorological departments, etc.

[0043] Furthermore, according to the target factor corresponding to the meteorological factor of the predicted day, multiple historical days of the target factor are screened out in the historical data. However, not all of the screened historical days may be used as prediction data for prediction. On the one hand, the relationship between the meteorological factors of the selected historical days and the photovoltaic power generation is not close and is not desirable. This has been resolved in the above steps 201 to 203 and can be eliminated. On the other hand, the similarity between the target factor of the selected historical day and the meteorological factor of the day to be predicted will also affect the accuracy of the photovoltaic power generation prediction. It can be seen that the historical days that have reached a certain degree of similarity can be used as historical similar days to the day to be predicted.

[0044] As for how to determine the comprehensive similarity between the to-be-predicted day sequence and the historical day sequence, and then determine the historical similar day of the to-be-predicted day, it can be done through Figure 4 The embodiment flow chart shown is implemented. Figure 4 The flowchart of another embodiment of the optimization method for photovoltaic power generation prediction provided by the embodiment of the present invention is shown. The process may include the following steps: Step 401: Calculate the distance from any historical day sequence to the day sequence to be predicted to determine the distance similarity, and output the historical day sequence whose distance similarity is greater than a preset distance similarity.

[0045] Step 402: Input the historical day sequence and the day sequence to be predicted that are greater than the preset distance similarity into two sub-networks sharing weights in the twin network to determine the shape similarity, and establish a loss function to select the historical day sequence whose shape similarity meets the preset similarity.

[0046] Step 403: Calculate the weighted sum of the distance proximity and the shape similarity, and determine the weighted sum as the comprehensive similarity.

[0047] Step 404: Determine multiple historical days that meet the comprehensive similarity, and generate a set of historical similar days for the day to be predicted.

[0048] The following is a unified description of steps 401 to 404: In one embodiment, the distance between two points represented by data is usually determined by a two-dimensional algorithm of a single distance, such as Euclidean distance, Manhattan distance, etc. However, such distance calculation has defects such as failure to take into account morphological similarity, and limited shape similarity determination methods are unable to capture the multi-level similarity of sequences. Therefore, it is more accurate to determine historical similar days by combining two-dimensional distance with shape similarity.

[0049] Specifically, the distance between any historical day sequence and the day sequence to be predicted is calculated to determine the distance similarity, and the historical day sequence whose distance similarity is greater than the preset distance similarity is outputted. The Euclidean distance of the historical day sequence greater than the preset distance similarity is determined. Here, the calculation is performed using a two-dimensional distance algorithm.

[0050] Then, the calculation is performed in the twin network that captures the shape similarity. Specifically, the historical day sequence selected by the Euclidean distance is input into the two sub-networks in the twin network that share weights to determine the shape similarity, and a loss function is established to find the difference between the day sequence to be predicted and the historical day sequence to assist the twin network in selecting the historical day sequence whose shape similarity meets the preset similarity. It can be understood that the shared weights of the twin network here provide the same premise data weights to ensure the accuracy of the subsequent similarity.

[0051] Furthermore, the weighted sum of distance similarity and shape similarity is calculated as the comprehensive similarity, thereby evaluating the similarity of features at all levels of the sequence, improving the rationality of similar day selection, and laying a solid foundation for the subsequent construction of a high-precision photovoltaic power generation prediction model. The weighted sum here can be calculated by entropy weight method, AHP hierarchical analysis method, etc., and is not limited here.

[0052] Step 103: input the historical data of the historical similar day set into the preset photovoltaic power generation prediction model to perform photovoltaic power generation prediction on the day to be predicted, wherein the preset photovoltaic power generation prediction model includes: setting the CNN-LSTM model and the historical data of the historical similar day set after optimal screening through the snake optimization algorithm.

[0053] In one embodiment, the photovoltaic power generation prediction of the day to be predicted is performed according to the historical similar day set determined in step 102 above. The photovoltaic output can be predicted by establishing a photovoltaic power generation prediction model. Specifically, the photovoltaic power generation prediction model may be a single prediction model, namely a long short-term memory network (Long Short-Term Memory, LSTM) model, an optimized convolutional neural network-Long Short-Term Memory network (Convolutional Neural Network- Long Short-Term Memory, CNN-LSTM) model. Taking the LSTM model as an example, the model can effectively process sequence data and capture time information, but it cannot well output the local features and spatial information of the sequence. In this regard, the CNN-LSTM model can realize the complementary advantages of the CNN and LSTM models, in which the pooling layer of the model will further reduce the overfitting risk of the model and ensure the prediction accuracy. It has the advantages of comprehensive sequence feature extraction, fast calculation speed, and high accuracy. However, the key parameters of the CNN-LSTM model are too dependent on human subjective judgment, which requires a lot of manual parameter adjustment time, resulting in a slow convergence speed of the model, which seriously affects the prediction efficiency of the model.

[0054] Therefore, the advantages of the CNN-LSTM model in photovoltaic power generation prediction are absorbed and optimized to improve the data practicality of the model and thus improve the accuracy of the model prediction. Furthermore, in this embodiment, the Snake Optimization (SO) algorithm can be combined with the CNN-LSTM model to perform photovoltaic power generation prediction.

[0055] It should be noted that the snake optimization algorithm is combined with the CNN-LSTM model to form a photovoltaic power generation prediction model (SO-CNN-LSTM model). The snake optimization algorithm is used to imitate the special mating behavior of snakes and continuously iterate to select the prediction results with the largest fitness for photovoltaic power generation prediction. On the one hand, more optimized model parameters can be found to improve the prediction performance of the model. On the other hand, the historical data input to the model can be processed well, a large amount of invalid data can be removed, and the problem of long model training time, poor convergence and reduced prediction accuracy caused by the interference of invalid data can be avoided.

[0056] As for how to set the photovoltaic power generation prediction model after optimizing and screening the CNN-LSTM model and the historical data of the historical similar day set through the snake optimization algorithm, it can be seen that Figure 5 The embodiment flow chart shown is implemented. Figure 5 The flowchart of another embodiment of the photovoltaic power generation prediction optimization method provided by the embodiment of the present invention is shown. The process may include the following steps: Step 501: Determine the operating parameters of the photovoltaic power generation prediction model according to the CNN-LSTM model, where the operating parameters include: learning rate, hidden layer nodes, and regularization coefficient.

[0057] Step 502: Optimize and filter the operating parameters using the snake optimization algorithm to determine the target parameters, and optimize and filter the historical data of the historical similar day set to determine the target historical data.

[0058] Step 503: Set a photovoltaic power generation prediction model based on target parameters and target historical data.

[0059] The following is a unified description of steps 501 to 503: In one embodiment, the photovoltaic power generation prediction model is set as the SO-CNN-LSTM model. Before running, the operating parameters of the model and the input historical data are determined to prepare for the preset operation. The operating parameters here may include, but are not limited to: learning rate, hidden layer nodes and regularization coefficients. Here, the snake optimization algorithm will optimize the operating parameters and historical data to determine the target parameters and target historical data. After that, the target parameters are run to perform the prediction of the target historical data.

[0060] The specific SO-CNN-LSTM model optimization may include: determining the amount of historical daily data in the predicted data, carrying the weights of the model connecting each layer; then calculating the fitness of each data, using the fitness as an evaluation indicator to select data with high fitness for crossover and mutation operations to generate new data, and the previous data and the new data constitute a first data set; through crossover and mutation operations, determining weight parameters for data with high fitness in the data set, and optimizing the weight parameters to generate a second set of new data, which is merged with the first data set into a second data set, and when the preset number of iterations is reached or the preset fitness is reached, the prediction result is output.

[0061] The prediction data here may include but are not limited to: operating parameters and historical data of photovoltaic power generation.

[0062] In addition, in order to further ensure the accuracy of photovoltaic power generation prediction model in photovoltaic output prediction, the photovoltaic power generation prediction model can be set as LSTM model and CNN-LSTM model respectively. Then the accuracy of the prediction results of the three models is compared to determine the optimal photovoltaic output prediction model for prediction.

[0063] Specifically, the prediction results of the three models can be evaluated to determine the optimal photovoltaic output prediction model, which can be determined by respectively calculating the mean absolute error, root mean square error and goodness of fit value of the prediction results.

[0064] Further, the evaluation criteria for the above indicators can be set, which may include: the sum of the mean absolute error and the root mean square error is less than the preset error, and / or the goodness of fit value is greater than the preset goodness value. When both conditions need to be met at the same time, the proportion of the conditions that meet the conditions can be set to determine the compliance rate of the prediction results and then determine the optimal photovoltaic output prediction model. For example, when both conditions need to be met at the same time, the first evaluation criterion is set to meet: the sum of the mean absolute error and the root mean square error is less than the preset error and the compliance rate is 0.4, the second evaluation criterion is met: the compliance rate of the goodness of fit value is greater than the preset goodness value is 0.6, and the total compliance rate is 1. Assuming that the LSTM model meets the first evaluation criterion, the compliance rate is 0.4, the CNN-LSTM model meets the second evaluation criterion, the compliance rate is 0.6, and the SO-CNN-LSTM model meets both the first evaluation criterion and the second evaluation criterion, the compliance rate is 1. Of course, other evaluation criteria can be added to determine the compliance rate to determine the optimal photovoltaic output prediction model, which is not limited here.

[0065] The embodiment of the present invention provides an optimization method and system for photovoltaic power generation prediction, which increases the correlation between historical data and prediction day data by acquiring historical data of photovoltaic power generation and determining target factors affecting photovoltaic power generation based on the historical data; takes the target factors as selection indicators, selects a set of historical similar days of the day to be predicted from the historical data, breaks through the inherent limitations of the algorithm itself, and reduces the difference in the degree of similarity between the historical data of the historical day and the day to be predicted; inputs the historical data of the set of historical similar days into a preset photovoltaic power generation prediction model to perform photovoltaic power generation prediction on the day to be predicted; wherein, the preset photovoltaic power generation prediction model includes: setting after optimal screening of the CNN-LSTM model and the historical data of the set of historical similar days by a snake optimization algorithm, which effectively solves the disadvantage that a large amount of invalid information exists in the historical data samples, resulting in poor practicality, and improves the accuracy of photovoltaic power generation power prediction.

[0066] See also Figure 6 , is a schematic diagram of the architecture of an optimization system for photovoltaic power generation prediction provided by an embodiment of the present invention. Figure 6 As shown, the system includes: An identification module, used to obtain historical data of photovoltaic power generation and determine target factors affecting photovoltaic power generation based on the historical data; A selection module is used to select a set of historical similar days of the day to be predicted from historical data by taking the target factor as a selection index; A prediction module, used for inputting the historical data of the historical similar day set into a preset photovoltaic power generation prediction model to perform photovoltaic power generation prediction on a day to be predicted; Among them, the preset of the photovoltaic power generation prediction model includes: setting after optimizing and screening the CNN-LSTM model and the historical data of the historical similar day set through the snake optimization algorithm.

[0067] In a possible embodiment, the historical data includes: meteorological factors of historical days and photovoltaic power generation under current meteorological factors; the identification module includes (not shown in the figure): A coefficient calculation unit, used to calculate the relationship coefficient between the meteorological factor and the photovoltaic power generation under the corresponding meteorological factor by a convergent cross-mapping algorithm, wherein the magnitude of the relationship coefficient is proportional to the correlation between the corresponding meteorological factor and the photovoltaic power generation; A meteorological factor unit, used to sort the relationship coefficients to determine meteorological factors that meet an influencing condition, wherein the influencing condition includes: the relationship coefficient being less than a preset relationship coefficient; The target factor unit is used to take the meteorological factors that meet the influencing conditions as target factors that affect photovoltaic power generation.

[0068] In a possible embodiment, the selection module includes (not shown in the figure): A corresponding factor unit, used for obtaining weather information of a day to be predicted, determining a meteorological factor from the weather information, and then determining a target factor corresponding to the meteorological factor of the day to be predicted; A screening unit, used for screening out a plurality of historical days whose meteorological factors are consistent with the corresponding target factors in the historical data; A sequence value calculation unit is used to calculate the values ​​of the to-be-predicted day sequence and the values ​​of the historical day sequence respectively with meteorological factors as variables; The similar day determination unit is used to determine the comprehensive similarity between the to-be-predicted day sequence and the historical day sequence, and then determine the historical similar day of the to-be-predicted day.

[0069] In a possible embodiment, the similar day determination unit includes (not shown in the figure): A distance similarity determination subunit is used to calculate the distance from any historical day sequence to the day sequence to be predicted to determine the distance similarity, and output the historical day sequence whose distance similarity is greater than the preset distance similarity; A shape similarity determination subunit is used to input the historical day sequence with a similarity greater than a preset distance and the day sequence to be predicted into two weight-sharing subnetworks in the twin network to determine the shape similarity, and establish a loss function to select the historical day sequence whose shape similarity meets the preset similarity; A similarity determination subunit is used to calculate a weighted sum of the distance similarity and the shape similarity, and determine the weighted sum as a comprehensive similarity; The similar day set subunit is used to determine a plurality of historical days that meet the comprehensive similarity and generate a historical similar day set of the day to be predicted.

[0070] In a possible embodiment, the prediction module includes (not shown in the figure): A parameter unit, used to determine the operating parameters of the photovoltaic power generation prediction model according to the CNN-LSTM combined model, wherein the operating parameters include: a learning rate, a hidden layer node, and a regularization coefficient; A target data unit is used to determine the target parameters after optimizing and screening the operating parameters through a snake optimization algorithm, and to determine the target historical data by optimizing and screening the historical data of the historical similar day set; A model setting unit sets a photovoltaic power generation prediction model based on the target parameters and the target historical data.

[0071] In a possible embodiment, the prediction module further includes (not shown in the figure): Other setting units are used to set the photovoltaic power generation prediction model to an LSTM model and a CNN-LSTM model respectively.

[0072] In a possible embodiment, the system further includes: The optimal model module is used to evaluate the preset photovoltaic power generation prediction model and then determine the optimal photovoltaic output prediction model.

[0073] In a possible embodiment, the optimal model module includes (not shown in the figure): The prediction result unit is used to determine the prediction results of the snake optimization algorithm and the CNN-LSTM combination model, the LSTM model, and the CNN-LSTM model; The indicator calculation unit is used to calculate the mean absolute error, root mean square error and goodness of fit value of the prediction results of each model respectively; An indicator evaluation unit, used to evaluate the prediction result by taking the sum of the mean absolute error and the root mean square error as less than a preset error and the goodness of fit value as greater than a preset goodness of fit value as evaluation criteria; The optimal model output unit is used to determine the compliance rate of the prediction result evaluation standard, and output the photovoltaic power generation prediction model with the largest prediction result compliance rate as the optimal photovoltaic output prediction model.

[0074] It is known from common technical knowledge that the present invention can be implemented by other embodiments that do not deviate from its spirit or essential features. Therefore, the above disclosed embodiments are only illustrative in all respects and are not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are included in the present invention.

[0075] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0076] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0077] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A photovoltaic power generation prediction optimization method, characterized in that: include: Acquire historical data of photovoltaic power generation, and determine target factors affecting photovoltaic power generation based on the historical data; Taking the target factor as the selection index, a set of historical similar days of the day to be predicted is selected from the historical data; Inputting the historical data of the historical similar day set into a preset photovoltaic power generation prediction model to perform photovoltaic power generation prediction on the day to be predicted; Among them, the preset of the photovoltaic power generation prediction model includes: setting after optimizing and screening the CNN-LSTM model and the historical data of the historical similar day set through the snake optimization algorithm.

2. The optimization method according to claim 1, characterized in that: The historical data include: meteorological factors of historical days and photovoltaic power generation under current meteorological factors; The determining of target factors affecting photovoltaic power generation based on the historical data includes: Calculating the relationship coefficient between the meteorological factor and the photovoltaic power generation under the corresponding meteorological factor, the magnitude of the relationship coefficient is proportional to the correlation between the corresponding meteorological factor and the photovoltaic power generation; Sorting the relationship coefficients to determine meteorological factors that meet an influencing condition, wherein the influencing condition includes: the relationship coefficient being greater than a preset relationship coefficient; The meteorological factors that meet the influencing conditions are used as target factors affecting photovoltaic power generation.

3. The optimization method according to claim 1, characterized in that: The target factor is used as a selection index to select historical similar days to the day to be predicted from historical data, including: Acquire weather information of a day to be predicted, determine meteorological factors from the weather information, and then determine target factors corresponding to the meteorological factors of the day to be predicted; Filter out multiple historical days whose meteorological factors are consistent with the corresponding target factors from the historical data; Taking meteorological factors as variables, calculate the values ​​of the day series to be predicted and the values ​​of the historical day series respectively; Determine the comprehensive similarity between the to-be-predicted day sequence and the historical day sequence, and then determine the historical similar days of the to-be-predicted day.

4. The optimization method according to claim 3, characterized in that: The step of determining the comprehensive similarity between the sequence of days to be predicted and the sequence of historical days, and then determining the historical similar days of the days to be predicted, includes: Calculate the distance between any historical day sequence and the day sequence to be predicted to determine the distance similarity, and output the historical day sequence whose distance similarity is greater than the preset distance similarity; The historical day sequence with a similarity greater than a preset distance and the day sequence to be predicted are respectively input into two sub-networks sharing weights in the twin network to determine the shape similarity, and a loss function is established to screen out the historical day sequence whose shape similarity meets the preset similarity; Calculating a weighted sum of the distance proximity and the shape similarity, and determining the weighted sum as a comprehensive similarity; A plurality of historical days satisfying the comprehensive similarity are determined, and a set of historical similar days of the day to be predicted is generated.

5. The optimization method according to claim 1, characterized in that: The photovoltaic power generation prediction model is set after optimizing and screening the CNN-LSTM model and the historical data of the historical similar day set by the snake optimization algorithm, including: Determining operating parameters of a photovoltaic power generation prediction model according to the CNN-LSTM combined model, wherein the operating parameters include: a learning rate, a hidden layer node, and a regularization coefficient; The operating parameters are optimized and screened by a snake optimization algorithm to determine the target parameters, and the historical data of the historical similar day set are optimized and screened to determine the target historical data; A photovoltaic power generation prediction model is set based on the target parameters and the target historical data.

6. The optimization method according to claim 1, characterized in that: include: The preset of the photovoltaic power generation prediction model also includes: setting the photovoltaic power generation prediction model to an LSTM model and a CNN-LSTM model respectively.

7. The optimization method according to any one of claims 1 or 6, characterized in that: The optimization method further comprises: Evaluate the preset photovoltaic power generation prediction model and then determine the optimal photovoltaic output prediction model.

8. The optimization method according to claim 7, characterized in that: The evaluating the preset photovoltaic power generation prediction model, and then determining the optimal photovoltaic output prediction model, includes: Determine the prediction results of the snake optimization algorithm and CNN-LSTM combined model, LSTM model, and CNN-LSTM model; The mean absolute error, root mean square error and goodness of fit value of the prediction results of each model were calculated respectively; The prediction result is evaluated by taking the sum of the mean absolute error and the root mean square error as less than the preset error and the goodness of fit value as greater than the preset goodness of fit value as evaluation criteria; The compliance rate of the prediction result evaluation standard is determined, and the photovoltaic power generation prediction model with the largest prediction result compliance rate is output as the optimal photovoltaic output prediction model.

9. A photovoltaic power generation prediction optimization system, characterized in that: include: An identification module, used to obtain historical data of photovoltaic power generation and determine target factors affecting photovoltaic power generation based on the historical data; A selection module is used to select a set of historical similar days of the day to be predicted from historical data by taking the target factor as a selection index; A prediction module, used for inputting the historical data of the historical similar day set into a preset photovoltaic power generation prediction model to perform photovoltaic power generation prediction on a day to be predicted; Among them, the preset of the photovoltaic power generation prediction model includes: setting after optimizing and screening the CNN-LSTM model and the historical data of the historical similar day set through the snake optimization algorithm.

10. The optimization system according to claim 9, characterized in that: The historical data includes: meteorological factors of historical days and photovoltaic power generation under current meteorological factors; the identification module includes: A coefficient calculation unit, used to calculate the relationship coefficient between the meteorological factor and the photovoltaic power generation under the corresponding meteorological factor by a convergent cross-mapping algorithm, wherein the magnitude of the relationship coefficient is proportional to the correlation between the corresponding meteorological factor and the photovoltaic power generation; A meteorological factor unit, used to sort the relationship coefficients to determine meteorological factors that meet an influencing condition, wherein the influencing condition includes: the relationship coefficient being less than a preset relationship coefficient; The target factor unit is used to take the meteorological factors that meet the influencing conditions as target factors that affect photovoltaic power generation.

Citation Information

Cited By

  • Power station water flow prediction method, device and equipment and storage medium

    CN119476662A