Day-ahead photovoltaic power prediction method based on parallel structure and secondary correction
By introducing the parallel structure of historical power data and weather data in photovoltaic power prediction and performing secondary correction, the problem of low photovoltaic power prediction accuracy under long prediction periods is solved, and higher prediction accuracy and model robustness are achieved .
Patent Information
- Application Number
- CN202411540941.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-21
AI Technical Summary
The existing photovoltaic power prediction methods have low accuracy under long prediction periods, and are highly dependent on meteorological data, the model training process is complex, and the generalization ability is insufficient.
A parallel structure and secondary correction photovoltaic power prediction method is proposed. By performing correlation analysis on historical power data and weather data, a photovoltaic power parallel prediction model is constructed, and a few days ago photovoltaic power prediction correction model is constructed, and two Revise this time to improve prediction accuracy.
The prediction accuracy of photovoltaic power generation power under long prediction periods is significantly improved, the robustness and applicability of the model are enhanced, and it can better adapt to photovoltaic power prediction tasks in different environments and regions.
Smart Images

Figure CN119496117A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of day-ahead photovoltaic power prediction, and more specifically, to a day-ahead photovoltaic power prediction method with a parallel structure and secondary correction. Background Art
[0002] With the growth of global energy demand and the enhancement of environmental protection awareness, photovoltaic power generation has been widely used as a clean and renewable energy form. Photovoltaic power generation systems use solar energy to convert light energy into electrical energy and have become an important part of the global energy transformation. However, the output power of photovoltaic power generation is affected by many factors such as weather conditions, geographical location and time, and has obvious volatility and uncertainty. In order to ensure the stable operation of the power grid, accurately predicting the power output of photovoltaic power generation has become one of the key technologies. At present, photovoltaic power prediction mainly relies on two types of technologies: physical model-based methods and data-driven methods. Physical model-based methods usually predict by establishing a mathematical model of the photovoltaic system and combining it with meteorological data (such as solar irradiance, temperature, etc.). This type of method can reflect the physical characteristics of the photovoltaic system to a certain extent, but it is highly dependent on the accuracy of the model and the input data. Once there is a deviation in the meteorological data, the accuracy of the prediction result will be greatly reduced. On the other hand, data-driven methods (such as machine learning, neural networks, etc.) are trained through historical data to capture the complex laws of photovoltaic power output. This type of method can better handle nonlinear relationships and has high prediction accuracy, but it has high requirements for a large amount of high-quality historical data, and the model training process is relatively complicated.
[0003] At present, the research on photovoltaic power prediction has made significant progress in the application of statistical models, machine learning and deep learning technologies, but there are still problems such as insufficient fusion of multidimensional data, overfitting and insufficient generalization ability of models, and less application of transfer learning. In view of these shortcomings, the proposed innovations have significant advantages. First, dual-input feature concatenation and hierarchical feature fusion effectively integrate multidimensional data by concatenating features from different data sources in the middle layer of the network, enhancing the model's ability to express complex features. This design enables the model to better capture multiple influencing factors of photovoltaic power, such as weather and historical power data, and significantly improves the prediction accuracy. Secondly, freezing the model weights and constructing a new target model combines the idea of transfer learning. By freezing the weights of the trained model and performing secondary corrections on the new task, it not only improves the training efficiency, but also avoids the overfitting problem. This strategy allows the model to quickly adapt to photovoltaic power prediction tasks in different environments or regions, enhancing the generalization ability and applicability of the model. Therefore, these innovations effectively solve the shortcomings of existing research and have stronger stability and efficiency in complex environments. Summary of the invention
[0004] In order to solve the problem of low prediction accuracy of photovoltaic power generation under long prediction period, this paper breaks through the traditional modeling method that relies on single data drive, and innovatively proposes a photovoltaic power prediction method based on the parallel structure of historical load and weather information, combined with secondary prediction correction. This method significantly improves the prediction accuracy of photovoltaic power generation under long prediction period by deeply mining the potential useful information in historical power data and weather data, and performing secondary correction on the initial prediction value of each time resolution.
[0005] To achieve the above object, the present invention provides a method for predicting photovoltaic power with a parallel structure and secondary correction, comprising the following steps:
[0006] Step S1: performing correlation analysis on the photovoltaic historical power data and weather data, specifically: using the Pearson correlation coefficient to analyze the correlation of photovoltaic power data on different dates, using the Spearman correlation coefficient to analyze the correlation between the photovoltaic power data and weather data, and analyzing whether there are defects and mismatches between the data;
[0007] Step S2: Constructing a photovoltaic power parallel prediction model, wherein the photovoltaic power parallel prediction model input is a parallel structure of historical power data and weather data. Assume that the photovoltaic power parallel prediction model input is I P and I W , I P is the historical photovoltaic power of the previous day, I W is the current weather data, and the output of the parallel prediction model is the predicted PV power for the next day;
[0008] Step S3: construct a day-ahead photovoltaic power prediction correction model. Based on the prediction results of the photovoltaic power parallel prediction model, the predicted value is used as the input of the day-ahead photovoltaic power prediction correction model for retraining, and the change law between the prediction errors is found. A new input layer is added, and the input layer structure is the prediction value at the i-th resolution in the day-ahead prediction value.
[0009] Step S4: setting model training parameters for the photovoltaic power parallel prediction model and the day-ahead photovoltaic power prediction correction model, specifically: saving the most weighted weight, when a smaller validation set error is obtained, saving the weight, overwriting the previous weight, and stopping the operation in advance; when the performance index of the model on the validation set does not improve within a period of time, the training will be stopped in advance;
[0010] Step S5: Processing of prediction results, with evaluation indicators being MAPE and RMSE.
[0011] Furthermore, in step S1, correlation analysis is performed on the photovoltaic historical power data and weather data, and the specific steps are as follows:
[0012] (1) Pearson correlation coefficient analysis of the daily correlation of photovoltaic power data. The photovoltaic power on different dates can be compared, for example, correlation analysis can be performed by month, week, or day. The mathematical definition of the Pearson correlation coefficient is as follows:
[0013]
[0014] Among them, X i and Y i is the photovoltaic power data series of two different dates, and are the means of the above photovoltaic power data series respectively;
[0015] (2) Spearman correlation coefficient is used to analyze the correlation between PV power data and weather data. The time of PV power data and weather data is ensured to be aligned, and PV power and weather observations are made at the same time point. The calculation process of Spearman correlation coefficient is as follows:
[0016] Sort the data: Sort the data X and Y separately to obtain the ranks R(X) and R(Y) respectively;
[0017] Calculate the rank difference: For each data point, calculate the difference d between the ranks of the two variables i =R(X i )-R(Y i );
[0018] Calculate the correlation coefficient:
[0019]
[0020] Where n is the number of samples;
[0021] (3) Perform data defect and mismatch analysis; verify whether the linear and nonlinear correlations are consistent by comparing the results of the Pearson and Spearman correlation coefficients: if both are low, it may indicate a problem with the data quality; if the Pearson correlation is low and the Spearman correlation is high, it may be that the data has a nonlinear relationship and the model does not match; check whether missing data or outliers affect the correlation analysis; if the correlation coefficient changes significantly after filling or eliminating missing data, it indicates that data defects are the influencing factor.
[0022] Furthermore, in step S2, the weather data includes solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, and humidity.
[0023] Furthermore, the photovoltaic power parallel prediction model includes an input layer, a first hidden layer, a Dropout layer, a second hidden layer, and an output layer, and the specific structure is:
[0024] (1) The input layer consists of 55 nodes of the previous day's historical power data and current weather data; 55 nodes refer to the daytime time from 6:15 to 7:45, with a total of 55 values;
[0025] (2) The first hidden layer has 1024 nodes, the activation function is “SELU”, and L2 regularization is applied;
[0026] The definition of SELU is divided into two parts:
[0027]
[0028] Among them, λ and α are two fixed parameters, whose values are determined by experiments: λ≈1.0507 and α≈1.67326; λ is a scaling factor used to ensure that the output is within the expected mean and variance range; α is the coefficient that controls the negative input part; the negative input part is a deformation of the exponential function, which allows the output to be less than zero in the negative interval;
[0029] L2 regularization adds a regularization term to the loss function, so that the new loss function becomes:
[0030]
[0031] Where L(θ) is the original loss function (such as mean square error, cross entropy, etc.). λ is a hyperparameter of regularization strength, which controls the weight of the regularization term. i is the i-th parameter in the parameter vector θ;
[0032] is the L2 regularization term, which is half of the sum of squares of all parameters, multiplied by the regularization strength λ;
[0033] L2 regularization term The role of is to force the model parameter θ to be as small as possible by penalizing the size of the parameter;
[0034] (3) The dropout layer has a dropout rate of 0.5 to improve the generalization ability of the model.
[0035] (4) The second hidden layer has 256 nodes, the activation function is “SELU”, and L2 regularization is applied.
[0036] (5) The two second hidden layers are merged and connected to the final output layer. The output layer node is 55 and the activation function is "Sigmoid", which represents the photovoltaic power prediction value from 6:15 to 7:45 during the daytime of the next day.
[0037] Furthermore, the day-ahead photovoltaic power prediction correction model includes an input layer, a first hidden layer, a Dropout layer, a second hidden layer and an output layer;
[0038] (1) The input layer structure is the forecast value at the i-th resolution in the day-ahead forecast value; the PV power parallel forecast model and the input layer are merged;
[0039] (2) The first hidden layer has 256 nodes, the activation function is “SELU”, and L2 regularization is applied;
[0040] (3) The dropout layer has a dropout rate of 0.5;
[0041] (4) The second hidden layer has 256 nodes, the activation function is “SELU”, and L2 regularization is applied;
[0042] (5) The output layer has 1 node and the activation function is “Sigmoid”, which represents the corrected photovoltaic power prediction value at the i-th resolution.
[0043] Furthermore, in step S4, the optimizer used is the "Adam" optimizer, and the loss function is "mse".
[0044] Furthermore, in step S4, the loss function "mse" is defined as follows:
[0045]
[0046] Where: n is the number of samples. i is the true value of the i-th sample. is the predicted value of the ith sample.
[0047] Furthermore, in step S4, early stopping refers to continuously monitoring the performance index of the model on the validation set during the training process. Once the index does not improve within a period of time, the training will be stopped early. The specific steps are as follows:
[0048] (1) Split the dataset: divide the available dataset into a training set and a validation set;
[0049] (2) Monitor the performance on the validation set: After each iteration, calculate the performance of the model on the validation set;
[0050] (3) Determine whether to stop: If the verification performance does not improve in several consecutive iterations, or begins to deteriorate, it is considered that the model may have begun to overfit and training should be stopped early.
[0051] Furthermore, the MAPE is an indicator used to measure the relative error of the predicted value relative to the actual value, and is defined as follows:
[0052]
[0053] Where: n is the number of samples.i is the actual value of the i-th sample. is the predicted value of the ith sample.
[0054] Furthermore, the RMSE is an indicator for measuring the prediction error, which is defined as follows:
[0055]
[0056] Where: n is the number of samples. i is the actual value of the i-th sample. is the predicted value of the ith sample.
[0057] The beneficial effects of the present invention are as follows:
[0058] 1. This invention introduces the parallel structure of historical power data and weather data, and performs secondary correction on the initial prediction value of each time resolution, effectively utilizing the correlation between multi-source data, and significantly improving the accuracy of photovoltaic power generation prediction under long prediction period. Compared with the traditional prediction model that relies on a single data drive, this method can more accurately capture complex nonlinear relationships, thereby reducing prediction errors.
[0059] 2. The present invention adopts a parallel structure combined with a secondary correction strategy, which makes the model more robust in the face of uncertainty in a long forecast period. By deeply mining and integrating the effective information in historical power data and weather data, the model can better adapt to different climate conditions and load changes, ensuring that the forecast results are still highly reliable and stable in a variety of environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below.
[0061] Figure 1 A flow chart of a method for predicting day-ahead photovoltaic power with a parallel structure and secondary correction according to an embodiment of the present invention;
[0062] Figure 2 It is a complete structural diagram of the photovoltaic power parallel prediction model and the day-ahead photovoltaic power prediction correction model according to the embodiment of the present invention. DETAILED DESCRIPTION
[0063] The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment 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.
[0064] In the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they cannot be understood as limitations on the present invention.
[0065] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0066] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting photovoltaic power of the day before with a parallel structure and a secondary correction, and a method for predicting photovoltaic power of the day before with a parallel structure and a secondary correction, comprising the following steps:
[0067] Step S1: perform correlation analysis on the photovoltaic historical power data and weather data, specifically: use the Pearson correlation coefficient to analyze the correlation of photovoltaic power data on different dates, use the Spearman correlation coefficient to analyze the correlation between the photovoltaic power data and weather data, and analyze whether there are defects and mismatches between the data.
[0068] Study the correlation between historical photovoltaic power data and the correlation between historical photovoltaic power data and weather data. The specific steps are as follows:
[0069] (1) Pearson correlation coefficient analysis of the daily correlation of photovoltaic power data. The photovoltaic power on different dates can be compared, for example, correlation analysis can be performed by month, week, or day. The mathematical definition of the Pearson correlation coefficient is as follows:
[0070]
[0071] Among them, X i and Y i is the photovoltaic power data series of two different dates, and is their mean.
[0072] (2) Spearman correlation coefficient is used to analyze the correlation between PV power data and weather data. Ensure that the time of PV power data and weather data is aligned, and ensure that there are PV power and weather observations at the same time point. The calculation process of Spearman correlation coefficient is as follows:
[0073] Sort the data: Sort the data X and Y separately to get their ranks (i.e. rankings) R(X) and R(Y).
[0074] Calculate the rank difference: For each data point, calculate the difference d between the ranks of the two variables i =R(X i )-R(Y i )
[0075] Calculate the correlation coefficient:
[0076]
[0077] Where n is the number of samples.
[0078] (3) Perform data defect and mismatch analysis. Verify whether the linear and nonlinear correlations are consistent by comparing the results of the Pearson and Spearman correlation coefficients. If both are low, it may indicate a problem with the data quality. If the Pearson correlation is low and the Spearman correlation is high, it may be that the data has a nonlinear relationship and the model does not match. Check whether missing data or outliers affect the correlation analysis. If the correlation coefficient changes significantly after filling or eliminating missing data, it means that data defects are the influencing factor.
[0079] Step S2: Construct a photovoltaic power parallel prediction model. The photovoltaic power parallel prediction model input is a parallel structure of historical power data and weather data. Suppose the parallel prediction model input is I P and I W , I P is the historical photovoltaic power of the previous day, I W is the current weather data (solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, and humidity), and the output of the parallel prediction model is the predicted PV power for the next day.
[0080] The photovoltaic power parallel prediction model is a parallel structure of historical power data and weather data, which deeply mines the potential effective information of the two types of data to improve the accuracy of photovoltaic power prediction on the day before. Figure 2 As shown, the specific structure is:
[0081] (1) The input layer consists of 55 nodes of the previous day's historical power data and current weather data; 55 nodes refer to the daytime time from 6:15 to 7:45, with a total of 55 values;
[0082] (2) The first hidden layer has 1024 nodes, the activation function is “SELU”, and L2 regularization is applied;
[0083] The definition of SELU is divided into two parts:
[0084]
[0085] Among them, λ and α are two fixed parameters, whose values are determined by experiments: λ≈1.0507 and α≈1.67326; λ is a scaling factor used to ensure that the output is within the expected mean and variance range; α is the coefficient that controls the negative input part; the negative input part is a deformation of the exponential function, which allows the output to be less than zero in the negative interval;
[0086] L2 regularization adds a regularization term to the loss function, so that the new loss function becomes:
[0087]
[0088] Where L(θ) is the original loss function (such as mean square error, cross entropy, etc.). λ is a hyperparameter of the regularization strength, which controls the weight of the regularization term. i is the i-th parameter in the parameter vector θ;
[0089] is the L2 regularization term, which is half of the sum of squares of all parameters, multiplied by the regularization strength λ;
[0090] L2 regularization term The role of is to force the model parameter θ to be as small as possible by penalizing the size of the parameter;
[0091] (3) The dropout layer has a dropout rate of 0.5 to improve the generalization ability of the model.
[0092] (4) The second hidden layer has 256 nodes, the activation function is “SELU”, and L2 regularization is applied.
[0093] (5) The two second hidden layers are merged and connected to the final output layer. The output layer node is 55 and the activation function is "Sigmoid", which represents the photovoltaic power prediction value from 6:15 to 7:45 during the daytime of the next day.
[0094] Step S3: Construct a day-ahead photovoltaic power prediction correction model. Based on the prediction results of the photovoltaic power parallel prediction model, the predicted value is used as the input of the day-ahead photovoltaic power prediction correction model for retraining to ensure the validity of the trained results of the model structure. A new input layer is added, and the input layer structure is the predicted value at the i-th resolution in the day-ahead prediction value, so as to further improve the photovoltaic power prediction accuracy of the day-ahead structure.
[0095] The day-ahead photovoltaic power forecast correction model is a secondary forecast correction. Based on the forecast results of the photovoltaic power parallel forecast model, the forecast value is used as the input of the day-ahead photovoltaic power forecast correction model for retraining to find the change law between the forecast errors and further improve the accuracy of the day-ahead photovoltaic power load forecast. Model structure Figure 2 As shown, the specific structure is:
[0096] (1) The input layer structure is the forecast value at the i-th resolution in the day-ahead forecast value; the PV power parallel forecast model and the input layer are merged;
[0097] (2) The first hidden layer has 256 nodes, the activation function is “SELU”, and L2 regularization is applied;
[0098] (3) The dropout layer has a dropout rate of 0.5;
[0099] (4) The second hidden layer has 256 nodes, the activation function is “SELU”, and L2 regularization is applied;
[0100] (5) The output layer has 1 node and the activation function is “Sigmoid”, which represents the corrected photovoltaic power prediction value at the i-th resolution.
[0101] Step S4: Setting model training parameters for the photovoltaic power parallel prediction model and the day-ahead photovoltaic power prediction correction model, specifically: saving the most weighted, when a smaller validation set error is obtained, saving the weight, overwriting the previous weight, stopping the operation in advance, and when the performance indicators of the model on the validation set no longer improve within a period of time, the training will stop in advance.
[0102] In model training, the optimizer used is the "Adam" optimizer and the loss function is "mse".
[0103] Mean Squared Error (MSE) is one of the most commonly used loss functions in machine learning and statistics, especially in regression problems. The definition of MSE is as follows:
[0104]
[0105] Where: n is the number of samples. i is the true value of the i-th sample. is the predicted value of the ith sample.
[0106] Save the most weighted: During model training, when a smaller validation set error is obtained, save the weight and overwrite the previous weight. Instead of using the weight at the end of training, the purpose of doing this is to obtain more accurate prediction values and reduce the impact of model overfitting.
[0107] Early stopping: During the training process, the performance indicators of the model on the validation set (such as validation loss or validation accuracy) are continuously monitored. Once the indicator no longer improves over a period of time, the training will be stopped early. The specific steps are as follows:
[0108] (1) Split the dataset: divide the available dataset into a training set and a validation set;
[0109] (2) Monitor the performance on the validation set: After each iteration (or each epoch), calculate the performance of the model on the validation set (such as validation loss).
[0110] (3) Determine whether to stop: If the verification performance does not improve in several consecutive iterations, or begins to deteriorate, it is considered that the model may have begun to overfit and training should be stopped early.
[0111] There are two key parameters to set during early stopping: Patience: The patience parameter refers to the maximum number of iterations that training is allowed to continue if the validation performance no longer improves. If the validation performance does not improve further during these iterations, training will stop. For example, setting the patience parameter to 10 means that if the validation loss does not decrease within 10 epochs, training will stop. Best validation performance: During early stopping, the model parameters that performed best on the validation set during training are recorded. When training stops, it is restored to this best point to ensure that the parameters with the best model performance are used.
[0112] Step S6: Processing of prediction results, with evaluation indicators being MAPE and RMSE.
[0113] MAPE (Mean Absolute Percentage Error) and RMSE (Root Mean Square Error) are two commonly used indicators for evaluating the performance of prediction models. Their mathematical principles are as follows:
[0114] MAPE (Mean Absolute Percentage Error), MAPE is an indicator used to measure the relative error of the predicted value relative to the actual value. Its definition is as follows:
[0115]
[0116] Where: n is the number of samples. i is the actual value of the i-th sample. is the predicted value of the ith sample.
[0117] The advantage of MAPE is its unit independence, that is, MAPE values between different data sets can be directly compared because it is a measure of relative error. Its disadvantage is that when the actual value y i As it approaches zero, the percentage error becomes very large, resulting in extremely high and unstable MAPE values.
[0118] RMSE (Root Mean Square Error), RMSE is an indicator to measure the prediction error, especially suitable for reflecting the magnitude of the prediction error. Its definition is as follows:
[0119]
[0120] Where: n is the number of samples. i is the actual value of the i-th sample. is the predicted value of the i-th sample. Mathematical principle:
[0121] The advantage of RMSE is that it is more sensitive to larger errors, so it is suitable for scenarios where large errors need to be concerned. The disadvantage is that it is sensitive to outliers because squaring will amplify these errors. MAPE is more suitable for measuring relative errors and is suitable for scenarios with large differences in data size. RMSE is more suitable for measuring absolute errors and is suitable for scenarios where the absolute value of the error is of concern and the data size is relatively consistent.
[0122] Embodiment: The actual photovoltaic power in Guangdong No. 1352 area is used as an example for analysis. The data includes photovoltaic power data from June 21, 2022 to September 29, 2022, a total of 101 days of data, of which the last 10% is used as a test set, the first 80% of the first 90% of the data is used as a training set, and the last 20% of the data is used as a validation set. A correlation analysis is performed on historical power data and weather data, including the correlation between historical power data days and days, the correlation between historical power data and weather data, and the correlation analysis before weather data. It can be seen from the results that the correlation between days in photovoltaic power data is very high, and it is very reasonable to use the previous day's load as model input. The correlation between historical power data and weather data (solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, humidity) shows that the correlation between historical power data and solar radiation is the highest, up to 90%, while the correlation between other species weather data is not high, so only solar radiation data greatly increases the size of input data, reduces data redundancy, and increases the speed of model training. A more reasonable model input can be obtained by the first step of correlation analysis. The model structure 1 of the day-ahead photovoltaic power prediction model is constructed. The model structure 1 is a parallel prediction structure of historical power data and weather data. After that, the model structure 2 of the day-ahead photovoltaic power prediction model is constructed. The model structure 2 is a correction of the power prediction value at each resolution. The model training parameters are set, including the division of the data set, the preservation of the optimal weight, and early stopping. Finally, the photovoltaic power prediction value is obtained, and the results are evaluated using the MAPE and RMSE evaluation indicators. A comparative experiment was conducted. The first group did not have model structure 1 and model structure 2, the second group did not have model structure 2, and the third group had model structure 1 and model structure 2. The MAPE results were 70.51%, 68.29%, and 66.44%, respectively. The RMSE results were 58.23MW, 54.93MW, and 48.37MW, respectively. It shows that the method of the present invention has higher prediction accuracy.
[0123] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A parallel structure and secondary correction day-ahead photovoltaic power prediction method, characterized in that: The following steps are involved: Step S1: performing correlation analysis on the photovoltaic historical power data and weather data, specifically: using the Pearson correlation coefficient to analyze the correlation of photovoltaic power data on different dates, using the Spearman correlation coefficient to analyze the correlation between the photovoltaic power data and weather data, and analyzing whether there are defects and mismatches between the data; Step S2: Constructing a photovoltaic power parallel prediction model, wherein the photovoltaic power parallel prediction model input is a parallel structure of historical power data and weather data. Assume that the photovoltaic power parallel prediction model input is I P and I W , I P is the historical photovoltaic power of the previous day, I W is the current weather data, and the output of the parallel prediction model is the predicted PV power for the next day; Step S3: construct a day-ahead photovoltaic power prediction correction model. Based on the prediction results of the photovoltaic power parallel prediction model, the predicted value is used as the input of the day-ahead photovoltaic power prediction correction model for retraining, and the change law between the prediction errors is found. A new input layer is added, and the input layer structure is the prediction value at the i-th resolution in the day-ahead prediction value. Step S4: setting model training parameters for the photovoltaic power parallel prediction model and the day-ahead photovoltaic power prediction correction model, specifically: saving the most weighted weight, when a smaller validation set error is obtained, saving the weight, overwriting the previous weight, and stopping the operation in advance; when the performance index of the model on the validation set does not improve within a period of time, the training will be stopped in advance; Step S5: Processing of prediction results, with evaluation indicators being MAPE and RMSE.
2. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1 is characterized by: In step S1, correlation analysis is performed on photovoltaic historical power data and weather data. The specific steps are as follows: (1) Pearson correlation coefficient analysis of the daily correlation of photovoltaic power data. The photovoltaic power on different dates can be compared, for example, correlation analysis can be performed by month, week, or day. The mathematical definition of the Pearson correlation coefficient is as follows: Among them, X i and Y i is the photovoltaic power data series of two different dates, and are the means of the above photovoltaic power data series respectively; (2) Spearman correlation coefficient is used to analyze the correlation between PV power data and weather data. The time of PV power data and weather data is ensured to be aligned, and PV power and weather observations are made at the same time point. The calculation process of Spearman correlation coefficient is as follows: Sort the data: Sort the data X and Y separately to obtain the ranks R(X) and R(Y) respectively; Calculate the rank difference: For each data point, calculate the difference d between the ranks of the two variables i =R(X i )-R(Y i ); Calculate the correlation coefficient: Where n is the number of samples; (3) Perform data defect and mismatch analysis; verify whether the linear and nonlinear correlations are consistent by comparing the results of the Pearson and Spearman correlation coefficients: if both are low, it may indicate a problem with the data quality; if the Pearson correlation is low and the Spearman correlation is high, it may be that the data has a nonlinear relationship and the model does not match; check whether missing data or outliers affect the correlation analysis; if the correlation coefficient changes significantly after filling or eliminating missing data, it indicates that data defects are the influencing factor.
3. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1 is characterized by: In step S2, the weather data includes solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, and humidity.
4. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1 is characterized by: The photovoltaic power parallel prediction model includes an input layer, a first hidden layer, a Dropout layer, a second hidden layer, and an output layer. The specific structure is: (1) The input layer consists of 55 nodes of the previous day's historical power data and current weather data; 55 nodes refer to the daytime time from 6:15 to 7:45, with a total of 55 values; (2) The first hidden layer has 1024 nodes, the activation function is "SELU", and L2 regularization is applied; The definition of SELU is divided into two parts: Among them, λ and α are two fixed parameters, whose values are determined by experiments: λ≈1.0507 and α≈1.67326; λ is a scaling factor used to ensure that the output is within the expected mean and variance range; α is the coefficient that controls the negative input part; the negative input part is a deformation of the exponential function, which allows the output to be less than zero in the negative interval; L2 regularization adds a regularization term to the loss function, so that the new loss function becomes: Where L(θ) is the original loss function (such as mean square error, cross entropy, etc.). λ is a hyperparameter of regularization strength, which controls the weight of the regularization term. i is the i-th parameter in the parameter vector θ; is the L2 regularization term, which is half of the sum of squares of all parameters, multiplied by the regularization strength λ; L2 regularization term The role of is to force the model parameter θ to be as small as possible by penalizing the size of the parameter; (3) The dropout layer has a dropout rate of 0.5 to improve the generalization ability of the model. (4) The second hidden layer has 256 nodes, the activation function is "SELU", and L2 regularization is applied. (5) The two second hidden layers are merged and connected to the final output layer. The output layer node is 55 and the activation function is "Sigmoid", which represents the photovoltaic power prediction value from 6:15 to 7:45 during the daytime of the next day.
5. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1, characterized in that: The day-ahead photovoltaic power prediction correction model includes an input layer, a first hidden layer, a Dropout layer, a second hidden layer and an output layer; (1) The input layer structure is the forecast value at the i-th resolution in the day-ahead forecast value; the PV power parallel forecast model and the input layer are merged; (2) The first hidden layer has 256 nodes, the activation function is "SELU", and L2 regularization is applied; (3) The dropout layer has a dropout rate of 0.5; (4) The second hidden layer has 256 nodes, the activation function is "SELU", and L2 regularization is applied; (5) The output layer has 1 node and the activation function is "Sigmoid", which represents the corrected photovoltaic power prediction value at the i-th resolution.
6. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1, characterized in that: In step S4, the optimizer used is the "Adam" optimizer, and the loss function is "mse".
7. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1, characterized in that: In step S4, the loss function "mse" is defined as follows: Where: n is the number of samples. i is the true value of the i-th sample. is the predicted value of the ith sample.
8. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1, characterized in that: In step S4, early stopping means continuously monitoring the performance index of the model on the validation set during the training process. Once the index does not improve within a period of time, the training will be stopped early. The specific steps are as follows: (1) Split the dataset: divide the available dataset into a training set and a validation set; (2) Monitor the performance on the validation set: After each iteration, calculate the performance of the model on the validation set; (3) Determine whether to stop: If the verification performance does not improve in several consecutive iterations, or begins to deteriorate, it is considered that the model may have begun to overfit and training should be stopped early.
9. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1, characterized in that: The MAPE is an indicator used to measure the relative error of the predicted value relative to the actual value, and its definition is as follows: Where: n is the number of samples. i is the actual value of the i-th sample. is the predicted value of the ith sample.
10. The method for predicting photovoltaic power with parallel structure and secondary correction according to claim 1, characterized in that: The RMSE is an indicator for measuring prediction error, which is defined as follows: Where: n is the number of samples. i is the actual value of the i-th sample. is the predicted value of the ith sample.
Citation Information
Patent Citations
Day-ahead photovoltaic power prediction method, device and system based on CAE and GAN hybrid network
CN114169445A
Day-ahead photovoltaic power generation power prediction method and device
CN115549070A
Photovoltaic power generation power prediction method based on IMVO-DELM model
CN116579251A
Low-voltage distributed photovoltaic power prediction method under in-situ balance scene
CN118783396A
System and method for predicting photovoltaic power generation
KR102520255B1