A distributed photovoltaic power hierarchical aggregation prediction method, system, device and storage medium

By constructing a stacked combination prediction model of two-layer models, the short-term prediction problem of multiple prediction objects in low-voltage distributed photovoltaic systems is solved, and accurate power prediction and hierarchical aggregation are achieved, which is suitable for the safe and stable operation of the power grid.

CN119651591BActive Publication Date: 2025-10-17NARI TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing photovoltaic prediction technologies have difficulty in achieving short-term predictions for multiple prediction objects in low-voltage distributed photovoltaic systems. In particular, due to their large number, wide geographical distribution, and diverse meteorological conditions, it is difficult to simultaneously complete predictions for power sources at different levels using a set of model parameters.

Method used

A stacked prediction model is adopted to construct a basic stacked combination model of two-layer models, including random forest model, Lasso regression model and LSTM model, combined with linear regression meta-model, to perform direct prediction and hierarchical aggregation to obtain the short-term prediction results of power supply at each level.

Benefits of technology

It realizes short-term power prediction of low-voltage substations under different scenarios, simplifies the modeling process, improves prediction accuracy, and is applicable to distributed photovoltaic prediction at different levels such as substations, feeders, busbars, and substations, providing a basis for the safety and stability of regional power grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119651591B_ABST
    Figure CN119651591B_ABST
Patent Text Reader

Abstract

The application discloses a kind of distributed photovoltaic power generation power layering aggregation prediction method, system, equipment and storage medium, the method includes: obtaining historical weather forecast, historical power generation data, future weather forecast;Extract the power generation power of low-voltage photovoltaic power supply, irradiance, temperature, humidity, start capacity, and obtain historical sample data by processing;Clean historical sample data to obtain training sample data and divide;Stacked prediction model is constructed;For each low-voltage photovoltaic power supply, establish stacked prediction model;Based on future weather forecast, construct prediction sample for each low-voltage photovoltaic power supply, substitute into corresponding model, obtain the short-term prediction result of each distributed photovoltaic;The short-term prediction result of all low-voltage photovoltaic power supply is layered aggregation, and the short-term convergence prediction result of different levels of distributed photovoltaic in the future is obtained.The application does not need to define model structure for each prediction object alone, and the short-term prediction result of each level power supply is obtained by using direct prediction and hierarchical convergence method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of photovoltaic power generation prediction, and particularly relates to a distributed photovoltaic power generation power hierarchical aggregation prediction method, system, device and storage medium. BACKGROUND

