Distributed photovoltaic power generation power hierarchical aggregation prediction method, system and device and storage medium

By establishing a stack prediction model in a low-voltage distributed photovoltaic system, and using direct prediction and hierarchical aggregation methods, the problem that the existing technology is difficult to complete short-term prediction of power supply at different levels at the same time is solved, and efficient and accurate photovoltaic power generation prediction is achieved, supporting the stable operation of the power grid.

CN119651591AActive Publication Date: 2025-03-18NARI TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411798643.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-18
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

现有的光伏发电预测技术难以同时完成不同层级电源的短期预测,尤其是在低压分布式光伏系统中,由于数量多、地理分布广、气象条件变化多样,且现有地区调度系统软硬件环境限制,难以用一套模型参数进行有效预测。

Method used

Using a stack prediction model, by establishing a stack prediction model for all distributed photovoltaic power supplies, there is no need to define the model structure separately for each prediction object, and short-term prediction results for each level of power supply are obtained using direct prediction and hierarchical aggregation methods. The model includes a two-layer model structure. The first layer model consists of a random forest, a Lasso regression and an LSTM model, and the second layer model is a meta-model based on linear regression.

Benefits of technology

It has achieved simplified modeling and prediction processes while ensuring prediction accuracy. It is suitable for short-term power prediction in low-voltage station areas in different scenarios, and can effectively support the safe and stable operation of the regional power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119651591A_ABST
    Figure CN119651591A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed photovoltaic power generation power hierarchical aggregation prediction method, system and device, and a storage medium. The method comprises the steps of obtaining historical weather forecast, historical power generation data and future weather forecast; generating power, irradiance, temperature, humidity and startup capacity of the low-voltage photovoltaic power supply are extracted and processed to obtain historical sample data; cleaning historical sample data to obtain training sample data and dividing the training sample data; constructing a stack prediction model; establishing a stack prediction model for each low-voltage photovoltaic power supply; constructing a prediction sample for each low-voltage photovoltaic power supply based on future weather forecast, and substituting the prediction sample into the corresponding model to obtain a short-term prediction result of each distributed photovoltaic power supply; and layering and aggregating the short-term prediction results of all the low-voltage photovoltaic power supplies to obtain different levels of distributed photovoltaic future short-term aggregation prediction results. According to the method, a model structure does not need to be independently defined for each prediction object, and a direct prediction and hierarchical convergence method is adopted to obtain a short-term prediction result of each hierarchical power supply.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of photovoltaic power generation prediction, and specifically relates to a distributed photovoltaic power generation power hierarchical aggregation prediction method, system, equipment and storage medium. Background Art

[0002] With the continuous growth of global energy demand and the enhancement of environmental protection awareness, solar photovoltaic power generation, as a clean and renewable energy form, has received widespread attention and rapid development. In the context of large-scale access of low-voltage distributed photovoltaics to the power grid, the power dispatching system needs to balance power generation and consumption to ensure stable supply and demand, and needs to predict the power size of low-voltage distributed photovoltaics at different levels in the next few days. Existing photovoltaic prediction technologies include time series method, artificial intelligence method and neural network method, but most of them are model training and prediction for a single prediction object. There are many low-voltage distributed photovoltaics, with wide geographical distribution, diverse meteorological conditions and different physical properties. In addition, it is difficult to use a set of model parameters to complete the short-term prediction of different levels of power at the same time due to the limitations of the existing regional dispatching system hardware and software environment. Summary of the invention

[0003] Invention content: The purpose of the present invention is to provide a distributed photovoltaic power generation hierarchical aggregation prediction method, system, device and storage medium. By establishing a stacked prediction model for all distributed photovoltaics, there is no need to define a model structure for each prediction object separately. The direct prediction and hierarchical aggregation methods are used to obtain short-term prediction results for each level of power.

[0004] Technical solution: A distributed photovoltaic power generation power layered aggregation prediction method of the present invention comprises:

[0005] Data acquisition: Obtain historical weather forecasts, historical power generation data and future weather forecasts from low-voltage distributed photovoltaic ledger information, historical power data and numerical weather forecast data;

[0006] Acquisition of historical sample data: Extract the power generation, irradiance, temperature, humidity, and startup capacity of the low-voltage photovoltaic power source on the previous day from historical weather forecasts and historical power generation data; process the data to obtain historical sample data;

[0007] Acquisition and division of training sample data: Calculate the sunrise and sunset times of low-voltage photovoltaic power sources on different dates to obtain the sunrise and sunset time intervals, remove samples outside the sunrise and sunset time intervals from historical sample data, and remove samples with an output of 0 to obtain training sample data; divide the training sample data into a training set and a validation set in proportion;

[0008] Model construction: Construct a basic stacked combination model with two layers of models, where the first layer of models includes a random forest model, a Lasso regression model, and an LSTM model, and the second layer of models is a meta-model based on a linear regression model; use the training set to train each model in the first layer of models. During the training process, use the validation set to perform error evaluation and hyperparameter tuning on the first layer of models, and finally obtain the output features of the first layer of models; use the output features of the first layer of models and the training set to train the second layer of linear regression meta-model, and finally obtain a stacked prediction model;

