A parallel structure and quadratic correction day-ahead photovoltaic power prediction method
Patent Information
- Application Number
- CN202411540941.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-10-31
AI Technical Summary
[0004]针对长预测周期下光伏发电功率预测精度不高的问题,本发明突破了传统依赖单一数据驱动的建模方式,创新性地提出了一种基于历史负荷与天气信息并行结构,并结合二次预测修正的光伏功率预测方法
1.本发明通过引入历史功率数据与天气数据的并行结构,并对每个时间分辨率的初始预测值进行二次修正,有效利用了多源数据之间的相关性,显著提高了长预测周期下光伏
Smart Images

Figure CN119496117B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of day-ahead photovoltaic power prediction, and more specifically, to a day-ahead photovoltaic power prediction method with parallel structure and secondary correction. Background Technology
[0002] With the growth of global energy demand and the increasing awareness of environmental protection, photovoltaic (PV) power generation, as a clean and renewable energy source, has been widely applied. PV power generation systems utilize solar energy to convert light energy into electrical energy, and have become an important part of the global energy transition. However, the output power of PV power generation is affected by various factors such as weather conditions, geographical location, and time, exhibiting significant fluctuations and uncertainties. To ensure the stable operation of the power grid, accurately predicting the power output of PV power generation has become one of the key technologies. Currently, PV power prediction mainly relies on two types of technologies: physical model-based methods and data-driven methods. Physical model-based methods typically establish a mathematical model of the PV system and combine it with meteorological data (such as solar irradiance and temperature) for prediction. These methods can reflect the physical characteristics of the PV system to a certain extent, but they are highly dependent on the accuracy of the model and the input data. If the meteorological data is biased, the accuracy of the prediction results will be greatly reduced. On the other hand, data-driven methods (such as machine learning and neural networks) are trained using historical data to capture the complex patterns of PV power output. These methods can handle nonlinear relationships better and have high prediction accuracy, but they require a large amount of high-quality historical data, and the model training process is more complex.
[0003] Currently, photovoltaic power prediction research has made significant progress in applying statistical models, machine learning, and deep learning technologies. However, problems still exist, such as insufficient multidimensional data fusion, model overfitting and insufficient generalization ability, and limited application of transfer learning. The proposed innovations address these shortcomings with significant advantages. First, dual-input feature concatenation and secondary feature fusion effectively integrate multidimensional data by concatenating features from different data sources in the intermediate layer of the network, enhancing the model's ability to express complex features. This design allows the model to better capture multiple influencing factors of photovoltaic power, such as weather and historical power data, significantly improving prediction accuracy. Second, freezing model weights and constructing a new target model incorporates the idea of transfer learning. By freezing the weights of the trained model and making secondary corrections on the new task, not only is training efficiency improved, but overfitting is also avoided. This strategy allows the model to quickly adapt to photovoltaic power prediction tasks in different environments or regions, enhancing the model's generalization ability and applicability. Therefore, these innovations effectively address the shortcomings of existing research, demonstrating stronger stability and efficiency in complex environments. Summary of the Invention
[0004] To address the issue of low prediction accuracy for photovoltaic (PV) power generation over long forecast periods, this invention breaks away from the traditional modeling approach that relies on single data-driven methods. It innovatively proposes a PV power prediction method based on a parallel structure of historical load and weather information, combined with secondary prediction correction. This method significantly improves the prediction accuracy of PV power generation over long forecast periods by deeply mining the potential useful information in both historical power data and weather data, and by performing secondary corrections on the initial prediction values for each time resolution.
[0005] To achieve the above objectives, this invention provides a day-ahead photovoltaic power prediction method with parallel structure and secondary correction, comprising the following steps: Step S1: Conduct correlation analysis on historical photovoltaic power data and weather data. Specifically, use the Pearson correlation coefficient to analyze the correlation between photovoltaic power data on different dates, and use the Spearman correlation coefficient to analyze the correlation between photovoltaic power data and weather data. Analyze whether there are any defects or mismatches between the data. Step S2: Construct a parallel photovoltaic power prediction model. The input of the parallel photovoltaic power prediction model is a parallel structure of historical power data and weather data. Let the input of the parallel photovoltaic power prediction model be... , This represents the historical photovoltaic power output of the previous day. Given the current weather data, the output of the parallel forecasting model is the predicted photovoltaic power for the following day; Step S3: Construct a day-ahead photovoltaic power prediction correction model. Based on the prediction results of the photovoltaic power parallel prediction model, use the predicted values as the input of the day-ahead photovoltaic power prediction correction model for retraining. Find the variation law between prediction errors and add a new input layer. The input layer structure is the predicted value at the i-th resolution in the day-ahead prediction value. Step S4: Set the model training parameters for the parallel photovoltaic power prediction model and the day-ahead photovoltaic power prediction correction model. Specifically, save the optimal weights. When a smaller validation set error is obtained, save the weights, overwrite the previous weights, and stop the operation early. When the performance index of the model on the validation set no longer improves within a certain period of time, the training will stop early. Step S5: Evaluate the prediction results using the mean absolute percentage error (MAPE) and root mean square error (RMSE).
[0006] Furthermore, in step S1, a correlation analysis is performed on the historical photovoltaic power data and weather data. The specific steps are as follows: (1) Pearson correlation coefficient analysis of daily correlation of photovoltaic power data. Photovoltaic power data from different dates can be compared, for example, by month, week, or day. The mathematical definition of the Pearson correlation coefficient is as follows: (1); Where n is the number of samples. and These are photovoltaic power data sequences from two different dates. and These are the average values of the aforementioned photovoltaic power data series; (2) Spearman correlation coefficient analysis of the correlation between photovoltaic power data and weather data; ensuring time alignment of photovoltaic power data and weather data, and ensuring that there are photovoltaic power and weather observations 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: (2); Where n is the number of samples, d i =R(X) i )-R(Y i ); (3) Perform data defect and mismatch analysis; verify whether linear and nonlinear correlations are consistent by comparing the results of Pearson and Spearman correlation coefficients: if both are low, it indicates that there is a problem with the data quality; if Pearson correlation is low and Spearman correlation is high, it indicates that there is a nonlinear relationship in the data and the model is mismatched; check whether missing data or outliers affect the correlation analysis; if the correlation coefficient changes significantly after filling or removing missing data, it indicates that data defects are an influencing factor.
[0007] Furthermore, in step S2, the weather data includes solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, and humidity.
[0008] 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, with the following specific structure: (1) The input layers are the previous day's historical power data and current weather data for 55 nodes; where 55 nodes refer to the prediction time interval from 6:15 to 19:45, totaling 55 time points; (2) The first hidden layer has 1024 nodes, the activation function is SELU, and L2 regularization is applied; The definition of SELU consists of two parts: (3); in, and These are two fixed parameters whose values are determined experimentally. ; It is a scaling factor used to ensure that the output is within the expected mean and variance range; It controls the coefficients of the negative input part; the negative input part is a variation of the exponential function, allowing the output to be less than zero in the negative interval; the negative input part is a variation of the exponential function, allowing the output to be less than zero in the negative interval. L2 regularization adds a regularization term to the loss function, making the new loss function become: in, It is the original loss function (such as mean squared error, cross-entropy). It is a hyperparameter of regularization strength, controlling the weight of the regularization term. It is a parameter vector The i-th parameter in; It is the L2 regularization term, which is half the sum of the squares of all parameters multiplied by the regularization strength. ; L2 regularization term Its function is to force the model's parameters to adjust their magnitude by penalizing the magnitude of the penalty parameters. As small as possible; (3) The Dropout layer has a dropout rate of 0.5 to improve the generalization ability of the model.
[0009] (4) The second hidden layer has 256 nodes, the activation function is SELU, and L2 regularization is applied.
[0010] (5) Merge the two second hidden layers and connect them to the final output layer. The output layer node is 55, and the activation function is Sigmoid, which represents the photovoltaic power prediction value for 55 time points from 6:15 to 19:45 on the next day.
[0011] 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; (1) The input layer structure is the predicted value at the i-th resolution in the day-ahead prediction value; the photovoltaic power parallel prediction 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 drop 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 is a 1-node, and the activation function is Sigmoid, which represents the corrected photovoltaic power prediction value at the i-th resolution.
[0012] Furthermore, in step S4, the optimizer used is the Adam optimizer, and the loss function is MSE.
[0013] Furthermore, in step S4, the loss function MSE is defined as follows: Where: n is the number of samples. It is the true value of the i-th sample. It is the predicted value of the i-th sample.
[0014] Furthermore, in step S4, early stopping refers to continuously monitoring the model's performance metrics on the validation set during training. Once the metrics cease to improve over a period of time, training will stop 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 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 validation performance does not improve or begins to deteriorate in several consecutive iterations, it is considered that the model may have started to overfit and training should be stopped in advance.
[0015] Furthermore, MAPE is an indicator used to measure the relative error between the predicted value and the actual value, and its definition is as follows: Where: n is the number of samples. It is the actual value of the i-th sample. It is the predicted value of the i-th sample.
[0016] Furthermore, RMSE is a metric for measuring prediction error, and its definition is as follows: (7); Where: n is the number of samples. It is the actual value of the i-th sample. It is the predicted value of the i-th sample.
[0017] The beneficial effects of the present invention are as follows: 1. This invention, by introducing a parallel structure of historical power data and weather data, and performing secondary correction on the initial forecast values for each time resolution, effectively utilizes the correlation between multi-source data, significantly improving photovoltaic power generation over long forecast periods. It can capture complex nonlinear relationships, thereby reducing prediction errors.
[0018] 2. This invention employs a parallel structure combined with a secondary correction strategy, enabling the model to exhibit stronger robustness in the face of uncertainties over long prediction periods. By deeply mining and integrating effective information from historical power and weather data, the model can better adapt to different climatic conditions and load variations, ensuring that the prediction results maintain high reliability and stability in diverse environments. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart of a day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to an embodiment of the present invention; Figure 2 This is a complete structural diagram of the photovoltaic power parallel prediction model and the day-ahead photovoltaic power prediction correction model in the embodiments of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0022] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the purpose of... This description is intended to facilitate the depiction of the invention and to simplify the description, and is not intended to indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention.
[0023] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances. Furthermore, the technical features involved in the different embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0024] like Figure 1 As shown, this embodiment of the invention provides a day-ahead photovoltaic power prediction method with parallel structure and secondary correction. The method includes the following steps: Step S1: Perform correlation analysis on historical photovoltaic power data and weather data. Specifically, use the Pearson correlation coefficient to analyze the correlation between photovoltaic power data on different dates, and use the Spearman correlation coefficient to analyze the correlation between photovoltaic power data and weather data. Analyze whether there are any defects or mismatches between the data.
[0025] The specific steps for studying the correlation between historical photovoltaic power data and the correlation analysis between historical photovoltaic power data and weather data are as follows: (1) Pearson correlation coefficient analysis of daily correlation of photovoltaic power data. This involves comparing photovoltaic power on different dates, including correlation analysis by month, week, and day. The mathematical definition of the Pearson correlation coefficient is as follows: (8); in, and These are photovoltaic power data sequences from two different dates. and These are the average values of the aforementioned photovoltaic power data series; (2) Spearman correlation coefficient analysis of the correlation between photovoltaic power data and weather data. Ensure that the photovoltaic power data and weather data are time-aligned, and that both photovoltaic power and weather observations are available at the same point in time. The calculation process of the Spearman correlation coefficient is as follows: Sort the data: Sort the data X and Y separately to obtain the rank (i.e., ranking) 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: (9); Where n is the number of samples, d i =R(X) i )-R(Y i ); (3) Perform data defect and mismatch analysis. Verify the consistency between linear and nonlinear correlations by comparing the results of Pearson and Spearman correlation coefficients. If both are low, it indicates a problem with data quality. If the Pearson correlation is low while the Spearman correlation is high, it indicates a nonlinear relationship in the data and a model mismatch. Check whether missing data or outliers affect the correlation analysis; if the correlation coefficient changes significantly after filling or removing missing data, it indicates that data defects are an influencing factor.
[0026] Step S2: Construct a parallel photovoltaic power prediction model. The input to the parallel photovoltaic power prediction model is a parallel structure of historical power data and weather data. Let the input to the parallel prediction model be... , This represents the historical photovoltaic power output of the previous day. Given the current weather data (solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, and humidity), the output of the parallel prediction model is the predicted photovoltaic power for the following day.
[0027] The parallel photovoltaic power forecasting model uses a parallel structure of historical power data and weather data to deeply mine the potential effective information from both types of data, thereby improving the accuracy of day-ahead photovoltaic power forecasting. The model structure is as follows: Figure 2 As shown, the specific structure is as follows: (1) The input layers are the previous day's historical power data and current weather data for 55 nodes; where 55 nodes refer to the prediction time interval from 6:15 to 19:45, totaling 55 time points; (2) The first hidden layer has 1024 nodes, the activation function is Scaled Exponential Linear Unit (SELU), and L2 regularization is applied; the definition of SELU consists of two parts: (10); in, and These are two fixed parameters whose values are determined experimentally. ; It is a scaling factor used to ensure that the output is within the expected mean and variance range; It controls the coefficients of the negative input part; the negative input part is a variation of the exponential function, allowing the output to have a value less than zero in the negative interval; L2 regularization adds a regularization term to the loss function, making the new loss function become: in, It is the original loss function (such as mean squared error, cross-entropy). It is a hyperparameter of regularization strength, controlling the weight of the regularization term. It is a parameter vector The i-th parameter in; It is the L2 regularization term, which is half the sum of the squares of all parameters multiplied by the regularization strength. ; L2 regularization term Its function is to force the model's parameters to adjust their magnitude by penalizing the magnitude of the penalty parameters. As small as possible; (3) The Dropout layer has a dropout rate of 0.5 to improve the generalization ability of the model.
[0028] (4) The second hidden layer has 256 nodes, the activation function is SELU, and L2 regularization is applied.
[0029] (5) Merge the two second-layer hidden layers and connect them to the final output layer. The output layer node is 55, and the activation function is Sigmoid (S-shaped function), which represents the photovoltaic power prediction value from 6:15 to 19:45 on the next day.
[0030] Step S3: Construct a day-ahead photovoltaic power prediction correction model. Based on the prediction results of the photovoltaic power parallel prediction model, use the predicted values as input to the day-ahead photovoltaic power prediction correction model for retraining. Ensure the effectiveness of the model structure's training results. Add a new input layer, whose structure is the predicted value at the i-th resolution in the day-ahead prediction values, to further improve the accuracy of photovoltaic power prediction in the day-ahead structure.
[0031] The current-day photovoltaic power forecast correction model is a secondary forecast correction model. Based on the forecast results of the parallel photovoltaic power forecast model, the predicted values are used as input to the current-day photovoltaic power forecast correction model for retraining. This process aims to identify the variation patterns of forecast errors and further improve the accuracy of current-day photovoltaic power load forecasting. Model Structure Figure 2 As shown, the specific structure is as follows: (1) The input layer structure is the predicted value at the i-th resolution in the day-ahead prediction value; the photovoltaic power parallel prediction 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 drop 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 is a 1-node, and the activation function is Sigmoid, which represents the corrected photovoltaic power prediction value at the i-th resolution.
[0032] Step S4: Set the model training parameters for the parallel photovoltaic power prediction model and the day-ahead photovoltaic power prediction correction model. Specifically, save the optimal weights. When a smaller validation set error is obtained, save the weights, overwrite the previous weights, and stop the operation early. When the performance index of the model on the validation set no longer improves within a certain period of time, the training will stop early.
[0033] During model training, the optimizer used is the Adam optimizer (adaptive moment estimator), and the loss function is MSE.
[0034] 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: Where: n is the number of samples. It is the true value of the i-th sample. It is the predicted value of the i-th sample.
[0035] Save optimal weights: During model training, when a smaller validation set error is obtained, save the weights, overwriting the previous weights, instead of using the weights at the end of training. The purpose of this is to obtain more accurate predictions and reduce the impact of model overfitting.
[0036] Early stopping: During training, continuously monitor the model's performance metrics (such as validation loss or validation accuracy) on the validation set. If these metrics no longer improve over a period of time, training will stop 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 performance on the validation set: After each iteration (or after each epoch), calculate the model's performance on the validation set (such as validation loss); (3) Determine whether to stop: If the validation performance does not improve or begins to deteriorate in several consecutive iterations, it is considered that the model may have started to overfit and training should be stopped in advance.
[0037] During early stopping, two key parameters need to be set: Patience: This parameter refers to the maximum number of iterations training is allowed to continue if validation performance no longer improves. If validation performance does not improve further within these iterations, training will stop. For example, setting the patience parameter to 10 means that training will stop if the validation loss does not decrease within 10 epochs. Optimal Validation Performance: During early stopping, the model parameters that perform best on the validation set during training are recorded. When training stops, it reverts to this optimal point to ensure that the parameters with the best model performance are used.
[0038] Step S5: Processing the prediction results, with evaluation indicators being MAPE and RMSE.
[0039] MAPE (Mean Absolute Percentage Error) and RMSE (Root Mean Square Error) are two commonly used metrics for evaluating the performance of predictive models. Their mathematical principles are as follows: MAPE (Mean Absolute Percentage Error) is a metric used to measure the relative error between a predicted value and the actual value. Its definition is as follows: Where: n is the number of samples. It is the actual value of the i-th sample. It is the predicted value of the i-th sample.
[0040] The advantage of MAPE is its unit independence, meaning that MAPE values between different datasets can be directly compared because it is a measure of relative error. Its disadvantage is that when the actual value... When the value approaches zero, the percentage error becomes very large, resulting in extremely high and unstable MAPE values.
[0041] RMSE (Root Mean Square Error) is a metric for measuring prediction error, particularly suitable for reflecting the magnitude of prediction error. Its definition is as follows: (14); Where: n is the number of samples. It is the actual value of the i-th sample. It is the predicted value of the i-th sample.
[0042] The advantage of RMSE is its greater sensitivity to larger errors, making it suitable for scenarios where large errors need to be monitored. Its disadvantage is its sensitivity to outliers, as squaring can amplify these errors. MAPE is better suited for measuring relative errors and is suitable for scenarios with significantly different data sizes. RMSE is better suited for measuring absolute errors and is suitable for scenarios where the absolute value of the error is important and the data size is relatively uniform.
[0043] Example: The actual photovoltaic power output of region 1352 in Guangdong Province is used as an example for analysis. This data includes photovoltaic power output from June 21, 2022 to September 29, 2022, totaling 101 days. The latter 10% is used as the test set. The first 80% of the 90% of data was used as the training set, and the last 20% as the validation set. Correlation analysis was performed on historical power data and weather data, including correlations between historical power data and weather data, and correlations between different weather data. The results show that the correlation between days in the photovoltaic power data is very high, making the use of the previous day's load as model input very reasonable. The correlation between historical power data and weather data (solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, humidity) shows that historical power data has the highest correlation with solar radiation, reaching 90%, while the correlations with other weather data are not high. Therefore, only solar radiation data significantly increased the size of the input data, reduced data redundancy, and improved model training speed. The first step of the correlation analysis yields a more reasonable model input. Model structure 1 of the day-ahead photovoltaic power prediction model was constructed, which is a parallel prediction structure for historical power data and weather data. Then, model structure 2 of the day-ahead photovoltaic power prediction model was constructed, which is a correction of the power prediction values at each resolution. Model training parameters were set, including dataset partitioning, optimal weight saving, and early stopping. Finally, the predicted photovoltaic power was obtained, and the results were evaluated using MAPE and RMSE evaluation indicators. Comparative experiments were conducted: the first group did not have model structure 1 or model structure 2; the second group did not have model structure 2; and the third group had both model structures 1 and 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. This demonstrates that the method of this invention has higher prediction accuracy.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A day-ahead photovoltaic power prediction method with parallel structure and secondary correction, characterized in that, Includes the following steps: Step S1: Perform correlation analysis on historical photovoltaic power data and weather data. Specifically, use the Pearson correlation coefficient to analyze the correlation between photovoltaic power data on different dates, and use the Spearman correlation coefficient to analyze the correlation between photovoltaic power data and weather data. Analyze whether there are any defects or mismatches between the data. Step S2: Construct a parallel photovoltaic power prediction model. The input of the parallel photovoltaic power prediction model is a parallel structure of historical power data and weather data. Let the input of the parallel photovoltaic power prediction model be... , This represents the historical photovoltaic power output of the previous day. Given the current weather data, the output of the parallel forecasting model is the predicted photovoltaic power for the following day; Step S3: Construct a day-ahead photovoltaic power prediction correction model. Based on the prediction results of the photovoltaic power parallel prediction model, use the predicted values as the input of the day-ahead photovoltaic power prediction correction model for retraining. Find the variation law between prediction errors and add a new input layer. The input layer structure is the predicted value at the i-th resolution in the day-ahead prediction value. Step S4: Set the model training parameters for the parallel photovoltaic power prediction model and the day-ahead photovoltaic power prediction correction model. Specifically, save the optimal weights. When a smaller validation set error is obtained, save the weights, overwrite the previous weights, and stop the operation early. When the performance index of the model on the validation set no longer improves within a certain period of time, the training will stop early. Step S5: Evaluate the prediction results using the mean absolute percentage error (MAPE) and root mean square error (RMSE).
2. The day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to claim 1, characterized in that: In step S1, a correlation analysis is performed on historical photovoltaic power data and weather data. The specific steps are as follows: (1) Pearson correlation coefficient analysis is used to analyze the daily correlation of photovoltaic power data, compare photovoltaic power on different dates, and also perform correlation analysis by month, week, and day. The mathematical definition of Pearson correlation coefficient is as follows: (1); in, and These are photovoltaic power data sequences from two different dates. and These are the average values of the aforementioned photovoltaic power data series; (2) Spearman correlation coefficient analysis of the correlation between photovoltaic power data and weather data; ensuring time alignment of photovoltaic power data and weather data, and ensuring that there are photovoltaic power and weather observations 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: (2); Where n is the number of samples, d i =R(X) i )-R(Y i ); (3) Perform data defect and mismatch analysis; verify whether linear and nonlinear correlations are consistent by comparing the results of Pearson and Spearman correlation coefficients: if both are low, it indicates that there is a problem with the data quality; if Pearson correlation is low and Spearman correlation is high, it indicates that the data has a nonlinear relationship and the model is mismatched; check whether missing data or outliers affect the correlation analysis; if the correlation coefficient changes significantly after filling or removing missing data, it indicates that data defects are an influencing factor.
3. The day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to claim 1, characterized in that: In step S2, the weather data includes solar radiation, 10m wind speed, 10m wind direction, temperature, pressure, and humidity.
4. The day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to claim 1, characterized in that: 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, with the following specific structure: (1) The input layers are the previous day's historical power data and current weather data for 55 nodes; where 55 nodes refer to the prediction time interval from 6:15 to 19:45, totaling 55 time points; (2) The first hidden layer has 1024 nodes, the activation function is "SELU", and L2 regularization is applied; the definition of SELU consists of two parts: (3); in, and These are two fixed parameters whose values are determined experimentally. ; It is a scaling factor used to ensure that the output is within the expected mean and variance range; It controls the coefficient of the negative input part; the negative input part is a variation 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, making the new loss function become: in, It is the original loss function. It is a hyperparameter of regularization strength, controlling the weight of the regularization term. It is a parameter vector The i-th parameter in the model, where n is the total number of model parameters; It is the L2 regularization term, which is half the sum of the squares of all parameters multiplied by the regularization strength. ; L2 regularization term Its function is to force the model's parameters to adjust their magnitude by penalizing the magnitude of the penalty parameters. As small as possible; (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) Merge the two second hidden layers and connect them to the final output layer. The output layer node is 55, and the activation function is Sigmoid, which represents the photovoltaic power prediction value for 55 time points from 6:15 to 19:45 on the next day.
5. The day-ahead photovoltaic power prediction method 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 predicted value at the i-th resolution in the day-ahead prediction value; the photovoltaic power parallel prediction 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 drop 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 is a 1-node, and the activation function is Sigmoid, which represents the corrected photovoltaic power prediction value at the i-th resolution.
6. The day-ahead photovoltaic power prediction method 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... .
7. The day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to claim 6, characterized in that: In step S4, the loss function The definition is as follows: Where: n is the number of samples. It is the true value of the i-th sample. It is the predicted value of the i-th sample.
8. The day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to claim 1, characterized in that: In step S4, early stopping refers to continuously monitoring the model's performance metrics on the validation set during training. Once the metrics no longer improve over a period of time, training will stop 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 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 validation performance does not improve or begins to deteriorate in several consecutive iterations, it is considered that the model may have started to overfit and training should be stopped in advance.
9. The day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to claim 1, characterized in that: MAPE is an indicator used to measure the relative error of a predicted value relative to the actual value, and it is defined as follows: Where: n is the number of samples. It is the actual value of the i-th sample. It is the predicted value of the i-th sample.
10. The day-ahead photovoltaic power prediction method with parallel structure and secondary correction according to claim 1, characterized in that: RMSE is a metric for measuring prediction error, and it is defined as follows: (7); Where: n is the number of samples. It is the actual value of the i-th sample. It is the predicted value of the i-th sample.
Citation Information
Patent Citations
Low-voltage distributed photovoltaic power prediction method under in-situ balance scene
CN118783396A
System and method for predicting photovoltaic power generation
KR102520255B1