[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 been widely concerned and rapidly developed. Under the background of large-scale access of low-voltage distributed photovoltaic to the power grid, the power dispatching system needs to balance power supply and demand to ensure stability, and needs to predict the power size of low-voltage distributed photovoltaic at different levels in the next few days. Existing photovoltaic prediction technologies include time series method, artificial intelligence method and neural network method, etc., but most of them are for single prediction object model training and prediction. Low-voltage distributed photovoltaic has many numbers, wide geographical distribution, diverse weather conditions and different physical properties. In addition, due to the limitation of the existing regional dispatching system software and hardware environment, it is difficult to complete short-term prediction of different levels of power supply with a set of model parameters. SUMMARY

[0003] SUMMARY: The purpose of the present application is to provide a distributed photovoltaic power generation power hierarchical aggregation prediction method, system, device and storage medium, which establishes a stacked prediction model for all distributed photovoltaic, does not need to define a model structure for each prediction object alone, and adopts a direct prediction and hierarchical aggregation method to obtain short-term prediction results of each level of power supply.

[0004] TECHNICAL SCHEME: The distributed photovoltaic power generation power hierarchical aggregation prediction method of the present application comprises:

[0005] Data acquisition: from the account information, historical power data and numerical weather forecast data of low-voltage distributed photovoltaic, historical weather forecast, historical power generation data and future weather forecast are obtained;

[0006] Historical sample data acquisition: the power generation power, irradiance, temperature, humidity and on-off capacity of a low-voltage photovoltaic power supply before the prediction day are extracted from the historical weather forecast and historical power generation data; after processing the data, historical sample data are obtained;

[0007] Training sample data acquisition and division: the sunrise and sunset time of the low-voltage photovoltaic power supply on different dates is calculated, the sunrise and sunset time interval is obtained, samples outside the sunrise and sunset time interval are removed from the historical sample data, samples with output of 0 are removed, and training sample data are obtained; the training sample data are divided into a training set and a validation set in proportion;

[0008] Model construction: a base stack combination model with two layers of models is constructed, wherein 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; the training set is used to train each model in the first layer of models, and in the training process, the validation set is used to evaluate the errors of the first layer of models and optimize the hyperparameters, and finally the output features of the first layer of models are obtained; the output features of the first layer of models and the training set are used to train the linear regression meta-model of the second layer, and finally the stack prediction model is obtained;

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

[0010] Direct prediction: based on the future weather forecast, a prediction sample is constructed for each low-voltage photovoltaic power supply, each prediction sample is substituted into the stack prediction model of the corresponding low-voltage photovoltaic power supply, and the short-term prediction result of each low-voltage photovoltaic power supply is obtained;

[0011] Aggregated prediction: a hierarchical relationship tree is established, and the hierarchical relationship tree is used to hierarchically aggregate the short-term prediction results of all low-voltage photovoltaic power supplies according to the hierarchical relationship, and the short-term aggregated prediction results of the low-voltage photovoltaic power supplies at different levels are obtained.

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

[0013] The temperature and humidity data are subjected to zero-mean standardization processing, and the irradiance and power generation are subjected to maximum-minimum standardization processing, and finally the historical sample data is obtained through time cross and linear interpolation.

[0014] Further, the training set is used to train each model in the first layer of models, and in the training process, the validation set is used to evaluate the errors of the first layer of models and optimize the hyperparameters, and finally the output features of the first layer of models are obtained, including:

[0015] The hyperparameters to be optimized and the value range of the hyperparameters of each model in the first layer of models are defined respectively, and the search space of the hyperparameters is constructed;

[0016] For each model m i in the first layer of models, the training set is used to complete the preliminary training of the model m i to obtain the preliminary trained model The validation set is used to evaluate the root mean square error of the preliminary trained model Based on the grid search strategy, the hyperparameter value is continuously adjusted, and finally the optimal hyperparameter with the minimum error is obtained That is the optimal hyperparameter training each of the preliminary trained models in the first layer of models obtaining the first layer of models wherein i is the index of the first layer of models, taking 1, 2, 3;

[0017] finally obtaining the output features P = {p 1,j , p 2,j , p 3,j} of the first layer of models, wherein N is the number of training samples, and the output features of the first layer of models are taken as the input of the second layer of models.

[0018] Further, for each model m i in the first layer of models, the training set is used to complete the preliminary training of the model m i to obtain a preliminary trained model The preliminary trained model is evaluated by the validation set to obtain the root mean square error of the preliminary trained model Based on the grid search strategy, the hyperparameter values are continuously adjusted, and finally the optimal hyperparameters with the smallest error are obtained including:

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

[0020] Based on the coordinate descent method, a Lasso regression model is obtained, and the training set is substituted into the Lasso regression model to obtain the second prediction vector p2 = {p 2,j |1≤j≤N};

[0021] Based on the training set , a multivariate multi-output training sample is constructed, the history time step is set to and the output step is set to, the LSTM model is trained using the multivariate multi-output training sample, during the training process, the loss is calculated based on the back propagation algorithm, and the LSTM model parameters are updated by the Adam algorithm, the number of training rounds and the batch size of each round are set, and after the training is completed, the training set is substituted into the LSTM model to obtain the third prediction vector p3 = {p 3,j |1≤j≤N};

[0022] The root mean square errors of the random forest model, the Lasso regression model and the LSTM model on the validation set are calculated respectively:

[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 is obtained The optimal parameter is obtained by selecting the parameter with the minimum root mean square error

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

[0025]

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

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

[0028] The output features P of the first layer model and the label values of the training set are used to train the second layer linear regression meta-model based on the least squares method, and finally the complete stacked prediction model is obtained.

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

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

[0031] Update the direct prediction result to the corresponding node in the relationship tree, ensure that the leaf node has a direct prediction result, and the default prediction curve is 0;

[0032] Based on the breadth-first search from the root node, traverse and calculate the node prediction curve of the non-leaf node based on the accumulated manner, to obtain the aggregated prediction result.

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

[0034] The data acquisition module is used to acquire historical weather forecast, historical power generation data and future weather forecast from the distributed photovoltaic account information, distributed photovoltaic historical power data and numerical weather forecast data of low-voltage distributed photovoltaic.

[0035] A historical sample data acquisition module is configured to extract predicted daily low-voltage photovoltaic power generation, irradiance, temperature, humidity and starting capacity from historical weather forecasts and historical power generation data, and obtain historical sample data after processing the data;

[0036] A training sample data acquisition and division module is configured to calculate sunrise and sunset times of low-voltage photovoltaic power sources on different days, obtain a sunrise and sunset time interval, eliminate samples outside the sunrise and sunset time interval from historical sample data, eliminate samples with an output of 0, and obtain training sample data; and divide the training sample data into a training set and a validation set according to a proportion.

[0037] A model construction and training module is configured to construct a basic stacked combination model with two layers, 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; the training set is used to train each model in the first layer model, and in the training process, the validation set is used to evaluate the error of the first layer model and optimize the hyperparameters, and finally the output features of the first layer model 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 stacked prediction model is obtained; and the stacked prediction model is established for all low-voltage photovoltaic power sources.

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

[0039] A convergence prediction module is configured to establish a hierarchical relationship tree, and to obtain a short-term convergence prediction result of low-voltage photovoltaic power sources at different levels by hierarchically aggregating the short-term prediction results of all low-voltage photovoltaic power sources according to the hierarchical relationship.

[0040] Based on the same inventive concept, an electric load data clustering device of the present application comprises a processor and a memory, the memory stores computer instructions, and the processor is configured to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the electronic device realizes the steps of the distributed photovoltaic power generation power hierarchical aggregation prediction method.

[0041] Based on the same inventive concept, a computer readable storage medium of the present application, characterized in that the computer readable storage medium stores a computer program, and when the program is executed by a processor, the steps of the distributed photovoltaic power generation power hierarchical aggregation prediction method are realized.

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

[0043] The stacked prediction model of the application is suitable for low-voltage area short-term power prediction in different scenarios, does not need to define a model structure for each prediction object, and can simplify the modeling and prediction process while ensuring prediction accuracy.

[0044] The method based on direct prediction and convergence prediction of the application is suitable for distributed photovoltaic prediction scenarios of different hierarchical types such as areas, feeders, buses and substations, and provides a strong basis for safe and stable operation of regional power grids. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 is a flowchart of a distributed photovoltaic power hierarchical aggregation prediction method disclosed by an embodiment of the application;

[0046] Figure 2 is a distribution diagram of low-voltage area installed capacity disclosed by an embodiment of the application;

[0047] Figure 3 is a prediction accuracy distribution diagram of a low-voltage area for a basic model and a stacked prediction model disclosed by an embodiment of the application;

[0048] Figure 4 is a prediction accuracy distribution diagram of an upper-layer power supply obtained by converging the prediction results of the basic model and the stacked prediction model, respectively;

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

[0050] Figure 6 is a comparison diagram of short-term prediction curves and measured power generation curves of a basic model and a stacked combination model of a certain area on September 14, 2024, disclosed by an embodiment of the application;

[0051] Figure 7 is a structural diagram of a distributed photovoltaic power hierarchical aggregation prediction system disclosed by an embodiment of the application;

[0052] Figure 8 is a structural diagram of a distributed photovoltaic power hierarchical aggregation prediction device disclosed by an embodiment of the application. DETAILED DESCRIPTION

[0053] The application will be described in detail below with reference to the accompanying drawings and specific embodiments. Those skilled in the art will understand that the purposes and advantages that can be achieved by the application are not limited to the above specific descriptions, and the above and other purposes that can be achieved by the application will be more clearly understood according to the following detailed description.

[0054] Those of ordinary skill in the art will realize and appreciate that the various illustrative components, systems, methods, and functions described in connection with the embodiments disclosed herein can be implemented in hardware, software, or their combination. The manner in which the functionality is implemented depends upon the particular application and design constraints imposed on the overall system. Skilled persons can implement the described functionality in varying ways for each particular application, but such implementation should not be interpreted as a departure from the scope of the present application.

[0055] Reference to an "embodiment" in this disclosure means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase that the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of other embodiments. It is explicitly stated that the described embodiments are combinable with each other.

[0056] Embodiment 1

[0057] Please refer to Figure 1 , Figure 1 is a flowchart of a distributed photovoltaic power hierarchical aggregation prediction method disclosed by an embodiment of the application. Wherein, Figure 1 The distributed photovoltaic power hierarchical aggregation prediction method described is applied in a power system, such as low-voltage distributed photovoltaic power prediction, and the like, without limitation of embodiments of the application. As shown in Figure 1 The distributed photovoltaic power hierarchical aggregation prediction method can include the following operations:

[0058] S1, data acquisition: from the distributed photovoltaic account information, the distributed photovoltaic historical power data, and the numerical weather forecast data of the low-voltage distributed photovoltaic, the historical weather forecast, the historical power generation data, and the future weather forecast are acquired.

[0059] S2, historical sample data acquisition: the power generation, the irradiance, the temperature, the humidity, and the on-capacity of a low-voltage photovoltaic power source before a prediction day are extracted from the historical weather forecast and the historical power generation data; after processing the data, the historical sample data are obtained.

[0060] The power generation, the irradiance, the temperature, the humidity, and the on-capacity of a prediction object not more than n days before a prediction day are acquired.

[0061] In this embodiment, after processing the data, the historical sample data are obtained, including:

[0062] The temperature and humidity data are processed by zero-mean standardization, the irradiance and power generation are processed by maximum-minimum standardization, and finally the historical sample data are obtained by time cross 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 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 the stacked prediction model.

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

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

[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 model after initial training the root mean square error Based on the grid search strategy, the optimal hyperparameters are obtained by continuously adjusting the hyperparameter values That is With the optimal hyperparameters Train each preliminary trained model in the first layer model Get the first layer model Where i is the label of the first layer model, taking 1, 2, 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 is substituted into the random forest model to obtain the first prediction vector p1={p 1,j |1≤j≤N};

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

[0076] S4.2.2.3, based on the training set Construct a multivariate multi-output training sample, set the history time step to 96, and the output step to 96. Train the LSTM model using the multivariate multi-output training sample. During the training process, the loss is calculated based on the back propagation algorithm, and the LSTM model parameters are updated through the Adam algorithm. Set the training round number to 200, and the batch size to 128. After training, the training set is substituted into the LSTM model to obtain the third prediction vector p3={p 3,j |1≤j≤N};

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

[0078]

[0079] Where n is the number of samples; P i is the predicted power of the i-th sample; R i is the measured power of the i-th sample; C i is the on-line 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 a set is obtained Wherein, Q is the parameter space; the optimal parameter is obtained by selecting the parameter with the minimum root mean square error

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

[0082] S4.3, using the output feature P of the first layer model and the label value of the training set Training the linear regression sub-model of the second layer Finally, a complete stacked 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 sub-model of the second layer based on the least square method, and finally a complete stacked prediction model is obtained

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

[0085] S6, direct prediction: based on the future weather forecast, a prediction sample is constructed for each low-voltage photovoltaic power supply, each prediction sample is substituted into the stacked prediction model of the corresponding low-voltage photovoltaic power supply, and the short-term prediction result of each low-voltage photovoltaic power supply is obtained.

[0086] S7, aggregation prediction: a hierarchical relationship tree is established, and the hierarchical relationship tree is used to hierarchically aggregate the short-term prediction results of all low-voltage photovoltaic power supplies according to the hierarchical relationship, and the short-term aggregation prediction results of low-voltage photovoltaic power supplies at different levels are obtained.

[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 the distributed photovoltaic, form a set of <ID, FATHER_ID>, and construct a parent-child relationship tree based on the set of <ID, FATHER_ID>, and record the leaf node set and the non-leaf node set;

[0089] S7.2, update the direct prediction result to the corresponding node in the relationship tree, ensure that the leaf node has a direct prediction result, and the prediction curve is 0 by default;

[0090] S7.3, based on breadth-first search, starting from the root node, traversing and calculating the node prediction curve of the non-leaf node based on accumulation, and obtaining the aggregation prediction result.

[0091] The scheme of the present application obtains the prediction results of each level power supply by using the direct prediction and hierarchical aggregation method based on the low-voltage distributed photovoltaic account information, historical power generation data and meteorological forecast data. The direct prediction method is based on the stacked multi-model combination prediction, and the prediction results of multiple different types of models such as random forest, Lasso and LSTM are combined in a linear weighted manner to form the final prediction result, so as to make up for the limitations of single model prediction ability and improve the generalization ability of the overall model. The hierarchical aggregation aggregates the direct prediction results according to the hierarchical relationship to form the prediction results of the upper power supply, and finally obtains the short-term prediction results of the distributed photovoltaic under different levels.

[0092] The distributed photovoltaic power hierarchical aggregation prediction method of the present application is verified by a specific embodiment.

[0093] S1, data acquisition:

[0094] The 96-point actual measurement power curves and actual measurement starting capacity curves (the installed capacity distribution is shown in Figure 2 ) of 1000 low-voltage districts in a certain city in Jiangsu from August 22, 2024 to September 22, 2024, and the corresponding historical meteorological data are collected.

[0095] S2, historical sample data acquisition:

[0096] The historical sample data containing active power, irradiance, temperature, humidity and starting capacity are obtained by time cross, linear interpolation on the collected data such as actual measurement data, starting capacity and meteorological data;

[0097] S3, training sample data acquisition and division:

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

[0099] S4, model construction:

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

[0101] S5, repeat all the above steps until the stacked prediction model for each low-voltage photovoltaic power supply is established

[0102] S6 Direct prediction:

[0103] The prediction data is substituted into the three basic models and the stacked combination model for prediction, and the direct prediction results of the four models are obtained. The prediction accuracy of the four models in the low-voltage area is calculated according to the following formula:

[0104] C R = 1-E rmse

[0105] The results are as follows:

[0106] Model Name Random Forest Lasso LSTM Stacked Ensemble Model Transformer 93.10% 93.11% 92.99% 93.42%

[0107] S7 Aggregated prediction:

[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 results are as follows:

[0109] Transformer Transformer Transformer Transformer Transformer Transformer 94.89% 94.98% 94.72% 95.12%

[0110] The implementation results are briefly analyzed as follows:

[0111] The accuracy rate of the stacked combination model in the area prediction and the aggregated prediction results is the highest, which is 93.42% and 95.12% respectively, followed by Lasso, random forest, and the lowest is LSTM. In addition, through Transformer and Transformer The direct prediction and aggregated prediction accuracy distribution diagram shown in the figure 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 dispersed, and there will be extreme cases below 75% and 85% respectively.

[0112] Transformer and TransformerComparisons of the short-term forecast curves and measured power generation curves for the three basic models and the stacked combination model on September 12, 2024, and September 14, 2024, respectively. The figures show that the stacked combination model has better overall forecast accuracy than the other models, with a smoother forecast curve. The forecast results of the other models are more volatile and less accurate.

[0113] Example 2

[0114] See also Transformer , Transformer This is a schematic diagram of the structure of a distributed photovoltaic power generation hierarchical aggregation prediction system disclosed in an embodiment of the present invention. The system can realize low-voltage distributed photovoltaic power generation prediction, specifically including:

[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 power, 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;

[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 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; the training sample data is divided 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. 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 is trained using the training set. During the training process, the first layer model is used to perform error assessment and hyperparameter tuning on the validation set to ultimately obtain the output features of the first layer model. The output features of the first layer model and the training set are used to train the second layer linear regression meta-model to ultimately obtain a stacked prediction model. This completes the establishment of a stacked prediction model for each low-voltage photovoltaic power source.

[0119] The 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 the short-term prediction result of each low-voltage photovoltaic power source;

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

[0121] In an optional embodiment, the distributed photovoltaic power hierarchical aggregation prediction method comprises: a) obtaining historical weather forecasts, historical power generation data and future weather forecasts; b) extracting power generation, irradiance, temperature, humidity and on-line capacity of a low-voltage photovoltaic power source on a prediction day from the historical weather forecasts and the historical power generation data; obtaining historical sample data after processing the data; c) cleaning the historical sample data to obtain training sample data and dividing; d) constructing a basic stacked combination model with two layers of models, wherein the first layer of models comprises 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; training and optimizing the basic stacked combination model; e) repeating all the above steps until a stacked prediction model for each low-voltage photovoltaic power source is established; f) based on the future weather forecasts, constructing prediction samples for each distributed photovoltaic power source, and inputting each prediction sample into the stacked prediction model of the corresponding distributed photovoltaic power source to obtain short-term prediction results of each distributed photovoltaic power source; g) establishing a hierarchical relationship tree, and using the hierarchical relationship tree to hierarchically aggregate short-term prediction results of all distributed photovoltaic power sources according to hierarchical relationships, to obtain short-term convergence prediction results of the distributed photovoltaic power sources at different levels in the future.