[0009] Repeat all the above steps until the stack prediction model is established for all low-voltage photovoltaic power sources;

[0010] Direct prediction: Based on future weather forecasts, a prediction sample is constructed for each low-voltage photovoltaic power source, and each prediction sample is substituted into the corresponding stacked prediction model of the low-voltage photovoltaic power source to obtain the short-term prediction result of each low-voltage photovoltaic power source;

[0011] Convergence prediction: Establish a hierarchical relationship tree, and use the hierarchical relationship tree to aggregate the short-term prediction results of all low-voltage photovoltaic power sources in layers according to the hierarchical relationship, so as to obtain the convergence prediction results of the future short-term low-voltage photovoltaic power sources at different levels.

[0012] Furthermore, after processing the data, historical sample data is obtained, including:

[0013] The temperature and humidity data are normalized to zero mean, and the irradiance and power generation are normalized to maximum and minimum values. Finally, historical sample data are obtained through time crossover and linear interpolation.

[0014] Furthermore, the training set is used to train each model in the first layer model. During the training process, the validation set is used to perform error evaluation and hyperparameter tuning on the first layer model, and finally the output features of the first layer model are obtained, including:

[0015] Define the hyperparameters that need to be tuned for each model in the first layer and the value range of the hyperparameters, and construct the search space of the hyperparameters;

[0016] For each model m in the first layer model i , through the training set Completed model m i Initial training to obtain the model after initial training Through the validation set Evaluate the initially trained model The root mean square error Based on the grid search strategy, the hyperparameter values ​​are continuously adjusted to finally obtain the optimal hyperparameters with the smallest error. Right now With this optimal hyperparameter Train each of the preliminarily trained models in the first layer of models Get the first layer model Where i is the number of the first layer model, which can be 1, 2, or 3;

[0017] Finally, the output feature P of the first layer model is obtained 1,j , p 2,j , p 3,j}1≤j≤N}, where N is the number of training samples, and the output features of the first layer model are used as the input of the second layer model.

[0018] Furthermore, for each model m in the first layer model i , through the training set Completed model m i Initial training to obtain the model after initial training Through the validation set Evaluate the initially trained model The root mean square error Based on the grid search strategy, the hyperparameter values ​​are continuously adjusted to finally obtain the optimal hyperparameters with the smallest error. Right now include:

[0019] Based on the decision tree ensemble learning algorithm, the random forest model is trained and the training set Substitute into the random forest model to calculate the first prediction vector p1 = {p 1,j |1≤j≤N};

[0020] The Lasso regression model is obtained based on the coordinate axis descent method. Substitute into the Lasso regression model to calculate the second prediction vector p2 = {p 2,j |1≤j≤N};

[0021] Based on the training set Construct a multivariable multi-output training sample, set the historical time step and output step to be, use the multivariable multi-output training sample to train the LSTM model, calculate the loss based on the back propagation algorithm during the training process, and update the LSTM model parameters through the Adam algorithm, set the number of training rounds and the batch size per round, and after the training is completed, Substituting into the LSTM model, we get the third prediction vector p3 = {p 3,j |1≤j≤N};

[0022] Calculate the random forest model, Lasso regression model and LSTM model on the validation set respectively Root mean square error on :

[0023] The root mean square error value of each group of parameters is calculated by the root mean square error calculation formula, and the set Among them, Q is the parameter space; by selecting the parameter with the minimum root mean square error, the optimal parameter is obtained

[0024] Furthermore, the calculation formula of the root mean square error is as follows:

[0025]

[0026] Where n is the number of samples; P i is the prediction power of the i-th sample; R i is the measured power of the i-th sample; C i is the startup capacity of the i-th sample.

[0027] Furthermore, the output features of the first layer model and the training set are used to train the linear regression meta-model of the second layer, and finally a stacked prediction model is obtained, including:

[0028] Using the output feature P of the first layer model and the label value of the training set, the linear regression meta-model of the second layer is trained based on the least squares method, and finally a complete stacked prediction model is obtained.

[0029] Furthermore, a hierarchical relationship tree is established. By using the hierarchical relationship tree, the short-term prediction results of all low-voltage photovoltaic power sources are hierarchically aggregated according to the hierarchical relationship, and the convergent prediction results of the future short-term low-voltage photovoltaic power sources at different levels are obtained, including:

[0030] Extract the parent-child relationship pair from the data table related to the parent-child relationship of distributed photovoltaics to form<ID,FATHER_ID> A collection based on<ID,FATHER_ID> Construct a parent-child relationship tree from the set of and record the leaf node set and non-leaf node set;

[0031] Update the direct prediction results to the corresponding nodes in the relationship tree to ensure that all leaf nodes have direct prediction results. By default, the prediction curve is 0.

[0032] Based on the breadth-first search, starting from the root node, the node prediction curves of non-leaf nodes are traversed and calculated based on the accumulation method to obtain the converged prediction results.

