Distributed photovoltaic power generation power intelligent prediction system and method
By using LightGBM model for cross-supervised training in distributed photovoltaic power generation systems, the total radiation intensity and ambient temperature are selected as influencing factors, the problem of insufficient prediction accuracy in the existing technology is solved, and higher prediction accuracy is achieved Rate and better grid management support.
Patent Information
- Application Number
- CN202411617034.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing distributed photovoltaic power intelligent prediction system fails to efficiently use the LSTM model for prediction, and does not perform cross-supervised training optimization, resulting in insufficient prediction accuracy.
The LightGBM model is used for cross-supervised training and optimized the LSTM model. By selecting influencing factors such as total radiation intensity and ambient temperature, the training data set is constructed, and the cross-supervised training LSTM model is used to predict photovoltaic power generation power.
It significantly improves the accuracy of distributed photovoltaic power generation prediction, realizes the combined application of machine learning and deep learning, and provides technical support and prediction information for power grid scheduling management.
Smart Images

Figure CN119168163A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed photovoltaic power generation intelligent prediction, and in particular to a distributed photovoltaic power generation intelligent prediction system and method. Background Art
[0002] Distributed photovoltaic power generation is developing rapidly with multiple points and wide areas, and local high-density grid connection. Distributed photovoltaic power generation has the advantages of short construction period and convenient maintenance. It has become an important part of photovoltaic power generation at present and in the future.
[0003] Distributed photovoltaics are generally connected to the grid at a voltage level of 380 / 220V. There are many distributed photovoltaic devices with a high degree of dispersion, which have a wide and profound impact on the grid. With the rapid increase of distributed photovoltaics, predicting and managing the power generation of low-voltage grid-level distributed systems is crucial to improving the level of renewable energy consumption, ensuring power supply reliability and safe and stable operation of the grid. Therefore, it is of great value to carry out power prediction research on distributed photovoltaic power generation and achieve high-precision estimation of large-scale low-voltage distributed photovoltaic power generation.
[0004] The patent application with application number 202410352704.9 discloses a distributed photovoltaic power intelligent prediction system and method, which uses big data technology to perform correlation analysis on the historical power generation data and historical meteorological data of photovoltaic power generation equipment, and mines the correlation feature expression between photovoltaic power generation and meteorological data, and combines future meteorological data to predict future monthly power generation. This can provide a scientific basis for the operation and management of photovoltaic power stations, thereby improving power generation efficiency and economic benefits. However, its solution also has the following problems: it fails to efficiently use the LSTM model for prediction, and it also fails to perform cross-supervisory training optimization on the LSTM model.
[0005] Therefore, in reality, we expect a better distributed photovoltaic power generation intelligent prediction system and method to better realize the prediction of photovoltaic power generation. Summary of the invention
[0006] In view of the above-mentioned problems, the object of the present invention is to provide a distributed photovoltaic power generation intelligent prediction system and method to improve the accuracy of distributed photovoltaic output prediction.
[0007] The purpose of the present invention can be achieved through the following technical solutions: A distributed photovoltaic power generation intelligent prediction system, comprising: Input module, factors affecting input selection; LSTM module, based on the selected influencing factors, uses the trained and optimized LSTM model to predict photovoltaic power generation; Output module, outputs the photovoltaic power generation power prediction result; Among them, when training the LSTM model of the LSTM module, the LightGBM model of the LightGBM module is used for cross-supervised training optimization.
[0008] A prediction method applied to the above system, comprising the following steps: S1. Collect historical data on photovoltaic power generation, select influencing factors, and construct a training data set; S2. Based on the training data set, use the LightGBM model to cross-supervise the training of the LSTM model; S3. Use the trained and optimized LSTM model to predict photovoltaic power generation and measure the prediction accuracy.
[0009] As a further solution of the present invention, when selecting the influencing factors in S1, the Pearson correlation coefficient is used to analyze and select the correlation between the power generation power and the influencing factors, and the formula is:
[0010] in, y is the photovoltaic power generation power; is the average photovoltaic power generation power; α are the relevant meteorological variable factors; is the mean of the relevant meteorological variable factors; t is the Pearson correlation coefficient.
[0011] As a further solution of the present invention, the influencing factors are selected as total radiation intensity and ambient temperature.
[0012] As a further solution of the present invention, the LSTM model is trained by cross-supervision using the LightGBM model in S2, and the steps are: S21, split the training data set into a training set and a validation set; S22. Use LightGBM to fit the training set to obtain the LightGBM model, and test it on the validation set to calculate the error; S23. Use LSTM to fit the training set to obtain the LSTM model, and test it on the validation set to calculate the error. S24. Use the prediction results of the LightGBM model as the supervision label for the LSTM model training. At the same time, use the prediction results of the LSTM model as the supervision label for the LightGBM model training to perform cross-training. Perform multiple rounds of iterations in the cross-training to allow the two models to learn from each other. S25. Use the LSTM model optimized by iterative supervised training as the overall prediction model.
[0013] As a further solution of the present invention, the LightGBM adopts the gradient-based single-side sampling algorithm GOSS to select samples to construct a decision tree, and the formula is:
[0014] in, L and R They are the left and right leaf nodes after segmentation. x i and x j are samples of left and right leaf nodes, g i and g j is the sample gradient, λ is the L2 regularization term.
[0015] As a further solution of the present invention, the state update formula of the LSTM model is:
[0016] in, is the sigmoid function, tanh() is the hyperbolic tangent function, i t is the input gate, f t For the Gate of Forgetfulness, o t is the output gate, x t ,h t ,c t Respectively represent the input, output and cell state of LSTM at the current time step t, x t-1 ,h t-1 ,c t-1 Respectively represent the input, output and cell state of LSTM at time step t-1, W xi 、W hi 、W ci 、b i 、W xf 、W hf 、W cf 、b f 、W xc、W hc 、 b c 、W xo 、W ho 、W co and b o are model parameters.
[0017] As a further solution of the present invention, the prediction accuracy is measured in S3 by using the root mean square error RMSE. The formula for measuring the accuracy using RMSE is:
[0018]
[0019] in, y i is the actual power generated by photovoltaic power generation, is the photovoltaic power generation power predicted by the model, and maxload is the maximum power when the photovoltaic power generation is at full power.
[0020] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the above-mentioned test method are implemented when the processor executes the program.
[0021] A non-transitory computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned test method when executed by a processor.
[0022] Beneficial effects of the present invention: The present invention proposes a cross-supervised training model based on the lightweight gradient boosting decision tree (LightGBM) and the long short-term memory neural network (LSTM), and realizes a prediction method for the total power generation of distributed photovoltaics. Compared with the predictions made using the lightweight gradient boosting decision tree (LightGBM) or the long short-term memory neural network (LSTM) method alone, the accuracy is greatly improved; the combined use of machine learning and deep learning is realized, the accuracy of distributed photovoltaic output prediction is improved, a feasible solution is provided for the prediction of distributed photovoltaic power generation, and technical support and prediction information support are provided for power grid dispatching and management. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the process of the intelligent prediction method of distributed photovoltaic power generation power of the present invention; Figure 2 It is a schematic diagram of the principle of the distributed photovoltaic power generation intelligent prediction method of the present invention; Figure 3 It is a structural schematic diagram of the distributed photovoltaic power generation intelligent prediction system of the present invention; Figure 4 This is the prediction effect diagram of the method of the present invention using LightGBM alone; Figure 5 This is a diagram showing the prediction effect of using LSTM alone in the method of the present invention; Figure 6 This is a graph showing the prediction accuracy of the method of the present invention using LSTM alone and LightGBM alone; Figure 7 This is a graph of the prediction accuracy of the LSTM model using LSTM alone, using LightGBM alone, and after cross-supervised training; Figure 8 This is a structural diagram of the electronic equipment of the present invention. DETAILED DESCRIPTION
[0024] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0025] like Figure 1 As shown, the present invention discloses a distributed photovoltaic power generation intelligent prediction system, comprising: Input module, factors affecting input selection; LSTM module, based on the selected influencing factors, uses the trained and optimized LSTM model to predict photovoltaic power generation; Output module, outputs the photovoltaic power generation power prediction result; Among them, when training the LSTM model of the LSTM module, the LightGBM model of the LightGBM module is used for cross-supervised training optimization.
[0026] like Figure 3 As shown, the present invention also discloses a distributed photovoltaic power generation intelligent prediction method, comprising: S1. Collect historical data on photovoltaic power generation, select influencing factors, and construct a training data set; S2. Based on the training data set, use the LightGBM model to cross-supervise the training of the LSTM model; S3. Use the trained and optimized LSTM model to predict photovoltaic power generation and measure the prediction accuracy.
[0027] It is quite complicated to accurately predict the power generation of photovoltaic power generation. During the operation of photovoltaic power generation equipment, many external factors and the characteristics of the photovoltaic panels themselves will affect their power generation.
[0028] The degree of influence of these factors is different. Some factors have a significant impact on the power generation, while some are negligible or even negligible. In addition, there are interrelationships and coupling relationships between these factors, that is, changes in one factor may trigger changes in another coupled factor to some extent. Therefore, it is necessary to conduct a correlation analysis of photovoltaic power factors to find the most important influencing factors and predict photovoltaic power generation.
[0029] To determine the most important factors affecting photovoltaic power generation, the Pearson correlation coefficient method can be used to analyze the correlation between each factor and power generation. The formula is:
[0030] in, y is the photovoltaic power generation power; is the average photovoltaic power generation power; α are the relevant meteorological variable factors; is the mean of the relevant meteorological variable factors; t is the Pearson correlation coefficient.
[0031] When 0≤t≤0.2 The correlation is very weak or irrelevant; 0.2≤t≤0.4 Weakly correlated; 0.4≤t≤0.6 The correlation is of moderate strength; 0.6≤t≤0.8 is strongly correlated; 0.8≤t≤1.0 Strongly correlated.
[0032] By calculating the correlation coefficient, the Pearson correlation coefficient between each influencing factor and photovoltaic power generation was obtained, as listed in Table 1.
[0033] Table 1 Pearson correlation coefficient of factors affecting photovoltaic power generation
[0034] It can be seen from Table 1 that the total radiation intensity has the most significant impact on photovoltaic power generation, and its correlation coefficient is as high as 0.982. In addition, the ambient temperature also has a strong positive correlation with photovoltaic power generation.
[0035] The total radiation intensity is the most important factor that determines the amount of solar energy received by photovoltaic cells. The conversion of solar energy into electrical energy in photovoltaic cells is a complex physical process, which is mainly based on the photovoltaic effect. When sunlight shines on the semiconductor material (usually silicon) of the PN junction, it will excite electrons to jump to the conduction band, forming negative electrons and positive holes; under the action of the built-in electric field of the PN junction, these photogenerated carriers diffuse in opposite directions, forming photocurrent in the external circuit to realize the conversion of light energy into electrical energy. When the photon energy is greater than the bandgap width, it will cause the valence band electrons to jump to the conduction band and move freely in the conduction band; at the same time, holes will be left in the valence band; these two carriers with opposite trajectories are driven by the internal electric field, with electrons moving toward the N region and holes moving toward the P region. After the separation of electrons and holes, the potential difference formed at both ends of the external load drives them to flow, completing a closed loop and realizing the power generation of light energy converted into electrical energy.
[0036] The stronger the total radiation intensity received by the photovoltaic panel, the more carriers are excited, and the greater the current and voltage generated. Therefore, the total radiation intensity is crucial to the power generation of photovoltaic cells.
[0037] The ambient temperature of photovoltaic cells will also directly affect their conversion efficiency. Ambient temperature affects the power generation efficiency of photovoltaic cells in two ways. The increased ambient temperature will increase the internal resistance of photovoltaic cells, thereby reducing the open circuit voltage of the battery. The series resistance in the circuit is positively correlated with the ambient temperature. Because the power supply voltage is inversely proportional to the resistance; therefore, the increased internal resistance due to the increase in ambient temperature will inevitably cause the open circuit voltage to drop; in addition, under high temperature conditions, the probability of carrier recombination in photovoltaic cells increases, thereby reducing the photoelectric conversion efficiency; under high temperature, the thermal motion of microscopic particles is active, and electrons are more likely to obtain enough energy to cross the energy gap and recombine with positive holes. Because carrier recombination reduces the number of photogenerated carriers, the current output is weakened, and the conversion efficiency is reduced; in addition, thermal runaway of photovoltaic cells and accelerated aging of packaging materials may occur in high-temperature environments; therefore, the impact of ambient temperature must be considered to evaluate and predict photovoltaic power generation.
[0038] Therefore, when constructing a prediction model, two important factors, total radiation intensity and ambient temperature, which are significantly correlated with the photoelectric conversion efficiency, can be selected and used as a basis for power generation prediction.
[0039] Based on the above selected influencing factors, when building a prediction model, a cross-supervision method of machine learning and deep learning can be used. Specifically, a lightweight gradient boosting decision tree (LightGBM) and a long short-term memory network (LSTM) are used for cross-supervision learning to model photovoltaic power generation time series and achieve effective prediction of distributed photovoltaic power generation power.
[0040] LightGBM is a machine learning algorithm that has strong capabilities in processing high-dimensional data and can better capture the response of distributed photovoltaic power generation to short-term changes in influencing factors; while LSTM is a deep learning algorithm that can better capture the characteristics of distributed photovoltaic power generation on a long-term time scale.
[0041] Through cross-supervision, we combine the advantages of LightGBM and LSTM models to achieve knowledge fusion, improve the generalization ability of the overall model on a wider range of data, increase the robustness to outliers and noise, and achieve better prediction results. Specifically, Figure 2 As shown, the steps include: S21, split the training data set into a training set and a validation set; S22. Use LightGBM to fit the training set to obtain the LightGBM model, and test it on the validation set to calculate the error; S23. Use LSTM to fit the training set to obtain the LSTM model, and test it on the validation set to calculate the error. S24. Use the prediction results of the LightGBM model as the supervision label for the LSTM model training. At the same time, use the prediction results of the LSTM model as the supervision label for the LightGBM model training to perform cross-training. Perform multiple rounds of iterations in the cross-training to allow the two models to learn from each other. S25. Use the LSTM model optimized by iterative supervised training as the overall prediction model.
[0042] LightGBM is an efficient gradient boosting decision tree (GBT) algorithm. Compared with traditional GBT, it uses two methods to reduce computational and memory complexity. LightGBM uses the gradient-based single-side sampling (GOSS) algorithm to select samples to build a decision tree. The traditional method is to select all samples, while the GOSS algorithm only selects samples with the largest gradient value. The following formula is used to solve the optimization problem and select the split point:
[0043] in, L and R They are the left and right leaf nodes after segmentation. x i and x j are samples of left and right leaf nodes, g i and g j is the sample gradient, λ is the L2 regularization term, and the GOSS algorithm is used to reduce the computational complexity without losing accuracy.
[0044] LightGBM also uses an exclusive feature bundle (EFB) algorithm to reduce the effective dimension of the data. The EFB algorithm identifies mutually exclusive features on the same decision tree branch, bundles them together for processing, and reduces memory usage and computation through the maximum flow algorithm. While ensuring accuracy, LightGBM can achieve faster training speed than XGBoost.
[0045] The Long Short-Term Memory Network (LSTM) is a special type of Recurrent Neural Network (RNN) that is mainly used to process and predict time series data. Compared with RNN, LSTM has an additional memory unit, which can better capture the dependencies with larger time step distances in the time series.
[0046] Simple RNNs will encounter the problem of gradient vanishing or exploding when modeling long sequence data. The LSTM model adds a memory unit c that can record historical information. This unit controls the inflow and outflow of information through three gates: input gate, forget gate, and output gate. Each of these three gates is a sigmoid layer, and the degree of its opening or closing determines whether the information can enter the memory unit; LSTM also uses a tanh layer to update the content of the memory unit; in this way, LSTM can transmit information between time steps and model long-distance dependencies more effectively.
[0047] LSTM has a unique advantage in model time correlation. The LSTM network is mainly composed of a memory unit and three gate units, namely input gate i, forget gate f and output gate o. When the time step is t, the mathematical formula for updating the LSTM model is:
[0048] in: is the sigmoid function, tanh() is the hyperbolic tangent function, i t is the input gate, f t For the Gate of Forgetfulness, o t is the output gate, x t ,h t ,c t Respectively represent the input, output and cell state of LSTM at the current time step t, x t-1 ,h t-1 ,c t-1Respectively represent the input, output and cell state of LSTM at time step t-1, W xi 、W hi 、W ci 、b i 、W xf 、W hf 、W cf 、b f 、W xc 、W hc 、 b c 、W xo 、W ho 、W co and b o is the model parameter; the three gate control units are calculated using the sigmoid function σ to achieve 0-1 range control; the final output h t Combined with memory unit cell state c t and input gate i t , Forget Gate f t , output gate o t Three gating units can precisely control the flow of information and capture long-range correlations in time series.
[0049] The sigmoid gated activation function enables the LSTM network to learn complex nonlinear time series dynamic behaviors; applying LSTM to distributed photovoltaic power generation power forecasting can capture the correlation between the output at each moment and the past moments, and achieve high-precision short-term and ultra-short-term power forecasting of distributed photovoltaic systems.
[0050] Examples of prediction model applications: First, a data set is constructed; the distributed photovoltaic power generation data of a certain county from October to November 2023 is used as the training set, and the data from the first 14 days of December 2023 is used as the test set; the data set uses a time scale of 15 minutes, recording the distributed photovoltaic power generation output of a certain county from 0:00 to 24:00 every day within the time range.
[0051] First, use the Pearson correlation coefficient to select the most important influencing factors, such as total radiation intensity and ambient temperature. The corresponding time length of the influencing factor data is the same as the power data, and the time accuracy of the influencing factor data is also 15 minutes. For some time points where some data are missing, the linear interpolation method can be used to fill in the data based on adjacent time points.
[0052] Then build the LightGBM model and set the LightGBM model parameters. The hyperparameters used by the LightGBM model are set to the number of leaf nodes num_leaves=31, the objective function is set to rmse regression loss, the learning rate learning_rate=0.05, and a random forest consisting of 5000 decision trees.
[0053] The combination of regression loss function and leaf node number enables the LightGBM model to learn more detailed partitioning conditions and has better generalization performance for continuous value prediction tasks. Compared with setting the maximum tree depth, directly limiting the number of leaf nodes can obtain similar anti-overfitting capabilities and is more flexible. The LightGBM model uses a lower learning rate value of 0.05, which makes the model more stable and fine-grained. A total of 5,000 decision trees are iteratively trained to obtain satisfactory generalization capabilities.
[0054] Then build the LSTM model and set the LSTM model parameters. The LSTM model can be customized based on the PyTorch framework. The input dimension of the input layer is set to input_size, the number of hidden layer nodes is set to 100, and the output dimension of the output layer is 96. Among them, the hidden_size of the LSTM layer is also 100, which is consistent with the number of hidden layer nodes. After the LSTM layer, the output lstm_out of all time steps is obtained, which contains the hidden state of each time step. Then, only the state of the last time step is extracted and input into the fully connected layer to map to the output prediction result to achieve the conversion from sequence to value.
[0055] The simple structure that only uses the last output of the LSTM sequence has the ability of LSTM to process time series data, and can also reduce the number of parameters for easy training. At the same time, the hidden layer size is set to 100 so that the model has sufficient expressive power, but not too large to cause overfitting. The overall network structure is concise and can effectively model time series prediction problems.
[0056] Photovoltaic power output has a strong daily periodicity. In order to emphasize the time series pattern within each day and the periodic changes between days, the power generation power, total radiation intensity and ambient temperature series (96 data points) are selected as the basic units of the model training data set.
[0057] On this basis, by adjusting the network hyperparameters, customizing the loss function, adopting the Adam optimizer, and using a flexible cross-supervision strategy, the optimized training of the LightGBM and LSTM models is achieved, so that the predicted output and actual power curve of the optimized trained LSTM model achieve a higher accuracy.
[0058] Finally, the root mean square error (RMSE) is used to evaluate the prediction model effect. RMSE evaluates the prediction accuracy of the model by calculating the deviation between the predicted value and the true value. The smaller the RMSE value, the smaller the prediction error and the better the model effect. The calculation formula of RMSE is:
[0059] in: y i Indicates the actual power generated by photovoltaic power generation, Represents the photovoltaic power generation power predicted by the model.
[0060] The accuracy is measured with the help of RMSE, which is defined so that the accuracy is a value between 0 and 1, and the higher the value, the more accurate the prediction:
[0061] in, maxload is the regional installed capacity, that is, the maximum power of the photovoltaic power station when it is generating power at full power; when the predicted value is exactly the same as the actual value, RMSE=0 and the accuracy P=1.
[0062] The present invention also provides a system for the above method, such as Figure 3 As shown, the device comprises: Input module, LSTM module, LightGBM module and output module, etc. When the system is in use, the LightGBM model of the LightGBM module is used for cross-supervised training optimization, and the LSTM module obtains the trained LSTM model.
[0063] The input module inputs the selected influencing factors into the trained LSTM module. The LSTM module predicts the photovoltaic power generation based on the selected influencing factors using the trained optimized LSTM model. The photovoltaic power generation prediction result is output to the output module. The user uses the output module to obtain the photovoltaic power generation prediction result.
[0064] Experimental results: Using the LightGBM model alone, with total radiation intensity and ambient temperature as input factors, the 14-day average accuracy on the test set was about 0.7850. Figure 4The prediction results for the 7th day are shown. It can be seen that when LightGBM is used alone, although the contour and trend are roughly consistent with the actual value, its predicted value fluctuates too much, and there is a large gap between the predicted value at a single time point and the measured value.
[0065] Using the LSTM model alone, we first trained it for 500 epochs with a learning rate of 0.01. This stage mainly enabled the model to quickly approach the optimization target and learn most of the feature representations. Then we trained it for 200 epochs with a learning rate of 0.001. This stage enabled the model to move more stably toward the local optimal solution and helped the model converge to a lower loss value. Using LSTM alone, the average accuracy of the predicted 14 days was 0.8748. Figure 5 The forecast results for the 7th day are shown. It can be seen that when using LSTM alone, although the forecast values at night, early morning, and evening are basically close to the actual values, the forecast values at noon have a large deviation, and there is a large gap between the forecast values and the measured values in a specific time period.
[0066] In the 14 days predicted, the specific prediction accuracy of using LightGBM and LSTM separately for each day is as follows Figure 6 As shown in the figure, we can see that since LSTM can accurately predict enough data points in a day, and the predicted values of LightGBM are quite different from the actual values in most data points, the accuracy of the LSTM model is higher than that of LightGBM on most prediction days.
[0067] According to the cross-supervised training method of the present invention, the trained LightGBM model and LSTM model are cross-supervised with each other. In each iteration round, the LightGBM model is first used to obtain a predicted value based on the training set data, and then the predicted value is used to replace the actual value of the training machine data for training the LSTM. Finally, the retrained LSTM is used to obtain a predicted value based on the training set data, and then the predicted value is used to replace the actual value of the training machine data for training the LightGBM.
[0068] In the cross-supervised training process, in each iteration of LSTM training, a learning rate of 0.001 is used for training for 100 epochs, and the LSTM model after cross-supervised training is used as the final model.
[0069] The average accuracy of the LSTM model after cross-supervision training in the 14-day forecast is 0.9069. The daily accuracy distribution is as follows Figure 7 shown.
[0070] It can be seen that on most forecast days, the accuracy of the LSTM model after cross-supervision training is improved compared with LSTM and LightGBM. On day 6, day 9, day 10, and day 11, the original LSTM model could not make more accurate predictions, but after cross-supervision training, the LSTM model was able to achieve good performance similar to the LightGBM model on these data points.
[0071] The present invention also provides an electronic device, Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 8 As shown, the electronic device may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call the logic instructions in the memory, for example, to execute the following method: S1. Collect historical data on photovoltaic power generation, select influencing factors, and construct a training data set; S2. Based on the training data set, use the LightGBM model to cross-supervise the training of the LSTM model; S3. Use the trained and optimized LSTM model to predict photovoltaic power generation and measure the prediction accuracy.
[0072] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0073] An embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in each of the above embodiments is implemented, for example, including: S1. Collect historical data on photovoltaic power generation, select influencing factors, and construct a training data set; S2. Based on the training data set, use the LightGBM model to cross-supervise the training of the LSTM model; S3. Use the trained and optimized LSTM model to predict photovoltaic power generation and measure the prediction accuracy.
[0074] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0075] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0077] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A distributed photovoltaic power generation intelligent prediction system, characterized in that: include: Input module, factors affecting input selection; LSTM module, based on the selected influencing factors, uses the trained and optimized LSTM model to predict photovoltaic power generation; Output module, outputs the photovoltaic power generation power prediction result; Among them, when training the LSTM model of the LSTM module, the LightGBM model of the LightGBM module is used for cross-supervised training optimization.
2. A prediction method based on the system of claim 1, characterized in that: include: S1. Collect historical data on photovoltaic power generation, select influencing factors, and construct a training data set; S2. Based on the training data set, use the LightGBM model to cross-supervise the training of the LSTM model; S3. Use the trained and optimized LSTM model to predict photovoltaic power generation and measure the prediction accuracy.
3. The prediction method according to claim 2, characterized in that: When selecting influencing factors in S1, the Pearson correlation coefficient is used to analyze and select the correlation between the power generation power and the influencing factors. The formula is: ; in, y is the photovoltaic power generation power; is the average photovoltaic power generation power; α are the relevant meteorological variable factors; is the mean of the relevant meteorological variable factors; t is the Pearson correlation coefficient.
4. The prediction method according to claim 3, characterized in that: The influencing factors are selected as total radiation intensity and ambient temperature.
5. The prediction method according to claim 2, characterized in that: In S2, the LightGBM model is used to cross-supervise the training of the LSTM model, and the steps are: S21, split the training data set into a training set and a validation set; S22. Use LightGBM to fit the training set to obtain the LightGBM model, and test it on the validation set to calculate the error; S23. Use LSTM to fit the training set to obtain the LSTM model, and test it on the validation set to calculate the error. S24. Use the prediction results of the LightGBM model as the supervision label for the LSTM model training. At the same time, use the prediction results of the LSTM model as the supervision label for the LightGBM model training to perform cross-training. Perform multiple rounds of iterations in the cross-training to allow the two models to learn from each other. S25. Use the LSTM model optimized by iterative supervised training as the overall prediction model.
6. The prediction method according to claim 5, characterized in that: The LightGBM uses the gradient-based single-side sampling algorithm GOSS to select samples to build a decision tree. The formula is: ; in, L and R They are the left and right leaf nodes after segmentation. x i and x j are samples of left and right leaf nodes, g i and g j is the sample gradient, λ is the L2 regularization term.
7. The prediction method according to claim 5, characterized in that: The state update formula of the LSTM model is: ; in, is the sigmoid function, tanh() is the hyperbolic tangent function, i t is the input gate, f t For the Gate of Forgetfulness, o t is the output gate, x t ,h t ,c t Respectively represent the input, output and cell state of LSTM at the current time step t, x t-1 ,h t-1 ,c t-1 Respectively represent the input, output and cell state of LSTM at time step t-1, W xi 、W hi 、W ci 、b i 、W xf 、W hf 、W cf 、b f 、W xc 、W hc 、b c 、W xo 、 W ho 、W co and b o are model parameters.
8. The prediction method according to claim 2, characterized in that: In S3, the prediction accuracy is measured by using the root mean square error RMSE. The formula for measuring the accuracy using RMSE is: ; ; in, y i is the actual power generated by photovoltaic power generation, is the photovoltaic power generation power predicted by the model, maxload It is the maximum power when photovoltaic power generation is at full power.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the testing method according to any one of claims 2 to 8 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the testing method according to any one of claims 2 to 8 are implemented.
Citation Information
Patent Citations
Low-voltage distributed photovoltaic power prediction method under in-situ balance scene
CN118783396A