[0122] Embodiment 3

[0123] Please refer to Transformer , Transformer is a structural schematic diagram of a distributed photovoltaic power hierarchical aggregation prediction device disclosed by the embodiment of the present application. Wherein, Transformer The device described can be applied to a power system, such as for low-voltage distributed photovoltaic power prediction, etc., and the embodiment of the present application is not limited.

[0124] As Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer Transformer shown, the device can include a processor and a memory, the memory having computer instructions stored therein, the processor being configured 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 as described in the above embodiment, and can achieve the same technical effects as the above method.

[0125] The memory can include a computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage media can be used for reading and writing computer-executable program code / instructions. It will be appreciated that the media, and ongoing data processing using the media, can be employed to provide for storage of computer readable instructions, data structures, program modules and possibly other data for the computer. Examples can include certain program modules dealing with implementation of a network environment, among others.

[0126] The processor performs various function applications and data processing by running programs stored in the memory, such as implementing the method provided by the embodiment 1 of the present application.

[0127] Embodiment 4

[0128] The embodiment 4 of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps of the method in the above embodiment and achieve the technical effects consistent with the above method.

[0129] The computer storage medium of the embodiment of the present application 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 may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the computer readable storage medium include: an electrical connection having one or more wires, a portable computer diskette, 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, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus.