[0033] Based on the same inventive concept, a distributed photovoltaic power generation hierarchical aggregation prediction system of the present invention comprises:

[0034] The data acquisition module is used to obtain historical weather forecasts, historical power generation data, and future weather forecasts from the distributed photovoltaic ledger information, distributed photovoltaic historical power data, and numerical weather forecast data of low-voltage distributed photovoltaics;

[0035] The historical sample data acquisition module is used to extract the power generation, irradiance, temperature, humidity, and startup capacity of the low-voltage photovoltaic power source predicted on the previous day from the historical weather forecast and historical power generation data; the historical sample data is obtained after the data is processed;

[0036] The training sample data acquisition and division module is used to calculate the sunrise and sunset times of the low-voltage photovoltaic power source on different dates, obtain the sunrise and sunset time interval, remove the samples outside the sunrise and sunset time interval from the historical sample data, and remove the samples with an output of 0 to obtain the training sample data; divide the training sample data into a training set and a validation set in proportion;

[0037] The model building and training module is used to build a basic stacked combination model with two layers of models, where the first layer of models includes a random forest model, a Lasso regression model and an LSTM model, and the second layer of models is a meta-model based on a linear regression model; each model in the first layer of models is trained using a training set, and during the training process, the first layer of models is evaluated for error and hyperparameters are tuned using a validation set, and the output features of the first layer of models are finally obtained; the output features of the first layer of models and the training set are used to train the second layer of linear regression meta-models, and finally a stacked prediction model is obtained; the stacked prediction model is established for all low-voltage photovoltaic power sources;

[0038] A direct prediction module is used to construct a prediction sample for each low-voltage photovoltaic power source based on future weather forecasts, substitute each prediction sample into the corresponding stacked prediction model of the low-voltage photovoltaic power source, and obtain a short-term prediction result for each low-voltage photovoltaic power source;

[0039] The convergence prediction module establishes a hierarchical relationship tree and uses the hierarchical relationship tree to aggregate the short-term prediction results of all low-voltage photovoltaic power sources in layers according to the hierarchical relationship to obtain the convergence prediction results of the future short-term low-voltage photovoltaic power sources at different levels.

[0040] Based on the same inventive concept, an electric load data clustering device of the present invention includes a processor and a memory, wherein the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the electronic device implements the steps of the above-mentioned distributed photovoltaic power generation hierarchical aggregation prediction method.

[0041] Based on the same inventive concept, a computer-readable storage medium of the present invention is characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned distributed photovoltaic power generation layered aggregation prediction method.

[0042] Beneficial effects: Compared with the prior art, the significant technical effects of the present invention are:

[0043] The stacked prediction model of the present invention is suitable for short-term power prediction of low-voltage substations in different scenarios. It is not necessary to define a model structure for each prediction object separately, and can simplify the modeling and prediction process while ensuring the prediction accuracy.

[0044] The method based on direct prediction and convergent prediction in the present invention is applicable to distributed photovoltaic prediction scenarios of different levels such as substations, feeders, busbars, substations, etc., providing a strong basis for the safe and stable operation of regional power grids. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic diagram of a process of a distributed photovoltaic power generation hierarchical aggregation prediction method disclosed in an embodiment of the present invention;

[0046] Figure 2 is a distribution diagram of the installed capacity of the low voltage area disclosed in the embodiment of the present invention;

[0047] Figure 3 It is a distribution diagram of prediction accuracy of the basic model and the stacked prediction model disclosed in the embodiment of the present invention in the low-voltage area;

[0048] Figure 4 The prediction accuracy distribution diagram of the upper power source obtained by respectively aggregating the prediction results of the basic model and the stacked prediction model;

[0049] Figure 5 It is a comparison diagram of the short-term prediction curve and the measured power generation curve of the basic model and the stacked combination model of a certain area on September 12, 2024 disclosed in an embodiment of the present invention;

[0050] Figure 6 It is a comparison diagram of the short-term prediction curve and the measured power generation curve of the basic model and the stacking combination model of a certain area on September 14, 2024 disclosed in an embodiment of the present invention;

[0051] Figure 7 It is a structural schematic diagram of a distributed photovoltaic power generation hierarchical aggregation prediction system disclosed in an embodiment of the present invention;

[0052] Figure 8 It is a structural schematic diagram of a distributed photovoltaic power generation layered aggregation prediction device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It will be understood by those skilled in the art that the purposes and advantages that can be achieved by the present invention are not limited to the specific description of the above beneficial effects, and the above and other purposes that can be achieved by the present invention will be more clearly understood based on the following detailed description.

[0054] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed in the present invention can be implemented in hardware, software or a combination of the two. Whether it is implemented in hardware or software depends on the specific application and design of the technical solution. Professional and technical personnel can use different methods to implement the functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0055] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0056] Example 1

