Distributed photovoltaic data reconstruction method and device, medium and equipment
By integrating and integrating multi-source auxiliary historical data and distributed photovoltaic historical data in multiple station areas in a distributed photovoltaic system, the problem of low accuracy in the reconstruction of distributed photovoltaic data in the existing technology is solved, and more efficient data reconstruction and completion is achieved.
Patent Information
- Application Number
- CN202411399001.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-03-04
AI Technical Summary
The existing distributed photovoltaic data reconstruction method has low accuracy and is difficult to achieve accurate regulation and management of power supply load.
By obtaining multi-source auxiliary historical data and distributed photovoltaic historical data of multiple station areas, it is divided into training sets and test sets, and training multiple different types of initial photovoltaic data reconstruction models based on the training set, obtaining the optimal model of each type, and fusing these models to generate a photovoltaic data reconstruction integration model.
It realizes a better photovoltaic data reconstruction effect than a single model, reduces dependence on training data, and can more accurately complete the missing distributed photovoltaic historical data, improving the quality and reliability of the data.
Smart Images

Figure CN119557583A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed photovoltaic data reconstruction, and in particular to a distributed photovoltaic data reconstruction method, device, medium and equipment. Background Art
[0002] With the depletion of fossil fuels and increasingly serious environmental problems, renewable energy such as photovoltaics has been vigorously developed and plays an increasingly important role in the power system.
[0003] Photovoltaic power generation systems are divided into centralized photovoltaic systems and distributed photovoltaic systems according to the installation location. Centralized photovoltaic systems are photovoltaic equipment concentrated in vast areas such as deserts or Gobi, while distributed photovoltaic systems are photovoltaic equipment dispersedly installed in multiple substations. Substations refer to the power supply area covered by a single transformer, which can be divided into four categories according to the load type: urban residential substations, commercial substations, industrial substations, and agricultural substations. By installing photovoltaic power generation equipment on the roofs and ground of buildings in the substation, the direct current of the power generation equipment is converted into alternating current and injected into the distribution network of the substation. In this way, the distributed photovoltaic power generation system can provide clean energy to users in the substation while generating electricity nearby.
[0004] Distributed photovoltaic systems are usually distributed in different locations and buildings, so the collection and transmission of distributed photovoltaic data may be affected by equipment failure, communication interruption and other problems. These problems will lead to missing, incomplete or untimely data, reduce the quality and reliability of data, and bring challenges to the power supply management and operation control of the power system. Therefore, it is necessary to accurately predict and reconstruct the time series of distributed photovoltaic data to achieve precise regulation and management of power supply loads.
[0005] Existing photovoltaic data reconstruction methods use neural network models to reconstruct photovoltaic data, but the neural network models commonly used are relatively simple and the reconstructed distributed photovoltaic data are not accurate enough. Summary of the invention
[0006] In view of this, the present invention provides a distributed photovoltaic data reconstruction method, device, medium and equipment, the main purpose of which is to solve the problem of low accuracy of photovoltaic data reconstructed by the existing distributed photovoltaic data reconstruction method.
[0007] According to one aspect of the present application, a distributed photovoltaic data reconstruction method is provided, the method comprising:
[0008] Acquire multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in a distributed photovoltaic system, and divide the multi-source auxiliary historical data and distributed photovoltaic historical data into a training set and a test set;
[0009] Based on the training set, multiple different types of initial photovoltaic data reconstruction models are trained to obtain an optimal photovoltaic data reconstruction model corresponding to each type;
[0010] fusing a plurality of optimal distributed photovoltaic data reconstruction models to obtain a plurality of candidate integrated models, and evaluating each of the candidate integrated models based on the test set to obtain a photovoltaic data reconstruction integrated model;
[0011] The multi-source auxiliary actual data of the target area is obtained, and the multi-source auxiliary actual data is input into the photovoltaic data reconstruction integrated model to obtain the distributed photovoltaic reconstruction data of the target area.
[0012] Optionally, the multiple optimal distributed photovoltaic data reconstruction models are fused to obtain multiple candidate integrated models, including:
[0013] The equal-weighted average method is used to fuse multiple optimal distributed photovoltaic data reconstruction models to obtain the first candidate integrated model;
[0014] Based on the test set, a root mean square error corresponding to each optimal distributed photovoltaic data reconstruction model is calculated, based on the root mean square error, a first weight corresponding to each optimal distributed photovoltaic data reconstruction model is set, and based on the first weight, multiple optimal distributed photovoltaic data reconstruction models are merged to obtain a second candidate integrated model;
[0015] Based on the test set, the determination coefficient corresponding to each optimal distributed photovoltaic data reconstruction model is calculated, and based on the determination coefficient, the second weight corresponding to each optimal distributed photovoltaic data reconstruction model is set; based on the second weight, multiple optimal distributed photovoltaic data reconstruction models are fused to obtain a third candidate integrated model.
[0016] Optionally, the step of evaluating each of the candidate integrated models based on the test set to obtain a photovoltaic data reconstruction integrated model includes:
[0017] Inputting the test set into the first candidate integration model, the second candidate integration model and the third candidate integration model respectively to obtain a first prediction data set, a second prediction data set and a third prediction data set;
[0018] Based on the first prediction data set, the second prediction data set, the third prediction data set and the distributed photovoltaic historical data of each sample in the test set, calculating the prediction accuracy corresponding to each candidate integrated model;
[0019] The candidate integrated model corresponding to the maximum prediction accuracy is used as the integrated model for photovoltaic data reconstruction.
[0020] Optionally, the multi-source auxiliary historical data includes radiation data, centralized photovoltaic data, distributed installed capacity data, centralized installed capacity data and meteorological data.
[0021] Optionally, before acquiring multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system, the distributed photovoltaic data reconstruction method further includes:
[0022] Acquire auxiliary initial historical data and distributed photovoltaic initial historical data of multiple substations in a distributed photovoltaic system, divide the auxiliary initial historical data and distributed photovoltaic initial historical data in chronological order, and obtain auxiliary initial historical data and distributed photovoltaic initial historical data of multiple time periods;
[0023] Correcting missing or abnormal data in each time period, obtaining auxiliary historical data and distributed photovoltaic historical data for each time period, and checking the continuity of the multiple time periods;
[0024] The auxiliary historical data and distributed photovoltaic historical data of multiple continuous time periods are combined in chronological order to obtain multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system.
[0025] Optionally, after dividing the multi-source auxiliary historical data and the distributed photovoltaic historical data into a training set and a test set, the distributed photovoltaic data reconstruction method further includes:
[0026] Obtain the maximum and minimum values corresponding to the distributed historical data and each type of auxiliary historical data in the training set;
[0027] Based on the maximum value and the minimum value corresponding to each type of data, the data in the training set and the data in the test set are normalized to obtain a normalized training set and a normalized test set.
[0028] Optionally, the multiple different types of initial photovoltaic data reconstruction models include an RF model, an XGBoost model, a LightGBM model and an LSTM model.
[0029] According to another aspect of the present application, a distributed photovoltaic data reconstruction device is provided, comprising:
[0030] A data acquisition module, used to acquire multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in a distributed photovoltaic system, and divide the multi-source auxiliary historical data and distributed photovoltaic historical data into a training set and a test set;
[0031] A model training module, used for training a plurality of different types of initial photovoltaic data reconstruction models based on the training set to obtain an optimal photovoltaic data reconstruction model corresponding to each type;
[0032] A model integration module, used for fusing a plurality of optimal distributed photovoltaic data reconstruction models to obtain a plurality of candidate integration models, and evaluating each of the candidate integration models based on the test set to obtain a photovoltaic data reconstruction integration model;
[0033] The reconstruction data acquisition module is used to obtain multi-source auxiliary actual data of the target area, input the multi-source auxiliary actual data into the photovoltaic data reconstruction integrated model, and obtain the distributed photovoltaic reconstruction data of the target area.
[0034] Optionally, the model integration module is further used for:
[0035] The equal-weighted average method is used to fuse multiple optimal distributed photovoltaic data reconstruction models to obtain the first candidate integrated model;
[0036] Based on the test set, a root mean square error corresponding to each optimal distributed photovoltaic data reconstruction model is calculated, based on the root mean square error, a first weight corresponding to each optimal distributed photovoltaic data reconstruction model is set, and based on the first weight, multiple optimal distributed photovoltaic data reconstruction models are merged to obtain a second candidate integrated model;
[0037] Based on the test set, the determination coefficient corresponding to each optimal distributed photovoltaic data reconstruction model is calculated, and based on the determination coefficient, the second weight corresponding to each optimal distributed photovoltaic data reconstruction model is set; based on the second weight, multiple optimal distributed photovoltaic data reconstruction models are fused to obtain a third candidate integrated model.
[0038] Optionally, the model integration module is further used for:
[0039] Inputting the test set into the first candidate integration model, the second candidate integration model and the third candidate integration model respectively to obtain a first prediction data set, a second prediction data set and a third prediction data set;
[0040] Based on the first prediction data set, the second prediction data set, the third prediction data set and the distributed photovoltaic historical data of each sample in the test set, calculating the prediction accuracy corresponding to each candidate integrated model;
[0041] The candidate integrated model corresponding to the maximum prediction accuracy is used as the integrated model for photovoltaic data reconstruction.
[0042] Optionally, the multi-source auxiliary historical data includes radiation data, centralized photovoltaic data, distributed installed capacity data, centralized installed capacity data and meteorological data.
[0043] Optionally, the distributed photovoltaic data reconstruction device further includes:
[0044] A preprocessing module is used to obtain auxiliary initial historical data and distributed photovoltaic initial historical data of multiple substations in a distributed photovoltaic system, divide the auxiliary initial historical data and distributed photovoltaic initial historical data in chronological order, and obtain auxiliary initial historical data and distributed photovoltaic initial historical data of multiple time periods; correct missing or abnormal data in each time period to obtain auxiliary historical data and distributed photovoltaic historical data of each time period, and check the continuity of the multiple time periods; combine the auxiliary historical data and distributed photovoltaic historical data of multiple continuous time periods in chronological order to obtain multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system.
[0045] Optionally, the distributed photovoltaic data reconstruction device further includes:
[0046] The normalization processing module obtains the maximum and minimum values corresponding to the distributed historical data in the training set and each type of auxiliary historical data; based on the maximum and minimum values corresponding to each type of data, the data in the training set and the data in the test set are normalized to obtain the normalized training set and test set.
[0047] Optionally, the multiple different types of initial photovoltaic data reconstruction models include an RF model, an XGBoost model, a LightGBM model and an LSTM model.
[0048] According to another aspect of the present application, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the above-mentioned distributed photovoltaic data reconstruction method.
[0049] According to another aspect of the present application, a computer device is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0050] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned distributed photovoltaic data reconstruction method.
[0051] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0052] The present application provides a distributed photovoltaic data reconstruction method, device, medium and equipment, which trains multiple different types of initial photovoltaic data reconstruction models based on a training set to obtain the optimal photovoltaic data reconstruction model corresponding to each type, fuses multiple optimal distributed photovoltaic data reconstruction models to obtain multiple candidate integrated models, and evaluates each candidate integrated model based on a test set to obtain a photovoltaic data reconstruction integrated model. The photovoltaic data reconstruction integrated model can not only achieve complementary advantages between models and obtain better results than a single model, but also reduce the dependence on the data required for training, maximize the advantages of each model, reduce their own shortcomings, achieve accurate reconstruction of distributed photovoltaic data, and effectively complete the missing distributed photovoltaic historical data.
[0053] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the accompanying drawings to indicate the same components. In the accompanying drawings:
[0055] Figure 1 A flow chart of a distributed photovoltaic data reconstruction method provided by an embodiment of the present application is shown;
[0056] Figure 2 A flowchart of another distributed photovoltaic data reconstruction method provided by an embodiment of the present application is shown;
[0057] Figure 3 A basic structural diagram of an RF model of a distributed photovoltaic data reconstruction method provided in an embodiment of the present application is shown;
[0058] Figure 4 A basic structural diagram of an XGBoost model of a distributed photovoltaic data reconstruction method provided in an embodiment of the present application is shown;
[0059] Figure 5 A basic structure diagram of a LightGBM model of a distributed photovoltaic data reconstruction method provided in an embodiment of the present application is shown;
[0060] Figure 6 A basic structural diagram of an LSTM model of a distributed photovoltaic data reconstruction method provided in an embodiment of the present application is shown;
[0061] Figure 7 A block diagram of a distributed photovoltaic data reconstruction device provided in an embodiment of the present application is shown.
[0062] in,
[0063] Figure 7 In: 702 - data acquisition module; 704 - model training module; 706 - model integration module; 708 - reconstruction data acquisition module. DETAILED DESCRIPTION
[0064] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0065] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention application are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0066] In view of the problem that the photovoltaic data reconstructed by the existing distributed photovoltaic data reconstruction method has low accuracy, the embodiment of the present application provides a distributed photovoltaic data reconstruction method, such as Figure 1 As shown, the method includes:
[0067] 102: Acquire multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system, and divide the multi-source auxiliary historical data and the distributed photovoltaic historical data into a training set and a test set;
[0068] 104: training a plurality of different types of initial photovoltaic data reconstruction models based on the training set to obtain an optimal photovoltaic data reconstruction model corresponding to each type;
[0069] 106: Fusing multiple optimal distributed photovoltaic data reconstruction models to obtain multiple candidate integration models, evaluating each candidate integration model based on a test set, and obtaining a photovoltaic data reconstruction integration model;
[0070] 108: Acquire multi-source auxiliary actual data of the target area, input the multi-source auxiliary actual data into the photovoltaic data reconstruction integrated model, and obtain distributed photovoltaic reconstruction data of the target area.
[0071] Specifically, the distributed photovoltaic data and multi-source auxiliary data of a very few typical distributed power stations in multiple substations of the power system are obtained, and these data are preprocessed. The multi-source auxiliary data include radiation data, centralized photovoltaic data, distributed installed capacity data, centralized installed capacity data and meteorological data. The distributed photovoltaic data and multi-source auxiliary data are preprocessed; the multi-source auxiliary data are used as independent variables and the distributed photovoltaic data as dependent variables, and multiple different types of initial photovoltaic data reconstruction models are established; the preprocessed distributed photovoltaic data and multi-source auxiliary data are divided into a training set and a test set, and the training set is normalized to the maximum and minimum, and the test set is normalized using the maximum parameter calculated for the training set; the data is divided into a training set and a test set in a ratio of 7:3 (the validation set is separately divided from the training set during training).
[0072] Based on the training set, multiple different types of initial photovoltaic data reconstruction models are trained to obtain the optimal photovoltaic data reconstruction model corresponding to each type. Multiple optimal distributed photovoltaic data reconstruction models are fused to obtain multiple candidate integration models. Each candidate integration model is evaluated based on the test set, and the optimal integration model is selected as the photovoltaic data reconstruction integration model.
[0073] Different input features can be selected for the integrated models obtained by different integration methods. The input of the integrated model includes date (month, day, minute), irradiance data, centralized photovoltaic data, centralized installed capacity data, distributed installed capacity data, and meteorological data. The output is distributed photovoltaic data. Among them, all data correspond to time, and meteorological data includes temperature data, rainfall data, and wind speed data.
[0074] The distributed power station that lacks a large amount of real photovoltaic data is used as the target domain, and the photovoltaic data reconstruction integration model is migrated to the target domain. The multi-source auxiliary actual data in the target domain is input to fine-tune the model to obtain distributed photovoltaic reconstruction data. Transfer learning is to share the parameters of the trained integration model on the distributed power station that lacks a large amount of real photovoltaic data, and fine-tune the model through multi-source auxiliary data to improve the generalization ability of the model.
[0075] Compared with the prior art, the present application provides a distributed photovoltaic data reconstruction method, which trains multiple different types of initial photovoltaic data reconstruction models based on a training set to obtain the optimal photovoltaic data reconstruction model corresponding to each type, fuses multiple optimal distributed photovoltaic data reconstruction models to obtain multiple candidate integrated models, and evaluates each candidate integrated model based on a test set to obtain a photovoltaic data reconstruction integrated model. The photovoltaic data reconstruction integrated model can not only achieve complementary advantages between models and obtain better results than a single model, but also reduce the dependence on the data required for training, and can maximize the advantages of each model while reducing their own shortcomings, thereby achieving accurate reconstruction of distributed photovoltaic data and effectively completing missing distributed photovoltaic historical data.
[0076] In one embodiment of the present invention, Figure 2 As shown, the distributed photovoltaic data reconstruction method includes:
[0077] 202: Using an equal-weighted average method, multiple optimal distributed photovoltaic data reconstruction models are integrated to obtain a first candidate integrated model;
[0078] 204: Based on the test set, calculate the root mean square error corresponding to each optimal distributed photovoltaic data reconstruction model, set the first weight corresponding to each optimal distributed photovoltaic data reconstruction model based on the root mean square error, and fuse multiple optimal distributed photovoltaic data reconstruction models based on the first weight to obtain a second candidate integrated model;
[0079] 206: Based on the test set, calculate the determination coefficient corresponding to each optimal distributed photovoltaic data reconstruction model, set the second weight corresponding to each optimal distributed photovoltaic data reconstruction model based on the determination coefficient, and fuse multiple optimal distributed photovoltaic data reconstruction models based on the second weight to obtain a third candidate integrated model;
[0080] 208: inputting the test set into the first candidate integration model, the second candidate integration model and the third candidate integration model respectively to obtain a first prediction data set, a second prediction data set and a third prediction data set;
[0081] 210: Calculate the prediction accuracy corresponding to each candidate integrated model based on the distributed photovoltaic historical data of each sample in the first prediction data set, the second prediction data set, the third prediction data set, and the test set;
[0082] 212: The candidate integrated model corresponding to the maximum prediction accuracy is used as the integrated model for photovoltaic data reconstruction.
[0083] Specifically, the prediction results of each model are evaluated for accuracy using the determination coefficient R 2 , RMSE as the model evaluation index.2 The prediction effect of the model is analyzed by the RMSE evaluation index, and the determination coefficient R corresponding to each optimal distributed photovoltaic data reconstruction model is calculated. 2 Set the weight coefficient corresponding to each model, such as the determination coefficient R 2 The weight coefficient of the high model is set relatively high, and the sum of the weight coefficients of each model is 1, and the second candidate integration model is obtained; the weight coefficient corresponding to each model is set according to the RMSE corresponding to each optimal distributed photovoltaic data reconstruction model, for example, the weight coefficient of the model with a small RMSE is set relatively high, and the sum of the weight coefficients of each model is 1, and the third candidate integration model is obtained. The test set is input into each candidate integration model to obtain the prediction data set corresponding to each candidate integration model. Based on the distributed photovoltaic historical data corresponding to the prediction set and the sample in the test set corresponding to each candidate integration model, the prediction accuracy corresponding to each candidate model is calculated, and the candidate integration model corresponding to the maximum prediction accuracy is used as the photovoltaic data reconstruction integration model.
[0084] Coefficient of determination R 2 It is a statistical indicator used to reflect the degree of regression fit of the regression model, which can be defined as the ratio of the discrete degree of the independent variable fitting value and its true value in the sample regression model. 2 The closer the value is to 1, the higher the stability and fit of the model. The calculation formula is as follows:
[0085]
[0086] Root mean square error (RMSE) is the square root of the ratio of the square of the deviation between the predicted value and the true value to the number of observations n, which is used to measure the deviation between the predicted value and the true value. The closer the RMSE value is to 0, the stronger the model's prediction ability is. The calculation formula is as follows:
[0087]
[0088] Where y i and y' i are the measured and observed values of sample i, and n is the total number of samples.
[0089] In one embodiment of the present invention, the multi-source auxiliary historical data includes radiation data, centralized photovoltaic data, distributed installed capacity data, centralized installed capacity data and meteorological data.
[0090] In one embodiment of the present invention, before acquiring multi-source auxiliary historical data and distributed photovoltaic historical data of multiple stations in the distributed photovoltaic system, the distributed photovoltaic data reconstruction method further includes:
[0091] Acquire auxiliary initial historical data and distributed photovoltaic initial historical data of multiple substations in the distributed photovoltaic system, divide the auxiliary initial historical data and distributed photovoltaic initial historical data in chronological order, and obtain auxiliary initial historical data and distributed photovoltaic initial historical data of multiple time periods;
[0092] Correct the missing or abnormal data in each time period, obtain the auxiliary historical data and distributed photovoltaic historical data of each time period, and check the continuity of multiple time periods;
[0093] The auxiliary historical data and distributed photovoltaic historical data of multiple continuous time periods are combined in chronological order to obtain multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system.
[0094] Specifically, the acquired auxiliary initial historical data and distributed photovoltaic initial historical data are divided into the same time period by using the cluster analysis method to obtain the auxiliary initial historical data and distributed photovoltaic initial historical data of multiple time periods. The missing or abnormal data in the same time period are filled or corrected based on the characteristics of the clustering clusters, and the continuity of the time series is checked based on the Pandas library. The time resolution of all data is unified to the 15-minute level; the auxiliary historical data and distributed photovoltaic historical data of multiple consecutive time periods are spliced in chronological order and by time column to obtain continuous time series data.
[0095] A distributed photovoltaic data reconstruction method provided in the present application utilizes a cluster analysis method to fill in or correct missing or abnormal data in a power system substation, thereby better fitting the data change trend and improving the accuracy of distributed photovoltaic data reconstruction. Time series detection is implemented based on the Pandas library, and data processing is simple and efficient, thereby improving the efficiency of distributed photovoltaic data reconstruction.
[0096] In one embodiment of the present invention, after dividing the multi-source auxiliary historical data and the distributed photovoltaic historical data into a training set and a test set, the distributed photovoltaic data reconstruction method further includes:
[0097] Obtain the maximum and minimum values corresponding to the distributed historical data in the training set and each type of auxiliary historical data;
[0098] Based on the maximum and minimum values corresponding to each type of data, the data in the training set and the data in the test set are normalized to obtain the normalized training set and test set.
[0099] Specifically, in order to eliminate the influence of dimension, the training set is normalized by maximum and minimum normalization, and the test set is normalized by using the maximum and minimum values in the data column corresponding to each data. The normalized value is between [0,1]. After normalization, a sample data set that can be used for model input and output is obtained. The calculation formula for normalization is as follows:
[0100]
[0101] Among them, x′ represents the value of a single data, min is the minimum value of the column where the data is located, and max is the maximum value of the column where the data is located.
[0102] In one embodiment of the present invention, a plurality of different types of initial photovoltaic data reconstruction models include an RF model, an XGBoost model, a LightGBM model, and an LSTM model.
[0103] Specifically, the processed training set is input into the RF model, XGBoost model, LightGBM model and LSTM model for training and testing respectively, and the optimal model corresponding to each model is obtained. Then, the optimal model of each model is fused to obtain an integrated model, and the integrated model is tested and evaluated to obtain the optimal integrated model. Since there are certain differences between multiple models, direct combination will lead to poor model integration effect. Therefore, according to the characteristics that different models are more sensitive to different features, in the integrated model, the number of features is reduced by feature selection, thereby reducing the differences between different models. According to the characteristics that different models require different hyperparameter settings, the differences between different models are reduced by adjusting the hyperparameters of different models. LSTM can realize the output prediction of multiple data. In the experiment, the model stacked four layers of LSTM, and the number of units in each layer was 200, 200, 200, and 100. Finally, the fully connected layer was connected to output the distributed photovoltaic data at the corresponding time. The model uses the ADAM optimizer and the mean square error as the loss function for training. During training, the data set is shuffled and 10% of the data is divided as the validation set. The input data of LSTM are irradiance, centralized photovoltaic power, centralized installed capacity, distributed installed capacity and meteorological data, and the output data is distributed photovoltaic power. Therefore, LSTM can establish implicit connections between distributed photovoltaic data and multi-source auxiliary data. The RF model, XGBoost model, and LightGBM model are implemented using the sklearn library in the experiment. The model parameters are debugged based on grid search and 5-fold cross validation to select the optimal model. The main debugging parameters include: learning rate, number of classifiers, maximum depth of the tree, number of leaves, regular correlation parameters, etc., which are gradually adjusted to the optimal.
[0104] The basic structure diagram of the RF model is as follows Figure 3 As shown below, the specific steps are as follows:
[0105] S11: If the size of the training set is N, for each tree, randomly and with replacement, draw N training samples from the training set as the training set for this tree;
[0106] S12: If the feature dimension of each sample is M, specify a constant m << M, randomly select m feature subsets from the M features, and each time the tree is split, select the optimal one from these m features;
[0107] S13: On the new sample set and feature subsets, find the best splitting attribute and build a decision tree;
[0108] S14: Repeat steps S11 - S13 until m decision trees are constructed;
[0109] S15: A large number of decision trees form a random forest. Each decision tree will have a prediction result. Averaging all the prediction results is the final model prediction result.
[0110] The basic structure diagram of the XGBoost model is as Figure 4 shown below, and the specific steps are as follows:
[0111] S21: Initialize the model and the predicted values of each sample;
[0112] S22: Define the objective function and approximately expand the objective function using Taylor's formula;
[0113] S23: Build a decision tree according to the optimal splitting point decision algorithm, and use the residuals calculated by the previous decision tree as the input for the next decision tree;
[0114] S24: Continuously add trees, continuously perform feature splitting to grow a tree, and continuously fit the residuals of the previous prediction until the preset threshold is reached and then stop;
[0115] S25: Finally, add up the predicted values of each tree to obtain the final predicted value.
[0116] The basic structure diagram of the LightGBM model is as Figure 5 shown below, and the specific steps S3 are as follows:
[0117] S31: Initialize the model and the predicted values of each sample;
[0118] S32: Calculate the negative gradient of the loss function for each sample in each round;
[0119] S33: Use the GOSS algorithm to reduce the number of samples. The process of the GOSS algorithm is as follows:
[0120] S331. Sort the samples according to their absolute gradient values;
[0121] S332. After the sorting result, select the first a×100% of the samples to produce a subset of large gradient sample points;
[0122] S333. Randomly select b×(1-a)×100% sample points from the remaining sample set (1-a)×100% to generate a set of small gradient sample points;
[0123] S334. Merge the large gradient sample and the sampled small gradient sample;
[0124] S335. Multiply the small sample gradient by a weight coefficient;
[0125] S336. Using the above sampled samples, learn a new weak learner;
[0126] S337. Repeat the above 6 steps until the specified number of iterations is reached or convergence occurs.
[0127] S34: Use the EFB algorithm to reduce the number of features. The process of the EFB algorithm is as follows:
[0128] S341. Construct a graph with weighted edges, where the weights correspond to the total conflicts between features;
[0129] S342. Sort the features in descending order by their degrees in the graph;
[0130] S343. Check each feature in the ordered list and assign it to a feature set with small conflicts, or create a new feature set.
[0131] S35: Discretize the continuous floating-point eigenvalues into K integers according to the histogram algorithm, and construct a histogram with a width of K. When traversing the data, accumulate statistics in the histogram based on the discretized values as indexes. After traversing the data once, the histogram accumulates the required statistics, and then traverses to find the optimal split point based on the discrete values of the histogram. Then use the Leaf-wise growth strategy, which finds the leaf with the largest split gain from all the current leaves each time, and then splits it, and repeats this cycle. Use this method to build a decision tree, use the residual calculated by the previous decision tree as the new true value of the sample, and use it as the input of the next decision tree;
[0132] S36: By continuously fitting the residual, the residual is continuously reduced, thereby obtaining the final prediction result.
[0133] The basic structure diagram of the LSTM model is as follows Figure 6As shown in the figure, in the LSTM model, the gate structure is used to add or delete information to the cell state. The cell state is also called the cell state, which is used to store long-term information. The gate structure is used to control the cell state and decide which information to keep and which information to discard. The main gate structures are input gate, output gate and forget gate. "Gate" is a structure that allows information to pass selectively, usually composed of a Sigmoid function and a Pointwise multiplication operation. The input value range of the Sigmoid function is [0,1], 0 represents complete discard, and 1 represents complete pass.
[0134] The forget gate uses the output of the previous unit and the input of this unit, and uses the sigmoid function to generate a value in [0,1] to control the degree to which the previous unit state is forgotten, that is:
[0135] f t =σ(w f ·[h i-1 ,x t ]+b f )
[0136] In the formula, f t is the forget gate, σ is the sigmoid activation function, W f is the weight coefficient matrix of the forget gate, h t-1 is the output of the previous unit, b f is the bias term of the forget gate, x t is the input for this unit.
[0137] The input gate decides which values to keep and which to update, a sigmoid function is applied to decide what to update, and then a tanh function is applied to create a new vector of candidate values.
[0138] i t =σ(w i ·[h t-1 ]+b i )
[0139]
[0140] in, represents the unit state (cell state), tanh is the tanh activation function, i t is the forget gate, σ is the sigmoid activation function, b i is the bias term of the input gate, w i is the weight coefficient matrix of the input gate, w c is the weight coefficient matrix of the cell state, b i is the bias term of the input gate, b c is the bias term of the cell state;
[0141] Update old cell status C t-1 To the new cell state C t Use the following formula to implement this process:
[0142]
[0143] where f t *c t-1 To discard the information that needs to be discarded, are new candidate values that vary depending on how much we decide to update each state.
[0144] The output gate needs to use a sigmoid layer to determine the output part of the unit state, then process the unit state through tanh (to get a value between -1 and 1) and multiply it with the output of the sigmoid gate, and finally output the part to be determined. The formula is:
[0145] O t =σ(w0[h t-1 ,x t ]+b o )
[0146] h t =O t *tanh(C t )
[0147] Among them, O t is the output gate, σ is the sigmoid activation function, w0 is the weight coefficient matrix of the output gate, h t-1 is the output of the previous unit, x t is the input of this unit, b o is the bias term of the output gate, h t is the output of the current unit, C t It is the unit state (cell state).
[0148] Furthermore, as a response to the above Figure 1 The embodiment of the present invention provides a distributed photovoltaic data reconstruction device, such as Figure 7 As shown, the device comprises:
[0149] The data acquisition module 702 is used to acquire multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system, and divide the multi-source auxiliary historical data and distributed photovoltaic historical data into a training set and a test set;
[0150] A model training module 704 is used to train a plurality of different types of initial photovoltaic data reconstruction models based on a training set to obtain an optimal photovoltaic data reconstruction model corresponding to each type;
[0151] A model integration module 706 is used to fuse multiple optimal distributed photovoltaic data reconstruction models to obtain multiple candidate integration models, and evaluate each candidate integration model based on a test set to obtain a photovoltaic data reconstruction integration model;
[0152] The reconstruction data acquisition module 708 is used to obtain multi-source auxiliary actual data of the target area, input the multi-source auxiliary actual data into the photovoltaic data reconstruction integrated model, and obtain the distributed photovoltaic reconstruction data of the target area.
[0153] The present application provides a distributed photovoltaic data reconstruction device. Compared with the prior art, multiple different types of initial photovoltaic data reconstruction models are trained based on a training set to obtain the optimal photovoltaic data reconstruction model corresponding to each type, and multiple optimal distributed photovoltaic data reconstruction models are fused to obtain multiple candidate integrated models. Each candidate integrated model is evaluated based on a test set to obtain a photovoltaic data reconstruction integrated model. The photovoltaic data reconstruction integrated model can not only achieve complementary advantages between models and obtain better results than a single model, but also reduce the dependence on the data required for training, and can maximize the advantages of each model while reducing their own shortcomings, thereby achieving accurate reconstruction of distributed photovoltaic data and effectively completing missing distributed photovoltaic historical data.
[0154] In one embodiment, the model integration module is further configured to:
[0155] The equal-weighted average method is used to fuse multiple optimal distributed photovoltaic data reconstruction models to obtain the first candidate integrated model;
[0156] Based on the test set, the root mean square error corresponding to each optimal distributed photovoltaic data reconstruction model is calculated, and based on the root mean square error, the first weight corresponding to each optimal distributed photovoltaic data reconstruction model is set, and based on the first weight, multiple optimal distributed photovoltaic data reconstruction models are integrated to obtain a second candidate integrated model;
[0157] Based on the test set, the determination coefficient corresponding to each optimal distributed photovoltaic data reconstruction model is calculated. Based on the determination coefficient, the second weight corresponding to each optimal distributed photovoltaic data reconstruction model is set. Based on the second weight, multiple optimal distributed photovoltaic data reconstruction models are fused to obtain a third candidate integrated model.
[0158] In one embodiment, the model integration module is further configured to:
[0159] Input the test set into the first candidate integration model, the second candidate integration model and the third candidate integration model respectively to obtain a first prediction data set, a second prediction data set and a third prediction data set;
[0160] Based on the distributed photovoltaic historical data of each sample in the first prediction data set, the second prediction data set, the third prediction data set and the test set, the prediction accuracy corresponding to each candidate integrated model is calculated;
[0161] The candidate integrated model corresponding to the maximum prediction accuracy is used as the integrated model for photovoltaic data reconstruction.
[0162] In one embodiment, the multi-source auxiliary historical data includes radiation data, centralized photovoltaic data, distributed installed capacity data, centralized installed capacity data and meteorological data.
[0163] In one embodiment, the distributed photovoltaic data reconstruction device further includes:
[0164] The preprocessing module is used to obtain the auxiliary initial historical data and distributed photovoltaic initial historical data of multiple substations in the distributed photovoltaic system, divide the auxiliary initial historical data and distributed photovoltaic initial historical data in chronological order, and obtain the auxiliary initial historical data and distributed photovoltaic initial historical data of multiple time periods; correct the missing or abnormal data in each time period to obtain the auxiliary historical data and distributed photovoltaic historical data of each time period, and check the continuity of multiple time periods; combine the auxiliary historical data and distributed photovoltaic historical data of multiple continuous time periods in chronological order to obtain multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system.
[0165] In one embodiment, the distributed photovoltaic data reconstruction device further includes:
[0166] The normalization processing module obtains the maximum and minimum values corresponding to the distributed historical data in the training set and each type of auxiliary historical data; based on the maximum and minimum values corresponding to each type of data, the data in the training set and the data in the test set are normalized to obtain the normalized training set and test set.
[0167] In one embodiment, the multiple different types of initial photovoltaic data reconstruction models include an RF model, an XGBoost model, a LightGBM model, and an LSTM model.
[0168] According to an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the distributed photovoltaic data reconstruction method in any of the above method embodiments.
[0169] According to a schematic diagram of the structure of a computer device provided by an embodiment of the present invention, the specific embodiment of the present invention does not limit the specific implementation of the computer device.
[0170] The computer device may include: a processor, a communication interface, a memory, and a communication bus.
[0171] Wherein: the processor, the communication interface, and the memory communicate with each other via a communication bus.
[0172] Communication interface, used to communicate with other devices such as client or other server network elements.
[0173] The processor is used to execute the program, and specifically can execute the relevant steps in the above-mentioned distributed photovoltaic data reconstruction method embodiment.
[0174] Specifically, the program may include program codes including computer operation instructions.
[0175] The processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0176] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0177] The program can be specifically used to enable a processor to execute the distributed photovoltaic data reconstruction method in any of the above method embodiments.
[0178] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. In one embodiment, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0179] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A distributed photovoltaic data reconstruction method, characterized in that: include: Acquire multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in a distributed photovoltaic system, and divide the multi-source auxiliary historical data and distributed photovoltaic historical data into a training set and a test set; Based on the training set, multiple different types of initial photovoltaic data reconstruction models are trained to obtain an optimal photovoltaic data reconstruction model corresponding to each type; fusing a plurality of optimal distributed photovoltaic data reconstruction models to obtain a plurality of candidate integrated models, and evaluating each of the candidate integrated models based on the test set to obtain a photovoltaic data reconstruction integrated model; The multi-source auxiliary actual data of the target area is obtained, and the multi-source auxiliary actual data is input into the photovoltaic data reconstruction integrated model to obtain the distributed photovoltaic reconstruction data of the target area.
2. The distributed photovoltaic data reconstruction method according to claim 1, characterized in that: The multiple optimal distributed photovoltaic data reconstruction models are integrated to obtain multiple candidate integrated models, including: The equal-weighted average method is used to fuse multiple optimal distributed photovoltaic data reconstruction models to obtain the first candidate integrated model; Based on the test set, a root mean square error corresponding to each optimal distributed photovoltaic data reconstruction model is calculated, based on the root mean square error, a first weight corresponding to each optimal distributed photovoltaic data reconstruction model is set, and based on the first weight, multiple optimal distributed photovoltaic data reconstruction models are merged to obtain a second candidate integrated model; Based on the test set, the determination coefficient corresponding to each optimal distributed photovoltaic data reconstruction model is calculated, and based on the determination coefficient, the second weight corresponding to each optimal distributed photovoltaic data reconstruction model is set; based on the second weight, multiple optimal distributed photovoltaic data reconstruction models are fused to obtain a third candidate integrated model.
3. The distributed photovoltaic data reconstruction method according to claim 2, characterized in that: The step of evaluating each candidate integrated model based on the test set to obtain a photovoltaic data reconstruction integrated model includes: Inputting the test set into the first candidate integration model, the second candidate integration model and the third candidate integration model respectively to obtain a first prediction data set, a second prediction data set and a third prediction data set; Based on the first prediction data set, the second prediction data set, the third prediction data set and the distributed photovoltaic historical data of each sample in the test set, calculating the prediction accuracy corresponding to each candidate integrated model; The candidate integrated model corresponding to the maximum prediction accuracy is used as the integrated model for photovoltaic data reconstruction.
4. The distributed photovoltaic data reconstruction method according to claim 1, characterized in that: The multi-source auxiliary historical data includes radiation data, centralized photovoltaic data, distributed installed capacity data, centralized installed capacity data and meteorological data.
5. The distributed photovoltaic data reconstruction method according to claim 4, characterized in that: Before acquiring the multi-source auxiliary historical data and distributed photovoltaic historical data of multiple stations in the distributed photovoltaic system, the distributed photovoltaic data reconstruction method further includes: Acquire auxiliary initial historical data and distributed photovoltaic initial historical data of multiple substations in a distributed photovoltaic system, divide the auxiliary initial historical data and distributed photovoltaic initial historical data in chronological order, and obtain auxiliary initial historical data and distributed photovoltaic initial historical data of multiple time periods; Correcting missing or abnormal data in each time period, obtaining auxiliary historical data and distributed photovoltaic historical data for each time period, and checking the continuity of the multiple time periods; The auxiliary historical data and distributed photovoltaic historical data of multiple continuous time periods are combined in chronological order to obtain multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in the distributed photovoltaic system.
6. The distributed photovoltaic data reconstruction method according to claim 4, characterized in that: After dividing the multi-source auxiliary historical data and the distributed photovoltaic historical data into a training set and a test set, the distributed photovoltaic data reconstruction method further includes: Obtain the maximum and minimum values corresponding to the distributed historical data and each type of auxiliary historical data in the training set; Based on the maximum value and the minimum value corresponding to each type of data, the data in the training set and the data in the test set are normalized to obtain a normalized training set and a normalized test set.
7. The distributed photovoltaic data reconstruction method according to any one of claims 1 to 6, characterized in that: The multiple different types of initial photovoltaic data reconstruction models include RF model, XGBoost model, LightGBM model and LSTM model.
8. A distributed photovoltaic data reconstruction device, characterized in that: include: A data acquisition module, used to acquire multi-source auxiliary historical data and distributed photovoltaic historical data of multiple substations in a distributed photovoltaic system, and divide the multi-source auxiliary historical data and distributed photovoltaic historical data into a training set and a test set; A model training module, used for training a plurality of different types of initial photovoltaic data reconstruction models based on the training set to obtain an optimal photovoltaic data reconstruction model corresponding to each type; A model integration module, used for fusing a plurality of optimal distributed photovoltaic data reconstruction models to obtain a plurality of candidate integration models, and evaluating each of the candidate integration models based on the test set to obtain a photovoltaic data reconstruction integration model; The reconstruction data acquisition module is used to obtain multi-source auxiliary actual data of the target area, input the multi-source auxiliary actual data into the photovoltaic data reconstruction integrated model, and obtain the distributed photovoltaic reconstruction data of the target area.
9. A storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the distributed photovoltaic data reconstruction method according to any one of claims 1 to 7.
10. A computer device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the distributed photovoltaic data reconstruction method according to any one of claims 1-7.
Citation Information
Cited By
Photovoltaic power data reconstruction method, system and device and storage medium
CN122432504A