[0130] Computer readable signal media can include a propagated data signal with computer readable program code embodied therein. For example, a propagated signal can be an electromagnetic signal, an optical signal, and so on. Such signals can be created in various forms and exchanged, for example, on electrical wires, optical fibers, wireless signals, etc., which are previously described.

[0131] The computer readable medium can also be distributed over network coupled computer systems so that the computer readable code is stored and other computer readable files in a distributed fashion. For example, the software and data files associated with the present application can be stored by the host server of a web site owned and / or operated by the present assignee.

[0132] The computer program code can also be implemented in the form of, or by using, hardware components such as ASICs, FPGAs, and so on.

[0133] The embodiments of methods, systems and computer program products described herein can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the

[0134] The specific embodiments described above have been disclosed by way of example only. Of course, the application is not confined to the details of the foregoing description, but is capable of modification within the scope of the application.

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 power, irradiance, temperature, humidity, and startup capacity of the low-voltage photovoltaic power source from historical weather forecasts and historical power generation data; process the data to obtain historical sample data; 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. Model construction and training: Build a basic stacked combination model with two layers of models. The first layer includes a random forest model, a Lasso regression model, and an LSTM model, and the second layer is a meta-model based on a linear regression model. Use the training set to train each model in the first layer. During the training process, use the validation set to perform error assessment and hyperparameter tuning on the first layer model to ultimately obtain the output features of the first layer model. Use the output features of the first layer model and the training set to train the second layer linear regression meta-model, 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. 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; Aggregate prediction: A hierarchical relationship tree is established. Using the hierarchical relationship tree, the short-term prediction results of all low-voltage photovoltaic power sources are aggregated according to the hierarchical relationship to obtain the aggregated 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 cross-pollination and linear interpolation.