[0057] See also Figure 1 , Figure 1 1 is a flow chart of a distributed photovoltaic power generation layered aggregation prediction method disclosed in an embodiment of the present invention. Figure 1 The distributed photovoltaic power generation hierarchical aggregation prediction method described is applied to power systems, such as low-voltage distributed photovoltaic power generation prediction, etc., and the embodiments of the present invention do not limit this. Figure 1 As shown, the distributed photovoltaic power generation hierarchical aggregation prediction method may include the following operations:

[0058] S1. Data acquisition: Obtain historical weather forecasts, historical power generation data, and future weather forecasts from distributed photovoltaic ledger information, distributed photovoltaic historical power data, and numerical weather forecast data of low-voltage distributed photovoltaics.

[0059] S2. Acquisition of historical sample data: Extract the power generation, irradiance, temperature, humidity, and startup capacity of a low-voltage photovoltaic power source on the previous day from historical weather forecasts and historical power generation data; and obtain historical sample data after processing the data.

[0060] Get the power generation, irradiance, temperature, humidity, and startup capacity of a forecast object no more than n days before the forecast date.

[0061] In this embodiment, the historical sample data is obtained after the data is processed, including:

[0062] The temperature and humidity data are normalized to zero mean, and the irradiance and power generation are normalized to maximum and minimum values. Finally, historical sample data is obtained through time crossover and linear interpolation.

[0063] S3. Acquisition and division of training sample data: Calculate the sunrise and sunset times of the low-voltage photovoltaic power source on different dates to obtain the sunrise and sunset time interval, remove samples outside the sunrise and sunset time interval from the historical sample data, and remove samples with an output of 0 to obtain training sample data; divide the training sample data into a training set and a validation set in proportion.

[0064] Divide historical sample data according to a certain proportion and time sequence Divide into training set and validation set The ratio factor is 4:1.

[0065] S4. Model construction: Construct a basic stacked combination model with two layers of models, where the first layer of models includes a random forest model, a Lasso regression model, and a LSTM model, and the second layer of models is a meta-model based on a linear regression model; use the training set to train each model in the first layer of models. During the training process, use the validation set to perform error evaluation and hyperparameter tuning on the first layer of models, and finally obtain the output features of the first layer of models; use the output features of the first layer of models and the training set to train the linear regression meta-model of the second layer, and finally obtain a stacked prediction model.

[0066] The specific process of step S4 is as follows:

[0067] S4.1. Construct a basic stacking combination model with two-layer models.

[0068] The first layer of models includes three models: random forest model, Lasso regression model and LSTM model. The second layer of models is a meta-model based on the linear regression model.

[0069] S4.2. Use the training set to train each model in the first layer. During the training process, use the validation set to perform error evaluation and hyperparameter tuning on the first layer model, and finally obtain the output features of the first layer model. The details are as follows:

[0070] S4.2.1. Define the hyperparameters that need to be tuned for each model in the first layer and the range of hyperparameter values, and construct the search space for hyperparameters. The definition is as follows:

[0071]

[0072] S4.2.2. For each model m in the first layer model i , through the training set Completed model m i Initial training to obtain the model after initial training Through the validation set Evaluate the initially trained model The root mean square error Based on the grid search strategy, the hyperparameter values ​​are continuously adjusted to finally obtain the optimal hyperparameters with the smallest error. Right now With this optimal hyperparameter Train each of the preliminarily trained models in the first layer of models Get the first layer model Among them, i is the label of the first layer model, which can be 1, 2, or 3.

[0073] The specific process of step S4.2.2 is as follows:

[0074] S4.2.2.1, Based on the decision tree ensemble learning algorithm, the random forest model is trained and the training set Substitute into the random forest model to calculate the first prediction vector p1 = {p 1,j |1≤j≤N};

[0075] S4.2.2.2, based on the coordinate axis descent method, the Lasso regression model is obtained and the training set Substitute into the Lasso regression model to calculate the second prediction vector p2 = {p 2,j |1≤j≤N};

[0076] S4.2.2.3. Based on training set Construct a multivariate multi-output training sample, set the historical time step to 96, the output step to 96, use the multivariate multi-output training sample to train the LSTM model, calculate the loss based on the back propagation algorithm during the training process, and update the LSTM model parameters through the Adam algorithm. Set the number of training rounds to 200, the batch size of each round to 128, and after the training, the training set Substituting into the LSTM model, we get the third prediction vector p3 = {p 3,j |1≤j≤N};

[0077] According to GB T 40607-2021 Technical Requirements for Wind Power or Photovoltaic Power Forecasting System on Dispatching Side, the random forest model, Lasso regression model and LSTM model were calculated on the validation set. The root mean square error on :

[0078]

[0079] Where n is the number of samples; P i is the prediction power of the i-th sample; R i is the measured power of the i-th sample; C i is the startup capacity of the i-th sample.

[0080] The root mean square error value of each group of parameters is calculated by the above formula, and the set Among them, Q is the parameter space; by selecting the parameter with the minimum root mean square error, the optimal parameter is obtained

[0081] S4.2.3, finally get the output feature P of the first layer model = {{p 1,j , p 2,j , p 3,j}|1≤j≤N}, where N is the number of training samples, and the output features of the first layer model are used as the input of the second layer model.

