A photovoltaic power generation ultra-short-term power prediction method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-10
- Publication Date
- 2026-08-11
Smart Images

Figure CN112651537B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system engineering technology, and in particular to a method and system for ultra-short-term power prediction of photovoltaic power generation. Background Technology
[0002] The ultra-short-term power forecasting results of photovoltaic (PV) power generation systems are crucial for power system dispatching and production planning. Accurate PV power generation forecasting is essential for power system operation and dispatch. However, the output power of PV power generation systems is highly intermittent, volatile, and uncertain due to the influence of natural factors such as day / night cycles, seasons, and weather, posing a significant challenge to accurate power generation forecasting. Therefore, a forecasting method that can better grasp the patterns of power generation variation is urgently needed.
[0003] Numerous factors influence photovoltaic (PV) power generation, and the degree of influence of these variables varies at different times. Therefore, it is essential to use the correlation coefficient method to identify the factors related to power generation and improve the accuracy of PV power generation prediction. Summary of the Invention
[0004] The purpose of this invention is to propose a method and system for ultra-short-term photovoltaic power generation prediction, which effectively solves the problem of low power generation prediction accuracy caused by meteorological conditions.
[0005] To achieve the above objectives, the present invention provides a method for predicting ultra-short-term power of photovoltaic power generation, comprising the following steps:
[0006] Step 1: Read in the data and perform Spearman correlation coefficient analysis on each variable to identify factors that are strongly correlated with photovoltaic power generation.
[0007] Step 2: Extract the power generation and strongly correlated factors at various time points, and perform Spearman correlation coefficient analysis on the extracted data at each time point again;
[0008] Step 3: Based on the analysis results, confirm the data values of the time when the power generation is strongly correlated with the predicted time, and establish a Long Short-Term Memory (LSM) network model. Use the data values of the strongly correlated time as the input data of the model at each time and normalize them.
[0009] Step 4: Divide the input data into training and testing sets, input them into the LSTM network model, obtain the predicted values, and perform inverse normalization.
[0010] Step 5: Calculate the error between the test value and the true value, and use the trained LSTM network model to predict the prediction time.
[0011] Preferably, step one specifically includes the following steps:
[0012] The correlation coefficient method used is the Spearman correlation coefficient. The formula for calculating the Spearman correlation coefficient of two n-dimensional vectors x and y is as follows:
[0013]
[0014] Among them, R i and S i These are the ranks of the observation i after sorting vectors x and y, respectively. and These are the average ranks of vectors x and y, respectively, where N is the total number of observations, and d is the average rank of vectors x and y. i =R i -S i , representing the difference in rank between the observations i in the two variables;
[0015] Spearman correlation coefficient analysis was performed on the measured variable data and meteorological forecast variable data of a photovoltaic power station in a certain year with the photovoltaic power generation power. Variables with strong correlation with power generation power were selected and determined as input variables of the model.
[0016] Preferably, step two specifically includes the following steps:
[0017] The correlation between the input variable data at different time points is calculated again using the Spearman correlation coefficient.
[0018] Preferably, step three specifically includes the following steps:
[0019] Based on the analysis results of step two, the time values of the input variables with high correlation between different time points are identified as the input data for the LSTM prediction model. The data is then normalized, and the normalization calculation formula is shown below:
[0020]
[0021] Where, x max and x min These are the maximum and minimum values of the variable, respectively.
[0022] Preferably, step four specifically includes the following steps:
[0023] Based on the analysis results of step three, training samples are constructed using photovoltaic power generation data for each moment of the year and time data strongly correlated with that moment, and several long short-term memory network models are trained.
[0024] On the other hand, the present invention provides a photovoltaic power generation ultra-short-term power prediction system, comprising:
[0025] The first analysis module is used to read in the data, perform Spearman correlation coefficient analysis on each variable, and identify factors that are strongly correlated with photovoltaic power generation.
[0026] The second analysis module is used to extract the power generation and strongly correlated factors at various time points, and to perform Spearman correlation coefficient analysis on the extracted data at various time points.
[0027] The first processing module is used to confirm the data values of the time when the power generation is strongly correlated with the predicted time based on the analysis results, and to establish a time-sharing LSTM model. The data values of the strongly correlated time are used as the input data of the model at each time and normalized.
[0028] The second processing module is used to divide the input data into training and testing sets, input them into the LSTM network model, obtain the predicted values, and perform inverse normalization.
[0029] The third processing module is used to calculate the error between the test value and the true value, and to make predictions for the prediction time using the trained LSTM network model.
[0030] Preferably, the first analysis module is specifically used for:
[0031] The correlation coefficient method used is the Spearman correlation coefficient. The formula for calculating the Spearman correlation coefficient of two n-dimensional vectors x and y is as follows:
[0032]
[0033] Among them, R i and S i These are the ranks of the observation i after sorting vectors x and y, respectively. and These are the average ranks of vectors x and y, respectively, where N is the total number of observations, and d is the average rank of vectors x and y. i =R i -S i , representing the difference in rank between the observations i in the two variables;
[0034] Spearman correlation coefficient analysis was performed on the measured variable data and meteorological forecast variable data of a photovoltaic power station in a certain year with the photovoltaic power generation power. Variables with strong correlation with power generation power were selected and determined as input variables of the model.
[0035] Preferably, the second analysis module is specifically used for:
[0036] The correlation between the input variable data at different time points is calculated again using the Spearman correlation coefficient.
[0037] Preferably, the first processing module is specifically used for:
[0038] The time-varying variable values with high correlation between different time points are selected as the input data for the LSTM prediction model. The data is then normalized using the formula shown below:
[0039]
[0040] Where, x max and x min These are the maximum and minimum values of the variable, respectively.
[0041] Preferably, the second processing module is specifically used for:
[0042] Training samples are constructed using photovoltaic power generation data for each moment of the year and data for moments strongly correlated with that moment, and several long short-term memory network models are trained.
[0043] The advantages and positive effects of this invention are as follows: This invention provides a method for predicting ultra-short-term power of photovoltaic power generation based on time-division long short-term memory network, and uses the correlation coefficient method to find factors that are strongly correlated with power generation, thereby improving the accuracy of power generation prediction and contributing to power system dispatch and optimized operation of photovoltaic power plants. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the structural framework of a photovoltaic power generation ultra-short-term power prediction method provided in an embodiment of the present invention;
[0045] Figure 2 This is a schematic flowchart of a photovoltaic power generation ultra-short-term power prediction method provided in an embodiment of the present invention;
[0046] Figure 3 This is a graph showing the weather and photovoltaic power generation curves for July 2017.
[0047] Figure 4 Diagram of a time-sharing short-term memory network model;
[0048] Figure 5 for Figure 2 The diagram shows the effect of the ultra-short-term power prediction method for photovoltaic power generation. Detailed Implementation
[0049] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0050] like Figure 1 and Figure 2 As shown in the figure, this embodiment of the invention provides a method for ultra-short-term power prediction of photovoltaic power generation, which includes the following steps:
[0051] Step 1: Input historical photovoltaic power generation data, historical actual meteorological measurements, and meteorological forecasts;
[0052] Step 2: Use the Spearman correlation coefficient method to perform correlation analysis on the data input in Step 1 to identify key influencing factors; the key influencing factors include: total radiation, direct radiation, scattered radiation, long-wave radiation and short-wave radiation.
[0053] Since photovoltaic power generation is closely related to weather factors, it is necessary to identify the main factors affecting power generation. Spearman correlation coefficient analysis can be used to identify meteorological data variables with strong correlation to power generation as the main influencing variables and as input variables.
[0054] The correlation coefficient method used in this embodiment of the invention is the Spearman correlation coefficient. The formula for calculating the Spearman correlation coefficient of two n-dimensional vectors x and y is as follows:
[0055]
[0056] Among them, R i and S i These are the ranks of the observation i after sorting vectors x and y, respectively. and These are the average ranks of vectors x and y, respectively, where N is the total number of observations, and d is the average rank of vectors x and y. i =R i -S i , which represents the difference in rank between the observations i in the two variables.
[0057] Historical photovoltaic power generation data, historical meteorological measurements, and meteorological forecasts for the year were analyzed using Spearman correlation coefficients. The correlation of each factor (such as total radiation, direct radiation, and diffuse radiation in the measured data, and shortwave radiation and longwave radiation in the meteorological forecast data) was calculated. The power generation value was set as the parent sequence, and the meteorological measurements and forecasts were set as several subsequences. The correlation between each subsequence and the parent sequence was analyzed using Spearman correlation coefficients, and factors with strong correlations were identified as key influencing factors.
[0058] Step 3: Based on Step 2, Spearman correlation coefficient method is used again to conduct correlation analysis between key influencing variables and power generation at various times, and to find the time values of factors affecting power generation at each time.
[0059] For example, the photovoltaic power generation and key influencing factors data for each time of the year are extracted and subjected to Spearman correlation analysis. The data values of the time with strong correlation to power generation are determined as input data. Due to the influence of day and night, the prediction of the time from 6:15 to 20:00 is considered, resulting in photovoltaic power generation prediction for a total of 56 times.
[0060] Step 4: Based on the correlation results from Step 3, confirm the data values at times strongly correlated with the predicted power generation, and establish a time-sharing LSTM model. Use the strongly correlated data values as input data for each time point and normalize them. The normalization calculation formula is shown below:
[0061]
[0062] Where, x max and x min These are the maximum and minimum values of the variable, respectively.
[0063] For example, based on the photovoltaic power generation prediction data at 56 time points, 56 data sample sets are formed, and a long short-term memory network model at 56 time points is constructed to form a time-segmented long short-term memory network model.
[0064] Step 5: Divide the input data into training and testing sets, input them into the LSTM network model, obtain the predicted values, and perform inverse normalization; calculate the error between the test values and the true values, and use the trained LSTM network model to predict the predicted time.
[0065] For example, a corresponding time-separated long short-term memory network is trained based on 56 data sample sets; based on the correlation analysis results of step three, training samples are constructed using the power generation at each moment of the year and the corresponding strongly correlated moment data, and 56 time-separated long short-term memory network models are trained. In this process, the parameters that need to be determined for the long short-term memory network include the number of neurons in the input layer, the number of hidden layers and the number of neurons in each layer, and the number of neurons in the output layer.
[0066] Step 6: Combine the prediction results of all time-segmented short-term memory network models;
[0067] Step 7: The combined prediction results are the daily photovoltaic power generation output.
[0068] The present invention provides a method for ultra-short-term power prediction of photovoltaic power plants, which realizes time-sharing prediction and improves the prediction accuracy of power generation.
[0069] In one embodiment, taking the 2017 data of a photovoltaic power station in a city in Ningxia Hui Autonomous Region as an example, the installed capacity of the power station is 100MW and the data sampling time interval is 15 minutes.
[0070] Implementation Step 1 (corresponding to Step 1 and Step 2): Select one year's photovoltaic power generation data, historical actual meteorological measurements, and meteorological forecasts, in the following format:
[0071]
[0072] To perform Spearman correlation analysis on the data in the table above, we set the parent series as power generation values and the other variables as child series, and calculated the correlation coefficients between any two vectors using the following formula:
[0073]
[0074] In the Spearman correlation coefficient, ρ s It is a real number in [-1, 1]. When ρ s When ρ > 0, the two variables are positively correlated; otherwise, they are negatively correlated. s The larger the value of |ρ, the stronger the correlation between variables x and y. s |≥0.6, considered highly correlated; 0.2≤|ρ s |<0.6, considered moderate correlation; |ρ s |<0.2, is considered to have a very weak correlation and can be ignored.
[0075] Based on the calculation results, the key influencing factors of power generation were identified. The results are as follows: photovoltaic power generation is most strongly correlated with total radiation, with a Spearman correlation coefficient of 0.94; the correlation with diffuse radiation is second strongest, with a correlation coefficient of 0.90; the correlation with direct radiation is 0.86; and the correlation with relative humidity is the weakest, at -0.12. Therefore, the main influencing variables in the measured data of power generation are total radiation, direct radiation, and diffuse radiation. Table 2 shows that photovoltaic power generation is strongly correlated with long-wave radiation and short-wave radiation, with correlation coefficients of 0.90 and 0.80, respectively. Therefore, the main influencing variables in the predicted data of power generation are long-wave radiation and short-wave radiation.
[0076]
[0077] Step 2 (corresponding to Step 3): Based on the Spearman correlation results between variables, extract the moment data values of key influencing factors and power generation. The moment data format of power generation is as follows:
[0078]
[0079]
[0080] The results of the Spearman correlation calculation between the columns, with each column of the data table as a vector sequence, are as follows:
[0081]
[0082] Data format description: The table above selects data values with a correlation coefficient greater than 0.8. For example, to predict the photovoltaic power generation at 7:30, the historical power generation values that are strongly correlated with this time are the data values at 6:45, 7:00, and 7:15.
[0083] Step 3 (corresponding to S4): Based on the results of Step 2, generate a dataset. The dataset format for predicting photovoltaic power generation at 7:30 is as follows:
[0084]
[0085] Data Format Explanation: This table contains the 8:30 prediction dataset. Total radiation, scattered radiation, and longwave radiation are the key influencing factors affecting the 8:30 power generation prediction. The time values for each factor represent the strongly correlated data values affecting the 8:30 power generation prediction. Since the prediction period is from 6:15 to 20:00, totaling 56 time points, and the correlation strength varies at each time point, the datasets and Long Short-Term Memory (LSTM) network model parameters also differ. Therefore, it is necessary to train and save 56 LSM networks.
[0086] Implement step 4 (corresponding to steps 5 and 6):
[0087] This step primarily involves training the prediction model. This process is implemented using the Keras and Tensorflow platforms, employing the Python language. Figure 4 This is a diagram of a time-series short-term memory network model. The power generation of this city in Ningxia Hui Autonomous Region from October 1st to October 5th is predicted. The prediction error results are as follows.
[0088]
[0089] The power generation for that day can be obtained by combining the prediction results of 56 models from the time-segmented short-term memory network. The prediction results are shown in the attached figure. Figure 5 As shown.
[0090] The prediction accuracy of the single long short-term memory network model is lower than that of the BP prediction algorithm in traditional methods; however, the prediction accuracy and performance of the time-division long short-term memory network model of this invention are the best.
[0091] The embodiments of the present invention have been described in detail above, but the content described is only a preferred embodiment of the present invention and should not be considered as limiting the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of this patent.
Claims
1. A method for predicting ultra-short-term power output of photovoltaic power generation, comprising the following steps: Step 1: Read in the data and perform Spearman correlation coefficient analysis on each variable to identify factors strongly correlated with photovoltaic power generation. The read-in data includes: Input historical photovoltaic power generation data, historical actual meteorological measurements, and meteorological forecasts; The factors that are strongly correlated with photovoltaic power generation include: total radiation, direct radiation, diffuse radiation, long-wave radiation, and short-wave radiation. The correlation of each strongly correlated factor is calculated. The parent sequence is set as the power generation value, and the meteorological measurement value and the forecast value are several subsequences. The Spearman correlation coefficient is used to analyze the correlation between each subsequence and the parent sequence. The factors with strong correlation are taken as key influencing factors. Step 2: Extract the power generation and strongly correlated factors at various time points, and perform Spearman correlation coefficient analysis on the extracted data at each time point again; Step 3: Based on the analysis results, confirm the data values of the time when the power generation is strongly correlated with the predicted time, and establish a time-sharing LSTM model. Use the data values of the strongly correlated time as the input data of the model at each time and normalize them. Step 4: Divide the input data into training and testing sets, input them into the LSTM network model, obtain the predicted values, and perform inverse normalization. Step 5: Calculate the error between the test value and the true value, and use the trained LSTM network model to predict the prediction time. Step one specifically includes the following steps: The correlation coefficient method used is the Spearman correlation coefficient. The formula for calculating the Spearman correlation coefficient of two n-dimensional vectors x and y is as follows: Among them, R i and S i These are the observations after sorting vectors x and y. rank, and These are the average ranks of vectors x and y, respectively, where N is the total number of observations, and d is the average rank of vectors x and y. i =R i -S i , representing the difference in rank between the observations i in the two variables; Spearman correlation coefficient analysis was performed on the measured variable data and meteorological forecast variable data of a photovoltaic power station in a certain year with the photovoltaic power generation power. Variables with strong correlation with power generation power were selected and determined as input variables of the model. Step three specifically includes the following steps: Based on the analysis results of step 2, the time values of the input variables with high correlation between different time points are determined as the input data for the LSTM prediction model; then, the data is normalized, and the normalization calculation formula is shown in the following formula: Where, x max and x min These are the maximum and minimum values of the variable, respectively. Step four specifically includes the following steps: Based on the analysis results of step three, training samples are constructed using photovoltaic power generation data for each moment of the year and time data strongly correlated with that moment, and several long short-term memory network models are trained.
2. The method according to claim 1, characterized in that: Step four specifically includes the following steps: Based on the analysis results of step three, training samples are constructed using photovoltaic power generation data for each moment of the year and time data strongly correlated with that moment, and several long short-term memory network models are trained.
3. The method according to claim 1, characterized in that, Based on the correlation results from step three, 56 data sample sets are formed, and 56 time-segment long short-term memory network models are constructed to form a time-segmented long short-term memory network model.
4. A photovoltaic power generation ultra-short-term power prediction system, comprising: The first analysis module is used to read in the data, perform Spearman correlation coefficient analysis on each variable, and identify factors that are strongly correlated with photovoltaic power generation. The input data includes: historical photovoltaic power generation data, historical meteorological actual measurement values, and meteorological forecast values; the factors strongly correlated with photovoltaic power generation include: total radiation, direct radiation, diffuse radiation, longwave radiation, and shortwave radiation; the correlation of each strongly correlated factor is calculated, the parent sequence is set as the power generation value, and the meteorological measurement values and forecast values are several subsequences. The Spearman correlation coefficient is used to analyze the correlation between each subsequence and the parent sequence, and the factors with strong correlation are taken as key influencing factors; The second analysis module is used to extract the power generation and strongly correlated factors at various time points, and to perform Spearman correlation coefficient analysis on the extracted data at various time points. The first processing module is used to confirm the data values of the time when the power generation is strongly correlated with the predicted time based on the analysis results, and to establish a time-sharing LSTM model. The data values of the strongly correlated time are used as the input data of the model at each time and normalized. The second processing module is used to divide the input data into training and testing sets, input them into the LSTM network model, obtain the predicted values, and perform inverse normalization. The third processing module is used to calculate the error between the test value and the true value, and to make predictions for the prediction time using the trained LSTM network model. The first analysis module is specifically used for: The correlation coefficient method used is the Spearman correlation coefficient. The formula for calculating the Spearman correlation coefficient of two n-dimensional vectors x and y is as follows: Among them, R i and S i These are the observations after sorting vectors x and y. rank, and These are the average ranks of vectors x and y, respectively, where N is the total number of observations, and d is the average rank of vectors x and y. i =R i -S i , representing the difference in rank between the observations i in the two variables; Spearman correlation coefficient analysis was performed on the measured variable data and meteorological forecast variable data of a photovoltaic power station in a certain year with the photovoltaic power generation power. Variables with strong correlation with power generation power were selected and determined as input variables of the model. The second processing module is specifically used for: Training samples are constructed using photovoltaic power generation data for each moment of the year and data for moments strongly correlated with that moment, and several long short-term memory network models are trained.
Citation Information
Patent Citations
Photovoltaic power generation power prediction method and system
CN103500365A
Method for predicting generated energy of photovoltaic power station
CN105488592A
Photovoltaic output power super-short-term prediction method
CN105589998A
Short-term photovoltaic power generation forecasting method based on long-term and short-term memory neural network
CN109284870A
A distributed photovoltaic prediction method of an ARIMA model based on spatial correlation
CN109919353A