3. The distributed photovoltaic power generation power layered 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 their value ranges, and construct a search space for 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 model after initial training The root mean square error Based on the grid search strategy, the hyperparameter values ​​are continuously adjusted to obtain the optimal hyperparameters with the minimum error. Right now With the 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 = {{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.

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 model after initial training The root mean square error Based on the grid search strategy, the hyperparameter values ​​are continuously adjusted to obtain the optimal hyperparameters with the minimum 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 training, 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, Substitute into the LSTM model and get the third prediction vector p3 = {p 3,j |1≤j≤N}; Calculate the random forest model, Lasso regression model and LSTM model in the validation set respectively Root mean square error on : The root mean square error value of each set 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 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 predicted 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 features P of the first-layer model and the label values ​​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. Using the hierarchical relationship tree, the short-term forecast results of all low-voltage photovoltaic power sources are aggregated according to the hierarchical relationship, and the aggregated short-term forecast results of low-voltage photovoltaic power sources at different levels are obtained, including: Extract the parent-child relationship pair from the parent-child relationship related data table 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. The prediction curve is 0 by default. 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 low-voltage distributed photovoltaic ledger information, historical power data and numerical weather forecast data; The historical sample data acquisition module is used to extract the predicted power generation power, irradiance, temperature, humidity, and startup capacity of the low-voltage photovoltaic power source from historical weather forecasts and historical power generation data; and obtain historical sample data after processing the data; 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 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; the training sample data is divided 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. 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 is trained using the training set. During the training process, the validation set is used to perform error evaluation and hyperparameter tuning on the first layer model, ultimately obtaining the output features of the first layer model. The output features and training set of the first-layer model 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 generate prediction samples for each distributed photovoltaic structure based on future weather forecasts, and substitute each prediction sample into the stacked 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 layered aggregation prediction device, characterized in that: The 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 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

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

    US20220373984A1