[0082] S4.3. Using the output features P of the first layer model and the training set Train the second layer of the linear regression meta-model Finally, a complete stacking prediction model is obtained.

[0083] In this embodiment, the output feature P of the first layer model and the label value of the training set are used to train the linear regression meta-model of the second layer based on the least squares method, and finally a complete stacking prediction model is obtained.

[0084] S5, repeating steps S1 to S4 until a stack prediction model is established for each low-voltage photovoltaic power source;

[0085] S6. Direct prediction: Based on future weather forecasts, a prediction sample is constructed for each low-voltage photovoltaic power source, and each prediction sample is substituted into the corresponding stacked prediction model of the low-voltage photovoltaic power source to obtain a short-term prediction result for each low-voltage photovoltaic power source;

[0086] S7. Convergence prediction: Establish a hierarchical relationship tree, and use the hierarchical relationship tree to aggregate the short-term prediction results of all low-voltage photovoltaic power sources in layers according to the hierarchical relationship to obtain the future short-term convergence prediction results of low-voltage photovoltaic power sources at different levels.

[0087] The specific process of step S7 is as follows:

[0088] S7.1. Extract the parent-child relationship pair from the data table related to the parent-child relationship of distributed photovoltaics to form<ID,FATHER_ID> A collection based on<ID,FATHER_ID> Construct a parent-child relationship tree from the set of and record the leaf node set and non-leaf node set;

[0089] S7.2, update the direct prediction results to the corresponding nodes in the relationship tree to ensure that all leaf nodes have direct prediction results. By default, the prediction curve is 0;

[0090] S7.3. Starting from the root node based on breadth-first search, traverse and calculate the node prediction curves of non-leaf nodes based on accumulation to obtain the converged prediction results.

[0091] The solution of the present invention is based on the ledger information, historical power generation data and weather forecast data of low-voltage distributed photovoltaics, and adopts direct prediction and hierarchical convergence methods to obtain the prediction results of power sources at each level. The direct prediction method is based on stacked multi-model combined prediction, and the prediction results of multiple different types of models such as random forest, Lasso, LSTM, etc. are linearly weighted to form the final prediction result to make up for the limitations of the prediction ability of a single model and improve the generalization ability of the overall model; hierarchical convergence aggregates the direct prediction results into the prediction results of the upper power source according to the hierarchical relationship, and finally obtains the short-term prediction results of distributed photovoltaics at different levels.

[0092] The distributed photovoltaic power generation power stratification aggregation prediction method of the present invention is verified by a specific embodiment below.

[0093] S1. Data acquisition:

[0094] Collect 96 points of measured power curves and measured startup capacity curves of 1,000 low-voltage areas in a certain city in Jiangsu from August 22, 2024 to September 22, 2024 for about 30 days (the installed capacity distribution is as follows Figure 2 as shown), and the corresponding historical meteorological data.

[0095] S2. Historical sample data acquisition:

[0096] By performing time crossover and linear interpolation on the collected data such as measured data, power-on capacity, and meteorological data, historical sample data including active power, irradiance, temperature, humidity, and power-on capacity are obtained;

[0097] S3. Acquisition and division of training sample data:

[0098] The historical sample data is divided based on the time sequence, and the prediction data is the next 10 days, that is, 00:00:00 on September 12, 2024 to 23:45:00 on September 21, 2024, with a total of 960 prediction curves. The training sample data is from 00:00:00 on August 22, 2024 to 23:45:00 on September 11, 2024. After the division is completed, the sunrise and sunset times corresponding to the sample data are calculated, and the training samples within the sunrise and sunset time interval and with an output greater than 0 are further selected to obtain the cleaned training sample data;

[0099] S4. Model construction:

[0100] The training sample data is further divided into training set and validation set in chronological order, with a sample ratio of 4:1. Hyperparameter tuning based on grid search strategy is carried out, using the training set to train the first-layer model, and the validation set to evaluate the prediction error of this set of hyperparameters, and finally a set of hyperparameters with the lowest error is obtained, and the first-layer model is retrained under this set of parameters; the output predicted by the first-layer model is used as the input feature to train the meta-model of the second layer, and finally a complete stacked combination model is obtained;

[0101] S5. Repeat all the above steps until the stack prediction model is established for each low-voltage photovoltaic power source.

[0102] S6 Direct Prediction:

[0103] Substitute the forecast data into the three basic models and the stacked combination model for forecasting, and obtain the direct forecast results of the four models. The forecast accuracy of the four models in the low-pressure area is calculated according to the following formula:

[0104] C R =1-E rmse

[0105] The following results are obtained:

[0106] Model Name Random Forest Lasso LSTM Stacked combination model Prediction accuracy of the area 93.10% 93.11% 92.99% 93.42%

[0107] S7 Convergence Forecast:

[0108] According to the hierarchical aggregation relationship, the prediction results of the upper power supply are obtained by aggregating the direct prediction results of the four models. The prediction accuracy is calculated as follows:

