Photovoltaic output power prediction method and system
By Bayesian optimization of LSTM model and time and space correlation model, and combined with CRITIC method to optimize the artificial intelligence model, the problem of insufficient time and space correlation in the prediction of photovoltaic power generation output power is solved, and the prediction accuracy and grid stability are significantly improved .
Patent Information
- Application Number
- CN202410905703.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-08
AI Technical Summary
The existing photovoltaic power output prediction methods are insufficient in the research on time correlation and spatial correlation, which leads to uncertainty and error in the prediction results, limiting the absorption of renewable energy and grid stability.
The Bayesian optimizer is used to optimize the LSTM model, combine the time-dependent model and the spatial correlation model to correct the photovoltaic output power, and use the CRITIC method to optimize the optimal proportion of the artificial intelligence model to improve the prediction accuracy.
It significantly improves the accuracy of photovoltaic output power prediction, reduces prediction errors, enhances the stability of the power grid and the ability to absorb renewable energy, and helps the construction of new distributed power stations for advance evaluation and prediction.
Smart Images

Figure CN118889378A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a photovoltaic output power prediction method and system. Background Art
[0002] Photovoltaic power generation is the use of photovoltaic effect to convert solar energy into electrical energy. It is one of the most promising renewable energy generation technologies. Among them, distributed photovoltaic power generation has developed rapidly in recent years due to its flexible scale and capacity design and variable energy utilization methods. However, factors such as solar irradiance and temperature will also affect the changes in photovoltaic output power, bringing severe challenges to the operation of the power grid. Therefore, photovoltaic power generation output power prediction has become one of the effective ways to solve this problem; but the increase in distributed photovoltaic power generation will bring some challenges and difficulties, mainly the stability of the power grid and the problem of power consumption. Due to the strong randomness and volatility of photovoltaic output, it will bring challenges to the safe operation and peak-shaving scheduling of the power grid. It will inevitably introduce prediction errors, increase the uncertainty of the 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 and fluctuating, solar energy also shows strong periodicity and regularity. Therefore, the comprehensive use of these two characteristics is meaningful to improve the forecast 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 of the invention
[0003] The purpose of the present invention is to provide a photovoltaic output power prediction method and system to solve the problems mentioned in the above background technology.
[0004] To achieve the above object, the present invention provides a photovoltaic output power prediction method, comprising the following steps:
[0005] S1. Perform spatiotemporal processing on the original historical data set of photovoltaic power generation, and divide the processed original historical data set into a training set, a validation set, and a prediction set, where the validation set is used to calculate the prediction error e X , e Y , e Z ;
[0006] S2. Use the Bayesian optimizer to optimize the hyperparameters of LSTM to obtain the BO-LTSM model. Input the training set into the BO-LTSM model for training. Use the prediction set to input into the trained BO-LTSM model for preliminary prediction to obtain the predicted output power.
[0007] S3. According to the reference value, the predicted output power is corrected using the time-related model and the space-related model to obtain a photovoltaic power short-term prediction model;
[0008] S4. The photovoltaic power short-term prediction model is evaluated using mean absolute error, root mean square error and mean absolute percentage error.
[0009] Preferably, the distributed photovoltaic power stations in the same area that are similar to the target distributed photovoltaic power station at the same moment are screened out: the correlation coefficient between the predicted day and the historical day of the predicted distributed photovoltaic power station is calculated, and the historical days with a correlation coefficient greater than 0.7 are screened out as training days for time-correlated power; the correlation coefficient between the predicted distributed photovoltaic power station and the distributed photovoltaic power stations in the same area is calculated, and the distributed photovoltaic power stations with a correlation coefficient greater than 0.7 are screened out as training stations for space-correlated power.
[0010] Preferably, the time-dependent model is as follows:
[0011] Assume that the daily photovoltaic power generation data sequence on the forecast day is r 0,0 , the daily photovoltaic power generation data sequence of the jth day before or after the prediction time of the previous i-th year is r i,j , r 0,0 and r i,j The correlation coefficient calculation formula is as follows:
[0012]
[0013] Among them, cov represents covariance and Var represents variance.
[0014] Preferably, according to the determined application cycle scale factor T and similarity scale factor L, a reference matrix R for determining the photovoltaic power at the prediction moment is established using the historical data set:
[0015]
[0016] Among them, T = 3; L = 2; r i,j Indicates the power of the historical day;
[0017] According to the reference matrix R, the reference value E ref is the average value of all elements in the matrix R:
[0018]
[0019] Among them, C i,j Represents the correlation coefficient between the historical day and the predicted day.
[0020] Preferably, the spatial correlation model is as follows:
[0021] Assume that the daily photovoltaic power generation data sequence of the forecast day is r0, and the daily photovoltaic power generation data sequence of the adjacent i-th distributed photovoltaic power station at the same time is r i , r0 and r i The correlation coefficient calculation formula is as follows:
[0022]
[0023] Among them, r i Indicates the power of the adjacent photovoltaic power station; C i Represents the correlation coefficient between the adjacent PV power station and the predicted target PV power station.
[0024] Preferably, the correction process using the time-dependent model and the space-dependent model is as follows:
[0025] S31, using historical data of the target photovoltaic power station and historical data of neighboring power stations to determine the correlation between the historical data and the target photovoltaic power station;
[0026] S32. Use the CRITIC method to optimize the optimal ratio of artificial intelligence model, time-related model, and space-related model;
[0027] S33. Analyze and correct errors in the photovoltaic power short-term prediction model.
[0028] Preferably, the specific steps of S32 are:
[0029] a. Standardize the selected data and indicators, select n groups of data and m indicators according to the time arrangement and perform dimensionless processing;
[0030] b. Determine the evaluation strength of the indicator, calculate the proportion of the i-th data under the j-th indicator, and calculate the correlation coefficient of the j-th indicator;
[0031] c. Determine the weight of the photovoltaic power short-term prediction model, calculate the difference coefficient of the jth indicator and calculate the weight of each indicator.
[0032] Preferably, the analysis and correction error in S33 includes:
[0033] The analysis and correction are performed using periodicity and regularity. The formula is as follows:
[0034] Power=AX+BY+CZ+e
[0035] In the formula, X, Y, and Z are respectively the prediction power of the deep learning model, the calculation power of the time-related model, and the calculation power of the space-related model, and e is the remainder, where the formula for e is:
[0036] e=Ae X +Be Y +Ce z
[0037] In the formula, e X , e Y , e ZThey are the prediction error of the deep learning model, the calculation error of the time-related model, and the calculation error of the space-related model.
[0038] A photovoltaic output power prediction system includes the following contents:
[0039] A data acquisition unit, used to acquire historical data of the photovoltaic power station and perform dimension reduction on the historical data;
[0040] Power prediction unit, used for pre-trained photovoltaic power short-term prediction model;
[0041] The power correction unit is used to correct the prediction results of the BO-LSTM network using the time correlation model and the space correlation model.
[0042] Therefore, the present invention adopts the above-mentioned photovoltaic output power prediction method and system, which has the following features:
[0043] Beneficial effects:
[0044] (1) The Bayesian optimizer is used to optimize the hyperparameters of LSTM, which solves the problem of overfitting in traditional LSTM networks during actual training.
[0045] (2) Propose a time-dependent model and a space-dependent model, and use the time-dependent model to correct the prediction results of LSTM;
[0046] (3) A spatial correlation model is proposed to establish a connection between adjacent distributed photovoltaic power stations, which can be used to assist in forecasting the construction of new distributed power stations or to help assess the feasibility of new power stations by predicting the photovoltaic power of new power stations in advance before they are built.
[0047] (4) The CRITIC method is used for the first time to optimize the optimal ratio of artificial intelligence models, time-related models, and space-related models. Combined with the above-mentioned Bayesian optimized LSTM network, the prediction accuracy can be greatly improved.
[0048] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flow chart of a photovoltaic output power prediction method according to an embodiment of the present invention;
[0050] Figure 2 A flow chart of spatiotemporal correlation correction according to an embodiment of the present invention;
[0051] Figure 3 is a flow chart of the CRITIC method of an embodiment of the present invention;
[0052] Figure 4It is a predicted power error diagram before and after correction of the CRITIC method of the embodiment of the present invention;
[0053] Figure 5 This is a schematic diagram of prediction results in spring using the method for determining the weight of a solution according to an embodiment of the present invention;
[0054] Figure 6 A schematic diagram of prediction results in summer of the method for determining the weight of a solution according to an embodiment of the present invention;
[0055] Figure 7 A schematic diagram of prediction results in autumn of a method for determining solution weights according to an embodiment of the present invention;
[0056] Figure 8 A schematic diagram of prediction results in winter of the method for determining the weight of a solution according to an embodiment of the present invention;
[0057] Fig. 9 A schematic diagram of prediction error of the solution of an embodiment of the present invention in spring;
[0058] Fig.10 A schematic diagram of prediction error of the solution of an embodiment of the present invention in summer;
[0059] Fig.11 A schematic diagram of the prediction error of the solution of an embodiment of the present invention in autumn;
[0060] Fig.12 This is a schematic diagram of the prediction error of the solution of an embodiment of the present invention in winter. DETAILED DESCRIPTION
[0061] Example
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] Reference Figure 1-Figure 12 The present invention discloses a photovoltaic output power prediction method, comprising the following steps:
[0064] S1. Perform spatiotemporal processing on the original historical data set of photovoltaic power generation, and divide the processed original historical data set into a training set, a validation set, and a prediction set, where the validation set is used to calculate the prediction error e X , e Y , e Z .
[0065] S2. Use the Bayesian optimizer to optimize the hyperparameters of LSTM to obtain the BO-LTSM model. Input the training set into the BO-LTSM model for training. Use the prediction set to input into the trained BO-LTSM model for preliminary prediction to obtain the predicted output power.
[0066] Screen out the 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 day and the historical day of the predicted distributed photovoltaic power station, and select the historical days with a correlation coefficient greater than 0.7 as the training days for time-related power; calculate the correlation coefficient between the predicted distributed photovoltaic power station and other 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 stations for space-related power.
[0067] S3. According to the reference value, the predicted output power is corrected using the time-related model and the space-related model to obtain the photovoltaic power short-term prediction model. The influence of the annual cycle and adjacent similarity on PV prediction is explored, and the fusion model is realized by using the CRITIC method, entropy method (EM), multivariate linear regression (LC) and normalized parameter (NC) weighted summation.
[0068] The structure of the time-dependent model is: Assume that the daily photovoltaic power generation data sequence on the forecast 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 previous i-th year is r i,j . r 0,0 and r i,j The correlation coefficient between them can be calculated according to the following formula.
[0069]
[0070] In order to determine the reference value of photovoltaic power output at a specific time, the periodic scale coefficient T and the similarity scale coefficient L are used to describe the data range we need. The periodic scale coefficient T determines the year of historical data before and after the prediction time, and the similarity scale coefficient L determines the number of days of historical data before and after the prediction time. T and L are both positive integers. Then, based on the determined scale coefficient value, a reference matrix R is established using historical data to determine the photovoltaic power at the prediction time. Taking T = 3 and L = 2 as an example, the reference matrix R created is 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 of all elements in the matrix R.
[0073]
[0074] The structure of the spatial correlation model is as follows: Assume that the daily photovoltaic power generation data sequence on the forecast day is r0, and the daily photovoltaic power generation data sequence of the adjacent i-th distributed photovoltaic power station at the same time is r i r0 and r i The correlation coefficient between them can be calculated according to the following formula.
[0075]
[0076] Among them, the correction process using the time-space correlation model is: using the historical data of the target photovoltaic power station and the historical data of the nearby power stations to determine their correlation with the target photovoltaic power station, using the CRITIC method to optimize the optimal ratio of the artificial intelligence model, the time-related model, and the space-related model, and then analyzing and correcting the errors, the prediction accuracy can be greatly improved.
[0077] Among them, the method of analyzing and correcting errors is: In addition to the fluctuations of weather changes and cloud movement, solar energy also shows strong periodicity and regularity. Therefore, the comprehensive use of 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 prediction power of the deep learning model, the calculation power of the time-related model, and the calculation power of the space-related model, and e is the remainder, where the formula for e is:
[0080] e=Ae X +Be Y +Ce z
[0081] In the formula, e X , e Y , e Z They are the prediction error of the deep learning model, the calculation error of the time-related model, and the calculation error of the space-related model.
[0082] The process of the CRITIC method is as follows: select n groups of data (i.e., sequence data arranged in time), m indicators (i.e., indicator 1: artificial intelligence algorithm prediction, indicator 2: time-related model, indicator 3: spatial correlation model), and perform standardization (i.e., Figure 3 ), calculate the proportion of the i-th data under the j-th indicator to the indicator (i.e. Figure 3 The comparison strength of the indicators is calculated in S j The larger the value, the greater the difference in the index value, the more information that can be displayed, the stronger the evaluation strength of the index itself, and the greater the weight given to the index. ) Calculate the correlation coefficient (r i,jThe larger the correlation coefficient is, the stronger the correlation is with other indicators, the less conflict there is between the indicator and other indicators, the more the same information is reflected, the higher the repetitiveness of the evaluation content can be reflected, and the evaluation strength of the indicator is weakened to a certain extent, and the weight of the indicator should be reduced). Calculate the difference coefficient of the jth indicator (i.e. S j *R j , the larger the difference coefficient, the greater the role of the jth evaluation index in the entire evaluation index system, and more weight should be assigned to it), and the weight of each index is calculated (i.e. Figure 3 Middle W j ).
[0083] S4. The photovoltaic power short-term prediction model is evaluated using the mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error (MAPE).
[0084] The mean absolute error is the average of the absolute errors, which can better reflect the actual situation of the prediction value error. The root mean square error is the square root of the mean square error. The root mean square deviation represents the sample standard deviation of the difference between the predicted value and the observed value. The smaller the mean absolute percentage error is in theory, the better the prediction model fits and has better accuracy. Specific formula:
[0085]
[0086]
[0087] in, is the predicted power, y i is the actual power and n is the number of samples.
[0088] A photovoltaic output power prediction system, comprising:
[0089] The data acquisition unit is used to acquire the historical meteorological data of the photovoltaic power station and perform dimension reduction on the historical meteorological data.
[0090] The power prediction unit is used for the pre-trained photovoltaic power prediction model, which takes the historical meteorological data as the model input to obtain the photovoltaic output power prediction result.
[0091] A power correction unit is used to correct the prediction results of the LSTM network based on Bayesian optimization using a spatiotemporal correlation model.
[0092] In further embodiments, there is also provided:
[0093] An electronic device includes a memory and a processor and a computer instruction stored in the memory and executed on the processor, and when the computer instruction is executed by the processor, the above method is performed. For the sake of brevity, it will not be described in detail here.
[0094] In this embodiment, the processor may be a central processing unit CPU, or may be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0095] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0096] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the above method is completed.
[0097] The above method can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0098] Therefore, the present invention adopts the above-mentioned photovoltaic output power prediction method and system, which can be used to assist in the prediction of newly built 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 building new power stations, which can greatly improve the prediction accuracy.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A photovoltaic output power prediction method, It is characterized in that The following steps are involved: S1. Perform spatiotemporal processing on the original historical data set of photovoltaic power generation, and divide the processed original historical data set into a training set, a validation set, and a prediction set, where 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 LSTM to obtain the BO-LTSM model. Input the training set into the BO-LTSM model for training. Use the prediction set to input into the trained BO-LTSM model for preliminary prediction to obtain the predicted output power. S3. According to the reference value, the predicted output power is corrected using the time-related model and the space-related model to obtain a photovoltaic power short-term prediction model; S4. The photovoltaic power short-term prediction model is evaluated using mean absolute error, root mean square error and mean absolute percentage error.
2. A photovoltaic output power prediction method according to claim 1, It is characterized in that Screen out the 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 day and the historical day of the predicted target distributed photovoltaic power station, and screen out the historical days with a correlation coefficient greater than 0.7 as the training days for time-correlated power; calculate the correlation coefficient between the predicted distributed photovoltaic power station and the distributed photovoltaic power stations in the same area, and screen out the distributed photovoltaic power stations with a correlation coefficient greater than 0.7 as the training stations for space-correlated power.
3. A photovoltaic output power prediction method according to claim 1, It is characterized in that The time-dependent model is as follows: Assume that the daily photovoltaic power generation data sequence on the forecast day is r 0,0 , the daily photovoltaic power generation data sequence of the jth day before or after the prediction time of the previous i-th year is r i,j , r 0,0 and r i,j The correlation coefficient calculation formula is as follows: Among them, cov represents covariance and Var represents variance.
4. A photovoltaic output power prediction method according to claim 1, Features: According to the determined application cycle scale factor T and similarity scale factor L, a reference matrix R for determining the photovoltaic power at the prediction moment is established using the historical data set: Among them, T = 3; L = 2; r i,j Indicates the power of the historical day; According to the reference matrix R, the reference value E ref is the average value of all elements in the matrix R: Among them, C i,j Represents the correlation coefficient between the historical day and the predicted day.
5. A photovoltaic output power prediction method according to claim 4, It is characterized in that The spatial correlation model is as follows: Assume that the daily photovoltaic power generation data sequence on the forecast day is r 0 , the daily photovoltaic power generation data sequence of the adjacent i-th distributed photovoltaic power station at the same time is r i , r 0 and r i The correlation coefficient calculation formula is as follows: Among them, r i Indicates the power of the adjacent photovoltaic power station; C i Represents the correlation coefficient between the adjacent PV power station and the predicted target PV power station.
6. A photovoltaic output power prediction method according to claim 5, It is characterized in that The correction process using the time-dependent model and the spatial-dependent model is as follows: S31, using historical data of the target photovoltaic power station and historical data of neighboring power stations to determine the correlation between the historical data and the target photovoltaic power station; S32. Use the CRITIC method to optimize the optimal ratio of artificial intelligence model, time-related model, and space-related model; S33. Analyze and correct errors in the photovoltaic power short-term prediction model.
7. A photovoltaic output power prediction method according to claim 6, It is characterized in that The specific steps of S32 are: a. Standardize the selected data and indicators, select n groups of data and m indicators according to the time arrangement and perform dimensionless processing; b. Determine the evaluation strength of the indicator, calculate the proportion of the i-th data under the j-th indicator, and calculate the correlation coefficient of the j-th indicator; c. Determine the weight of the photovoltaic power short-term prediction model, calculate the difference coefficient of the jth indicator and calculate the weight of each indicator.
8. A photovoltaic output power prediction method according to claim 7, It is characterized in that The analytical correction errors in S33 include: The analysis and correction are performed using periodicity and regularity. The formula is as follows: Power=AX+BY+CZ+e In the formula, X, Y, and Z are respectively the prediction power of the deep learning model, the calculation power of the time-related model, and the calculation power of the space-related model, and e is the remainder, where the formula for e is: and=Ae X +Be Y +Ce z In the formula, e X , e Y , e Z They are the prediction error of the deep learning model, the calculation error of the time-related model, and the calculation error of the space-related model.
9. A system using a photovoltaic output power prediction method as claimed in any one of claims 1 to 8, It is characterized in that Includes the following: A data acquisition unit, used to acquire historical data of the photovoltaic power station and perform dimension reduction on the historical data; Power prediction unit, used for pre-trained photovoltaic power short-term prediction model; The power correction unit is used to correct the prediction results of the BO-LSTM network using the time correlation model and the space correlation model.
Citation Information
Patent Citations
Short-term photovoltaic power prediction method and system considering spatial correlation
CN114372615A
Photovoltaic power prediction system based on depth spatial-temporal characteristics and effect decomposition
CN115713152A
Ultra-short-term photovoltaic output prediction method considering space-time correlation between arrays
CN117035446A
Photovoltaic generation power cooperative scheduling method and system based on reinforcement learning
CN118195206A
County-wide photovoltaic prediction method based on cluster division and data enhancement
WO2023201552A1
Cited By
Distributed photovoltaic consumption method and system for smart power grid
CN120749854A
