A photovoltaic output power prediction method and system
By optimizing the LSTM network using a Bayesian optimizer and a spatiotemporal correlation model, and combining the time and space correlation model, the uncertainty problem in photovoltaic power generation output prediction is solved, the prediction accuracy is improved, and the feasibility assessment of new power plants and grid stability are supported.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2026-03-20
AI Technical Summary
Existing methods for predicting photovoltaic power output lack sufficient research on temporal and spatial correlations, resulting in high uncertainty in prediction results, which affects grid stability and the absorption of renewable energy.
The hyperparameters of the LSTM are optimized using a Bayesian optimizer. Combined with time-dependent and spatial-dependent models, the optimal ratio of the artificial intelligence model is optimized using the CRITIC method. The prediction results of the LSTM are corrected by the time-space-dependent model, and a short-term prediction model for photovoltaic power is established.
It improves the accuracy of photovoltaic power output prediction, assists in the prediction and evaluation of newly built distributed power stations, reduces prediction errors, and enhances the stability of the power grid and the absorption capacity of renewable energy.
Smart Images

Figure CN118889378B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of photovoltaic power generation, in particular to a photovoltaic output power prediction method and system. BACKGROUND
[0002] Photovoltaic power generation is to convert solar energy into electric energy by using photovoltaic effect, and is one of the most promising renewable energy power generation technologies. In recent years, distributed photovoltaic has developed rapidly due to its flexible scale capacity design and variable energy utilization mode. However, factors such as solar irradiance and temperature also affect the change of photovoltaic output power, bringing serious challenges to power grid operation. Therefore, photovoltaic power generation output power prediction has become one of the effective ways to solve this problem. However, the increase of distributed photovoltaic brings some challenges and difficulties, mainly the stability of power grid and power consumption. Due to the randomness and volatility of photovoltaic output, it will bring challenges to the safe operation and peak regulation and dispatching of power grid, which will inevitably introduce prediction error and increase the uncertainty of prediction results, and thus greatly limit the consumption of renewable energy. At the same time, in addition to being affected by weather changes and cloud movement, solar energy also shows strong periodicity and regularity, so it is meaningful to comprehensively utilize these two characteristics to improve the prediction accuracy. However, the existing methods still lack research on time correlation and spatial correlation, resulting in problems in prediction based on time correlation and spatial correlation. SUMMARY
[0003] The purpose of the present application is to provide a photovoltaic output power prediction method and system to solve the problems mentioned in the background.
[0004] To achieve the above purpose, the present application provides a photovoltaic output power prediction method, comprising the following steps:
[0005] S1, performing space-time processing on the original historical data set of photovoltaic power generation, and dividing the processed original historical data set into a training set, a validation set and a prediction set, wherein the validation set is used to calculate the prediction error e X , e Y , e Z ;
[0006] S2, using a Bayesian optimizer to optimize the hyperparameters of LSTM to obtain a BO-LTSM model, inputting the training set into the BO-LTSM model for training, and inputting the prediction set into the trained BO-LTSM model for preliminary prediction to obtain the predicted output power;
[0007] S3, according to the reference value, using a time correlation model and a spatial correlation model to correct the predicted output power to obtain a photovoltaic power short-term prediction model;
[0008] S4. Evaluate the short-term photovoltaic power prediction model using mean absolute error, root mean square error, and mean absolute percentage error.
[0009] Preferably, distributed photovoltaic power stations in the same region that are similar to the target distributed photovoltaic power station at the same time are selected: the correlation coefficient between the predicted date and the historical date of the predicted distributed photovoltaic power station is calculated, and the historical date with a correlation coefficient greater than 0.7 is selected as the training date for time-related power; the correlation coefficient between the predicted distributed photovoltaic power station and the distributed photovoltaic power stations in the same region is calculated, and the distributed photovoltaic power stations with a correlation coefficient greater than 0.7 are selected as the training power stations for spatial-related power.
[0010] The preferred time-related model is as follows:
[0011] Let r be the daily photovoltaic power generation data sequence for the forecast date. 0,0 The daily photovoltaic power generation data sequence for the j-th day before or after the prediction time in the i-th year is r. i,j r 0,0 and r i,j The formula for calculating the correlation coefficient between them is as follows:
[0012]
[0013] Where cov represents covariance and Var represents variance.
[0014] Preferably, based on the determined application cycle scaling coefficient T and similarity scaling coefficient L, a reference matrix R is established using historical datasets to determine the photovoltaic power at the prediction time:
[0015]
[0016] Where T = 3; L = 2; r i,j Indicates the power of historical days;
[0017] Based on the reference matrix R, the reference value E ref The average of all elements in matrix R:
[0018]
[0019] Among them, C i,j This represents the correlation coefficient between historical dates and predicted dates.
[0020] The preferred spatial correlation model is as follows:
[0021] Let r0 be the daily photovoltaic power generation data sequence for the predicted date, and let r be the daily photovoltaic power generation data sequence of the i-th adjacent distributed photovoltaic power station at the same time. i r0 and r i The formula for calculating the correlation coefficient between them is as follows:
[0022]
[0023] wherein, r i represents the power of adjacent photovoltaic power station; C i represents the correlation coefficient of adjacent photovoltaic power station and the predicted target photovoltaic power station.
[0024] Preferably, the correction process using the time correlation model and the space correlation model is as follows:
[0025] S31, using the historical data of the target photovoltaic power station and the historical data of the adjacent power station, determining the correlation of the historical data and the target photovoltaic power station;
[0026] S32, using CRITIC method to optimize the best proportion of artificial intelligence model, time correlation model and space correlation model;
[0027] S33, analyzing and correcting the error of the photovoltaic power short-term prediction model.
[0028] Preferably, the specific steps of S32 are as follows:
[0029] a. Standardizing the selected data and indicators, selecting n groups of data and m indicators according to time arrangement and performing dimensionless processing;
[0030] b. Judging the evaluation intensity of the indicators, calculating the proportion of the i-th data under the j-th indicator in the indicator, and calculating the correlation coefficient of the j-th indicator;
[0031] c. Determining the weight of the photovoltaic power short-term prediction model, calculating the difference coefficient of the j-th indicator, and calculating the weight of each indicator.
[0032] Preferably, the analysis and correction of error in S33 include:
[0033] Using periodicity and regularity for analysis and correction, the formula is as follows:
[0034] Power=AX+BY+CZ+e
[0035] In the formula, X, Y and Z are respectively the predicted power of the deep learning model, the calculated power of the time correlation model and the calculated power of the space correlation model, and e is the residual term, wherein the formula of e is as follows:
[0036] e=Ae X +Be Y +Ce z
[0037] In the formula, e X , e Y , e ZRespectively, the prediction error of the deep learning model, the time correlation model calculation error, and the spatial correlation model calculation error.
[0038] A photovoltaic output power prediction system comprises the following contents:
[0039] A data acquisition unit is configured to acquire historical data of the photovoltaic power station and perform dimensionality reduction on the historical data.
[0040] A power prediction unit is configured to pre-train a photovoltaic power short-term prediction model.
[0041] A power correction unit is configured to correct the prediction result of the BO-LSTM network using the time correlation model and the spatial correlation model.
[0042] Therefore, the photovoltaic output power prediction method and system have the following advantages
[0043] Beneficial effects:
[0044] (1) The hyperparameters of the LSTM are optimized using the Bayesian optimizer, which solves the problem of overfitting of the traditional LSTM network in the actual training process.
[0045] (2) The time correlation model and the spatial correlation model are proposed, and the prediction result of the LSTM is corrected using the time-space correlation model.
[0046] (3) The spatial correlation model is proposed, which makes the distributed adjacent photovoltaic power stations connected, and can be used to assist the prediction of newly built distributed power stations, or to help evaluate the feasibility of the new power station by predicting the photovoltaic power of the new power station in advance before the new power station is built.
[0047] (4) The CRITIC method is used to optimize the best proportion of the artificial intelligence model, the time correlation model, and the spatial correlation model for the first time, which can greatly improve the prediction accuracy in combination with the Bayesian-optimized LSTM network.
[0048] The technical solutions of the present application will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 is a photovoltaic output power prediction method flowchart of an embodiment of the present application.
[0050] Figure 2 is a time-space correlation correction flowchart of an embodiment of the present application.
[0051] Figure 3 is a CRITIC method flowchart of an embodiment of the present application.
[0052] Figure 4The prediction power error diagram before and after the CRITIC method of the scheme of the embodiment of the present application is modified;
[0053] Figure 5 The prediction result schematic diagram of the scheme weight determination method of the embodiment of the present application in spring;
[0054] Figure 6 The prediction result schematic diagram of the scheme weight determination method of the embodiment of the present application in summer;
[0055] Figure 7 The prediction result schematic diagram of the scheme weight determination method of the embodiment of the present application in autumn;
[0056] Figure 8 The prediction result schematic diagram of the scheme weight determination method of the embodiment of the present application in winter;
[0057] Figure 9 The prediction error schematic diagram of the scheme of the embodiment of the present application in spring;
[0058] Figure 10 The prediction error schematic diagram of the scheme of the embodiment of the present application in summer;
[0059] Figure 11 The prediction error schematic diagram of the scheme of the embodiment of the present application in autumn;
[0060] Figure 12 The prediction error schematic diagram of the scheme of the embodiment of the present application in winter. DETAILED DESCRIPTION
[0061] EMBODIMENT
[0062] The technical scheme in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0063] WITH REFERENCE TO Figures 1-12 The present application discloses a photovoltaic output power prediction method, comprising the following steps:
[0064] S1, performing space-time processing on the original historical data set of photovoltaic power generation, dividing the processed original historical data set into a training set, a verification set and a prediction set, wherein the verification set is used to calculate the prediction error e X , e Y , e Z .
[0065] S2, the hyperparameters of the LSTM are optimized using a Bayesian optimizer to obtain a BO-LTSM model, the training set is input into the BO-LTSM model for training, and the prediction set is input into the trained BO-LTSM model for preliminary prediction to obtain the predicted output power.
[0066] Screening out the distributed photovoltaic power stations in the same region as the target distributed photovoltaic power station at the same time: the correlation coefficients of the predicted distributed photovoltaic power station prediction day and historical days are calculated, and the historical days with a correlation coefficient greater than 0.7 are selected as the training days of the time correlation power; the correlation coefficients of the predicted distributed photovoltaic power station and other distributed photovoltaic power stations in the same region are calculated, and the distributed photovoltaic power stations with a correlation coefficient greater than 0.7 are selected as the training power stations of the spatial correlation power.
[0067] S3, according to the reference value, the time correlation model and the spatial correlation model are used to correct the predicted output power to obtain a photovoltaic power short-term prediction model. The influence of annual cycle and adjacent similarity on PV prediction is discussed, and the CRITIC method, entropy method (EM), multiple linear regression (LC) and normalized parameter (NC) weighted summation are used to realize the fusion model.
[0068] The structure of the time correlation model is: assuming that the daily photovoltaic power generation data sequence of the prediction day is r 0,0 , the daily photovoltaic power generation data sequence of the jth day before (negative) or after (positive) the prediction time of the ith year is r i,j . The correlation coefficient between r 0,0 and r i,j can be calculated according to the following formula.
[0069]
[0070] In order to determine the reference value of the photovoltaic power output at a specific time, the periodic scale coefficient T and the similar scale coefficient L are applied to describe the data range we need. The periodic scale coefficient T determines the year of the historical data before and after the prediction time, and the similar scale coefficient L determines the number of days of the historical data before and after the prediction time. Both T and L are positive integers. Then according to the determined scale coefficient value, a reference matrix R for determining the photovoltaic power at the prediction time is established using the historical data. Taking T=3 and L=2 as an example, the created reference matrix R is shown as follows:
[0071]
[0072] Then according to the reference matrix R, the reference photovoltaic power data value E ref can be calculated as the average value of all elements in the matrix R.
[0073]
[0074] Wherein, the structure of the space correlation model is: assuming that the daily photovoltaic power generation data sequence of the prediction day is r0, the daily photovoltaic power generation data sequence of the adjacent i-th distributed photovoltaic power station at the same time is ri, and the correlation coefficient between r0and riis calculated according to the following formula. i i
[0075]
[0076] Wherein, the correction process using the space-time correlation model is: using the historical data of the target photovoltaic power station and the historical data of the adjacent power stations to determine the correlation thereof with the target photovoltaic power station, using the CRITIC method to optimize the best proportion of the artificial intelligence model, the time correlation model, and the space correlation model, and then analyzing the correction error, so that the prediction accuracy can be greatly improved.
[0077] Wherein, the method for analyzing the correction error is: in addition to being affected by weather changes and cloud movements, solar energy also shows strong periodicity and regularity. Therefore, comprehensively utilizing these two characteristics is of great significance to improve the prediction accuracy. The formula is as follows:
[0078] Power=AX+BY+CZ+e
[0079] In the formula, X, Y, and Z are respectively the power predicted by the deep learning model, the power calculated by the time correlation model, and the power calculated by the space correlation model, and e is the residual term, wherein the formula of e is:
[0080] e=Ae X +Be Y +Ce z
[0081] In the formula, e X , e Y , and e Z are respectively the prediction error of the deep learning model, the calculation error of the time correlation model, and the calculation error of the space correlation model.
[0082] The process of the CRITIC method is: selecting n groups of data (i.e. sequence data arranged according to time), m indexes (i.e. index 1: artificial intelligence algorithm prediction, index 2: time correlation model, and index 3: space correlation model), performing standardization processing (i.e. dimensionless processing in Figure 3 ), calculating the proportion of the i-th data under the j-th index to the index (i.e. calculating the index contrast intensity in Figure 3 . The greater S j is, the greater the difference in the value of the index is, the more information can be displayed, the stronger the evaluation intensity of the index itself is, and the greater the weight of the index is.), and calculating the correlation coefficient of the j-th index (r i,j The correlation coefficient between the evaluation indicators i and j is represented. The greater the correlation coefficient, the stronger the correlation with other indicators, the less conflict between the indicators and other indicators, the more the same information reflected, the higher the repeatability of the evaluation content that can be reflected, which to some extent weakens the evaluation strength of the indicators, and the weight of the indicators should be reduced), the difference coefficient of the jth indicator (that is, S j *R j The greater the difference coefficient, the greater the role of the jth evaluation indicator in the entire evaluation index system, and more weight should be allocated to it), and the weight of each indicator (that is, Figure 3 W j ).
[0083] S4, using Mean Absolute Error (MAE), Root Mean Square Error (RMSE) and Mean Absolute Percent Error (MAPE) to evaluate the short-term photovoltaic power prediction model.
[0084] The mean absolute error is the average of the absolute error, which can better reflect the actual situation of the prediction error, the root mean square error is the square root of the mean square error, and the root mean square deviation represents the sample standard deviation of the difference between the predicted value and the observed value, the smaller the value of the mean absolute percentage error in theory, the better the fitting effect of the prediction model, and the better the accuracy. The specific formula is:
[0085]
[0086]
[0087] Wherein, is the predicted power, y i is the actual power, and n is the sample size.
[0088] A photovoltaic output power prediction system, comprising:
[0089] A data acquisition unit for acquiring historical meteorological data of a photovoltaic power station and reducing the dimensionality of the historical meteorological data.
[0090] A power prediction unit for pre-training a photovoltaic power prediction model, taking the historical meteorological data as the model input, and obtaining a photovoltaic output power prediction result.
[0091] A power correction unit for correcting the prediction result of the LSTM network based on Bayesian optimization using a spatiotemporal correlation model.
[0092] In more embodiments, there are also provided:
[0093] An electronic device includes a memory and a processor, and computer instructions stored on the memory and run on the processor, when the computer instructions are run by the processor, the above method is completed. For brevity, it will not be described here.
[0094] In this embodiment, the processor can be a central processing unit CPU, and the processor can also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, ready programmable gate arrays FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0095] The memory can include read-only memory and random access memory, and provide instructions and data to the processor, and a part of the memory can also include non-volatile random access memory. For example, the memory can also store device type information.
[0096] A computer readable storage medium for storing computer instructions, when the computer instructions are executed by the processor, the above method is completed.
[0097] The above method can be directly embodied as hardware processor execution completion, or executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0098] Therefore, the photovoltaic output power prediction method and system can be used to assist in predicting new distributed power stations, or to help evaluate the feasibility of new power stations by predicting the photovoltaic power of new power stations in advance before the establishment of new power stations, so that the prediction accuracy can be greatly improved.
[0099] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application and not to limit them, although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can still be modified or replaced by equivalents, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present application.
Claims
1. A method for predicting photovoltaic output power, characterized in that, Includes the following steps: S1. Perform spatiotemporal processing on the original historical dataset of photovoltaic power generation, dividing the processed dataset into a training set, a validation set, and a prediction set. The validation set is used to calculate the prediction error e. x ,e y ,e z ; S2. Use the Bayesian optimizer to optimize the hyperparameters of the LSTM to obtain the BO-LTSM model. Input the training set into the BO-LTSM model for training. Use the prediction set into the trained BO-LTSM model for preliminary prediction to obtain the predicted output power. S3. Based on the reference value, the predicted output power is corrected using the time-related model and the spatial-related model to obtain the short-term prediction model for photovoltaic power. The correction process using time-dependent and space-dependent models is as follows: S31. Using historical data of the target photovoltaic power station and historical data of neighboring power stations, determine the correlation between historical data and the target photovoltaic power station; S32. Use the CRITIC method to optimize the optimal ratio of artificial intelligence models, time-related models, and space-related models; S33. Analyze and correct the errors of the short-term photovoltaic power prediction model; Analysis and correction errors include: The analysis and correction are performed using periodicity and regularity, as shown in the following formula: Power = AX + BY + CZ + e In the formula, X, Y, and Z represent the predicted power of the deep learning model and the calculated power of the time-dependent model, respectively. The space-dependent model calculates the power, where e is the remainder term, and the formula for e is: e=A ex +B ey +C ez In the formula, e x ,e y ,e z These are prediction errors of deep learning models, calculation errors of time-dependent models, and calculation errors of space-dependent models. The time-related model is as follows: Let r be the daily photovoltaic power generation data sequence for the forecast date. o,o The daily photovoltaic power generation data sequence for the j-th day before or after the prediction time in the i-th year is r. i,j ,r o,o and r i,j The formula for calculating the correlation coefficient between them is as follows: The spatially relevant models are as follows: Let r be the daily photovoltaic power generation data sequence for the forecast date. o The daily photovoltaic power generation data sequence of the i-th adjacent distributed photovoltaic power station at the same time is r. i ,r o and r i The formula for calculating the correlation coefficient between them is as follows: S4. Evaluate the short-term photovoltaic power prediction model using mean absolute error, root mean square error, and mean absolute percentage error. Select distributed photovoltaic power stations in the same area that are similar to the target distributed photovoltaic power station at the same time: calculate the correlation coefficient between the predicted date and the historical date of the predicted distributed photovoltaic power station, and select the historical date with a correlation coefficient greater than 0.7 as the training date for time-related power; calculate the correlation coefficient between the predicted distributed photovoltaic power station and the distributed photovoltaic power stations in the same area, and select the distributed photovoltaic power stations with a correlation coefficient greater than 0.7 as the training power stations for spatial-related power. Based on the determined application cycle scaling coefficient T and similarity scaling coefficient L, a reference matrix R is established using historical datasets to determine the photovoltaic power at the prediction time. Where T = 3; L = 2; Based on the reference matrix R, the reference value Eref is the average of all elements in matrix R: The specific steps of S32 are as follows: a. Standardize the selected data and indicators, select n sets of data and m indicators according to the time arrangement and perform dimensionless processing; b. Determine the evaluation strength of the indicators, calculate the proportion of the i-th data under the j-th indicator to that indicator, and calculate the correlation coefficient of the j-th indicator; c. Determine the weights of the short-term photovoltaic power prediction model, calculate the difference coefficient of the j-th indicator, and calculate the weight of each indicator.
2. A system applying the photovoltaic output power prediction method as described in claim 1, characterized in that, Includes the following: The data acquisition unit is used to acquire historical data of photovoltaic power plants and perform dimensionality reduction on the historical data; the power prediction unit is used for pre-trained short-term photovoltaic power prediction models. The power correction unit is used to correct the prediction results of the BO-LSTM network using time-dependent and spatial-dependent models.
Citation Information
Patent Citations
Ultra-short-term photovoltaic output prediction method considering space-time correlation between arrays
CN117035446A