[0109] Model Name Random Forest Lasso LSTM Stacked combination model Upper layer prediction accuracy 94.89% 94.98% 94.72% 95.12%

[0110] The following is a brief analysis of the implementation results:

[0111] The stacked combination model has the highest accuracy in the station area prediction and convergence prediction results, which are 93.42% and 95.12% respectively, followed by Lasso and random forest, and the lowest is LSTM. Figure 3 and Figure 4 From the direct prediction and convergent prediction accuracy distribution diagrams shown, it can be observed that the accuracy distribution of the stacked combination model is relatively concentrated and stable, while the distribution of other basic models is relatively scattered, and there are extreme cases below 75% and 85% respectively.

[0112] Figure 5 and Figure 6They are the comparison diagrams of the short-term prediction curves and the measured power generation curves of the three basic models and the stacked combination model on September 12, 2024 and September 14, 2024. It can be seen from the figure that the prediction accuracy of the stacked combination model is better than that of other models as a whole, and the prediction curve is relatively smooth. The prediction results of other models are more volatile and have lower accuracy.

[0113] Example 2

[0114] See also Figure 7 , Figure 7 The present invention discloses a distributed photovoltaic power generation hierarchical aggregation prediction system, which can realize low-voltage distributed photovoltaic power generation prediction, and specifically includes:

[0115] The data acquisition module is used to obtain historical weather forecasts, historical power generation data, and future weather forecasts from the distributed photovoltaic ledger information, distributed photovoltaic historical power data, and numerical weather forecast data of low-voltage distributed photovoltaics;

[0116] The historical sample data acquisition module is used to extract the power generation, irradiance, temperature, humidity, and startup capacity of the low-voltage photovoltaic power source before the forecast date from the historical weather forecast and historical power generation data; the historical sample data is obtained after the data is processed;

[0117] The training sample data acquisition and division module is used to calculate the sunrise and sunset times of the low-voltage photovoltaic power source on different dates, obtain the sunrise and sunset time interval, remove the samples outside the sunrise and sunset time interval from the historical sample data, and remove the samples with an output of 0 to obtain the training sample data; divide the training sample data into a training set and a validation set in proportion;

[0118] The model building and training module is used to build a basic stacked combination model with two layers of models, where the first layer of models includes a random forest model, a Lasso regression model and an LSTM model, and the second layer of models is a meta-model based on a linear regression model; each model in the first layer of models is trained using a training set, and during the training process, the first layer of models is evaluated for error and hyperparameters are tuned using a validation set, and the output features of the first layer of models are finally obtained; the output features of the first layer of models and the training set are used to train the second layer of linear regression meta-models, and finally a stacked prediction model is obtained; the stacked prediction model is established for each low-voltage photovoltaic power source;

[0119] A direct prediction module is used to construct a prediction sample for each low-voltage photovoltaic power source based on future weather forecasts, substitute each prediction sample into the corresponding stacked prediction model of the low-voltage photovoltaic power source, and obtain a short-term prediction result for each low-voltage photovoltaic power source;

[0120] The convergence prediction module establishes a hierarchical relationship tree and uses the hierarchical relationship tree to aggregate the short-term prediction results of all low-voltage photovoltaic power sources in layers according to the hierarchical relationship to obtain the convergence prediction results of the future short-term low-voltage photovoltaic power sources at different levels.

[0121] In an optional embodiment, a distributed photovoltaic power generation hierarchical aggregation prediction method includes: a) obtaining historical weather forecasts, historical power generation data, and future weather forecasts; b) extracting the power generation power, irradiance, temperature, humidity, and startup capacity of a low-voltage photovoltaic power source before the forecast day from the historical weather forecasts and historical power generation data; processing the data to obtain historical sample data; c) cleaning the historical sample data, obtaining training sample data and dividing it; d) constructing a basic stacking combination model with two layers of models, wherein the first layer model includes a random forest model, a Lasso regression model, and an LSTM model, and the second layer model is a meta-model based on a linear regression model; training and optimizing the basic stacking combination model; e) repeating all the above steps until a stacking prediction model is established for each low-voltage photovoltaic power source; f) based on the future weather forecast, constructing a prediction sample for each distributed photovoltaic, substituting each prediction sample into the corresponding distributed photovoltaic stacking prediction model, and obtaining a short-term prediction result for each distributed photovoltaic; g) establishing a hierarchical relationship tree, and using the hierarchical relationship tree, hierarchically aggregating the short-term prediction results of all distributed photovoltaics according to the hierarchical relationship, and obtaining the future short-term converged prediction results of distributed photovoltaics at different levels.

[0122] Example 3

[0123] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of a distributed photovoltaic power generation layered aggregation prediction device disclosed in an embodiment of the present invention. Figure 8 The described device can be applied to power systems, such as for low-voltage distributed photovoltaic power generation prediction, etc., which is not limited in the embodiments of the present invention.

[0124] like Figure 8 As shown, the device may include a processor and a memory, wherein the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the electronic device implements the steps of the method described in the above embodiment and can achieve the technical effect consistent with the above method.

[0125] The memory may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the memory may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). A program / utility having a set (at least one) of program modules may be stored in, for example, the memory, such program modules including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment. The program modules typically perform the functions and / or methods in the embodiments described herein.

[0126] The processor executes various functional applications and data processing by running the program stored in the memory, such as implementing the method provided in the first embodiment of the present invention.

[0127] Example 4

[0128] Embodiment 4 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method described in the above embodiment are implemented and the technical effect consistent with the above method can be achieved.

[0129] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.

[0130] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0131] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0132] Computer program code for performing the operation of the present invention may be written in one or more programming languages ​​or combinations thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0133] Of course, the storage medium containing computer executable instructions provided by an embodiment of the present invention, whose computer executable instructions are not limited to the above method operations, can also execute related operations in the method provided by any embodiment of the present invention.

[0134] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A distributed photovoltaic power generation power layered aggregation prediction method, characterized in that: include: Data acquisition: Obtain historical weather forecasts, historical power generation data and future weather forecasts from low-voltage distributed photovoltaic ledger information, historical power data and numerical weather forecast data; Acquisition of historical sample data: Extract the predicted power generation, irradiance, temperature, humidity, and startup capacity of the low-voltage photovoltaic power source on the previous day from historical weather forecasts and historical power generation data; and obtain historical sample data after processing the data; Acquisition and division of training sample data: Calculate the sunrise and sunset times of low-voltage photovoltaic power sources on different dates to obtain the sunrise and sunset time intervals, remove samples outside the sunrise and sunset time intervals from historical sample data, and remove samples with an output of 0 to obtain training sample data; divide the training sample data into a training set and a validation set in proportion; Model construction and training: Build a basic stacked combination model with two layers of models, where the first layer of models includes a random forest model, a Lasso regression model, and an LSTM model, and the second layer of models is a meta-model based on a linear regression model; use the training set to train each model in the first layer of models. During the training process, use the validation set to perform error evaluation and hyperparameter tuning on the first layer of models, and finally obtain the output features of the first layer of models; Use the output features of the first-layer model and the training set to train the linear regression meta-model of the second layer, and finally obtain the stacked prediction model; Repeat all the above steps until a stack prediction model is established for each low-voltage photovoltaic power source; Direct prediction: Based on future weather forecasts, a prediction sample is constructed for each low-voltage photovoltaic power source, and each prediction sample is substituted into the corresponding stacked prediction model of the low-voltage photovoltaic power source to obtain the short-term prediction result of each low-voltage photovoltaic power source; Convergence prediction: Establish a hierarchical relationship tree, and use the hierarchical relationship tree to aggregate the short-term prediction results of all low-voltage photovoltaic power sources in layers according to the hierarchical relationship, so as to obtain the convergent prediction results of the future short-term low-voltage photovoltaic power sources at different levels.

2. The distributed photovoltaic power generation power layered aggregation prediction method according to claim 1 is characterized in that: After processing the data, historical sample data is obtained, including: The temperature and humidity data are normalized to zero mean, and the irradiance and power generation are normalized to maximum and minimum values. Finally, historical sample data are obtained through time crossover and linear interpolation.

3. The distributed photovoltaic power generation power hierarchical aggregation prediction method according to claim 1 is characterized in that: Use the training set to train each model in the first layer. During the training process, use the validation set to perform error evaluation and hyperparameter tuning on the first layer model, and finally obtain the output features of the first layer model, including: Define the hyperparameters that need to be tuned for each model in the first layer and the value range of the hyperparameters, and construct the search space of the hyperparameters; For each model m in the first layer model i , through the training set Completed model m i Initial training to obtain the model after initial training Through the validation set Evaluate the initially trained model The root mean square error Based on the grid search strategy, the hyperparameter values ​​are continuously adjusted to finally obtain the optimal hyperparameters with the smallest error. Right now With this optimal hyperparameter Train each of the preliminarily trained models in the first layer of models Get the first layer model Where i is the number of the first layer model, which can be 1, 2, or 3; Finally, the output feature P of the first layer model is obtained 1,j ,p 2,j ,p 3,j }|1≤j≤N}, where N is the number of training samples, and the output features of the first layer model are used as the input of the second layer model.

4. The distributed photovoltaic power generation power layered aggregation prediction method according to claim 3 is characterized in that: For each model m in the first layer model i , through the training set Completed model m i Initial training to obtain the model after initial training Through the validation set Evaluate the initially trained model The root mean square error Based on the grid search strategy, the hyperparameter values ​​are continuously adjusted to finally obtain the optimal hyperparameters with the smallest error. Right now include: Based on the decision tree ensemble learning algorithm, the random forest model is trained and the training set Substitute into the random forest model to calculate the first prediction vector p1 = {p 1,j |1≤j≤N}; The Lasso regression model is obtained based on the coordinate axis descent method. Substitute into the Lasso regression model to calculate the second prediction vector p2 = {p 2,j |1≤j≤N}; Based on the training set Construct a multivariable multi-output training sample, set the historical time step and output step to be, use the multivariable multi-output training sample to train the LSTM model, calculate the loss based on the back propagation algorithm during the training process, and update the LSTM model parameters through the Adam algorithm, set the number of training rounds and the batch size per round, and after the training is completed, Substituting into the LSTM model, we get the third prediction vector p3 = {p 3,j |1≤j≤N}; Calculate the random forest model, Lasso regression model and LSTM model on the validation set respectively Root mean square error on : The root mean square error value of each group of parameters is calculated by the root mean square error calculation formula, and the set Among them, Q is the parameter space; by selecting the parameters with the minimum root mean square error, the optimal parameters are obtained.

5. The distributed photovoltaic power generation power layered aggregation prediction method according to claim 4 is characterized in that: The calculation formula of the root mean square error is as follows: Where n is the number of samples; P i is the prediction power of the i-th sample; R i is the measured power of the i-th sample; C i is the startup capacity of the i-th sample.

6. The distributed photovoltaic power generation power layered aggregation prediction method according to claim 3 is characterized in that: The output features of the first layer model and the training set are used to train the linear regression meta-model of the second layer, and finally a stacked prediction model is obtained, including: Using the output feature P of the first layer model and the label value of the training set, the linear regression meta-model of the second layer is trained based on the least squares method, and finally a complete stacked prediction model is obtained.

7. The distributed photovoltaic power generation power layered aggregation prediction method according to claim 1 is characterized in that: A hierarchical relationship tree is established. By using the hierarchical relationship tree, the short-term prediction results of all low-voltage photovoltaic power sources are aggregated in layers according to the hierarchical relationship, and the convergent prediction results of the future short-term low-voltage photovoltaic power sources at different levels are obtained, including: Extract the parent-child relationship pair from the data table related to the parent-child relationship of distributed photovoltaics to form<ID,FATHER_ID> A collection based on<ID,FATHER_ID> Construct a parent-child relationship tree from the set of and record the leaf node set and non-leaf node set; Update the direct prediction results to the corresponding nodes in the relationship tree to ensure that all leaf nodes have direct prediction results. By default, the prediction curve is 0. Based on the breadth-first search, starting from the root node, the node prediction curves of non-leaf nodes are traversed and calculated based on the accumulation method to obtain the converged prediction results.

8. A distributed photovoltaic power generation power stratification aggregation prediction system, characterized in that: include: The data acquisition module is used to obtain historical weather forecasts, historical power generation data and future weather forecasts from the ledger information, historical power data and numerical weather forecast data of low-voltage distributed photovoltaics; The historical sample data acquisition module is used to extract the power generation, irradiance, temperature, humidity, and startup capacity of the low-voltage photovoltaic power source predicted on the previous day from the historical weather forecast and historical power generation data; the historical sample data is obtained after the data is processed; The training sample data acquisition and division module is used to calculate the sunrise and sunset times of the low-voltage photovoltaic power source on different dates, obtain the sunrise and sunset time interval, remove the samples outside the sunrise and sunset time interval from the historical sample data, and remove the samples with an output of 0 to obtain the training sample data; divide the training sample data into a training set and a validation set in proportion; The model building and training module is used to build a basic stacked combination model with two layers of models, where the first layer of models includes a random forest model, a Lasso regression model, and an LSTM model, and the second layer of models is a meta-model based on a linear regression model; each model in the first layer of models is trained using the training set, and during the training process, the first layer of models is evaluated for error and hyperparameters are tuned using the validation set, and finally the output features of the first layer of models are obtained; The output features of the first-layer model and the training set are used to train the linear regression meta-model of the second layer, and finally a stacking prediction model is obtained; the stacking prediction model is established for all low-voltage photovoltaic power sources; The direct prediction module is used to construct prediction samples for each distributed photovoltaic power source based on future weather forecasts, and substitute each prediction sample into the stack prediction model of the corresponding low-voltage photovoltaic power source to obtain the short-term prediction results of each low-voltage photovoltaic power source; The convergence prediction module is used to establish a hierarchical relationship tree. By using the hierarchical relationship tree, the short-term prediction results of all low-voltage photovoltaic power sources are aggregated in layers according to the hierarchical relationship to obtain the convergence prediction results of the future short-term low-voltage photovoltaic power sources at different levels.

9. A distributed photovoltaic power generation power stratification aggregation prediction device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the electronic device implements the steps of the distributed photovoltaic power generation layered aggregation prediction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the distributed photovoltaic power generation layered aggregation prediction method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Ultra-short-term photovoltaic power generation power prediction method and device and storage medium

    CN116470486A

  • Prediction method for photovoltaic power generation

    CN116760017A

  • Short-term photovoltaic power generation power prediction method, system and equipment based on similar weather discovery and medium

    CN118213987A

  • Distributed photovoltaic cluster generation power prediction method and system

    CN118711037A

  • Hybrid photovoltaic power prediction method and system based on multi-source data fusion

    US20220373984A1