Photovoltaic power station generation power prediction method
By selecting reference power plants and gradually unfreezing parameters, and training a long short-term memory network model with cross-power plant data, the problems of large differences in data distribution and data scarcity among photovoltaic power plants were solved, thereby improving the accuracy of photovoltaic power generation prediction and the generalization ability of the model.
Patent Information
- Application Number
- CN202510949464.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-11-18
AI Technical Summary
Existing photovoltaic power generation forecasting methods rely on local historical data, which makes it difficult to adapt to the forecasting tasks of different photovoltaic power plants, resulting in insufficient forecasting accuracy. In particular, when data for the target power plant is scarce, it is unable to effectively learn the mapping relationship, and the utilization rate of cross-power plant data is low.
By acquiring historical data of the target power plant and candidate data of the candidate power plants, the multi-core maximum mean difference method is used to screen reference power plants, a long short-term memory network model is pre-trained, parameters are unfrozen layer by layer, and the model is fine-tuned by combining cross-power plant data to optimize the photovoltaic power generation prediction model.
It significantly improves the accuracy of power generation prediction for target power plants, enhances the generalization ability of the model, reduces the dependence on a large amount of labeled data for target power plants, and achieves efficient and accurate photovoltaic power generation prediction.
Smart Images

Figure CN120975284A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the field of new energy power generation prediction, and in particular to a photovoltaic power station power generation prediction method. BACKGROUND
[0002] With the increasing proportion of photovoltaic power generation in the overall power system, accurately predicting photovoltaic power generation power can help the power grid to balance power supply and demand in real time, avoid safety problems caused by supply and demand imbalance, optimize energy allocation and improve photovoltaic consumption rate, and is crucial for power grid dispatching and energy management.
[0003] Different photovoltaic power stations have different data distribution rules due to differences in geographical environment, climate conditions and the like. Existing photovoltaic power station power generation prediction methods rely on local historical data for modeling, and use single station data to train the model, which is difficult to adapt to the prediction tasks of other stations, resulting in insufficient prediction accuracy. When the data of the target station is scarce, the traditional model cannot effectively learn the mapping relationship due to the lack of sufficient training samples, and the data utilization rate of cross-station data processing is low, resulting in insufficient prediction accuracy and restricting the play of photovoltaic power prediction in power system allocation. SUMMARY
[0004] The photovoltaic power station power generation prediction method provided by the embodiments of the application at least solves the problem of insufficient prediction accuracy of the existing photovoltaic power generation prediction model.
[0005] In a first aspect, the embodiments of the application provide a photovoltaic power station power generation prediction method, comprising the following steps:
[0006] obtaining historical data of a target station to be predicted and candidate data of candidate stations; wherein the historical data comprises historical environmental data and historical power generation data;
[0007] According to the historical data and the candidate data, a reference station is selected from the candidate stations;
[0008] According to the reference data of the reference station, a long short-term memory network model is pre-trained to obtain an intermediate prediction model;
[0009] Adjusting the parameters of the intermediate prediction model to obtain a photovoltaic power station power generation prediction model;
[0010] Inputting the prediction environmental data of a target period into the photovoltaic power station power generation prediction model to obtain the power generation power prediction result of the target station in the target period.
[0011] The photovoltaic power station power generation prediction method provided by the embodiments of the application comprises:
[0012] data preprocessing is performed on historical data of the target power station and candidate data of the candidate power stations; wherein, the candidate power stations are provided in plurality, and are all photovoltaic power stations other than the target power station;
[0013] data similarity of the candidate power stations and the target power station is calculated one by one through a multi-core maximum mean difference method;
[0014] the data similarity is sorted from high to low, and a reference power station is selected according to the sorting result; wherein, the number of the reference power station is preset.
[0015] The data preprocessing on the historical data of the target power station and the candidate data of the candidate power stations provided in the photovoltaic power station power generation prediction method includes:
[0016] corresponding relationship between the historical environmental data and the historical power generation data is obtained in the historical data, and corresponding relationship between candidate environmental data and candidate power generation data in the candidate data is obtained in the candidate data;
[0017] abnormal values in the historical data and the candidate data are eliminated;
[0018] supplementary data is obtained through a cubic spline interpolation method, and the supplementary data is filled into the position of the abnormal value;
[0019] normalization is performed to obtain a data preprocessing result.
[0020] The pre-training of the long short-term memory network model according to the reference data of the reference power station to obtain an intermediate prediction model includes:
[0021] parameters of the long short-term memory network model are initialized as random minimum values;
[0022] reference environmental data in the reference data is input into the long short-term memory network model, and a prediction value is output; wherein, the reference data includes the reference environmental data, and a true value corresponding to the reference environmental data;
[0023] a model loss deviation is calculated according to the prediction value and the true value;
[0024] parameters of the long short-term memory network model are iteratively updated until the model loss deviation converges, and the intermediate prediction model is obtained.
[0025] The adjustment of the parameters of the intermediate prediction model to obtain a photovoltaic power station power generation prediction model includes:
[0026] freeze parameters of a bottom layer and parameters of an intermediate layer of the intermediate prediction model, unfreeze parameters of an output layer of the intermediate prediction model, and train the intermediate prediction model by using the preprocessed historical environment data as training samples;
[0027] unfreeze the parameters of the intermediate layer layer by layer, and train the intermediate prediction model by using the preprocessed historical environment data as training samples; wherein the unfreezing is performed from the output layer to the bottom layer, and stops when the preset depth of the intermediate layer is reached;
[0028] after the unfreezing to the preset depth, train the intermediate prediction model by using the preprocessed historical environment data as training samples, to obtain the photovoltaic power station power generation prediction model.
[0029] The photovoltaic power station power generation prediction method provided in the embodiments of the present application comprises the following steps:
[0030] input the training samples into the intermediate prediction model or the model obtained in the last round of training, to obtain a model prediction value;
[0031] obtain a target power station loss function according to the multi-core maximum mean difference between the historical data and the reference data, and the mean square error between the model prediction value and the historical power generation data.
[0032] The photovoltaic power station power generation prediction method provided in the embodiments of the present application further comprises the following steps after the step of unfreezing the parameters of the intermediate layer layer by layer and training the intermediate prediction model by using the preprocessed historical environment data as training samples:
[0033] obtain a freezing control function result as 1 or 0 according to the preset depth;
[0034] when the freezing control function is 1, update the parameters of the intermediate layer according to a parameter update gradient and a learning rate;
[0035] when the freezing control function is 0, keep the parameters of the intermediate layer unchanged.
[0036] The photovoltaic power station power generation prediction method provided in the embodiments of the present application further comprises the following steps:
[0037] calculate a regression performance index according to the power generation power prediction result of the target period and the actual power generation power result of the target period; wherein the regression performance index comprises a root mean square error, a mean absolute error and a determination coefficient;
[0038] when the regression performance index does not meet a regression performance index threshold requirement, adjust the parameters of the photovoltaic power station power generation prediction model.
[0039] In a second aspect, an electronic device is provided, comprising a processor and a memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the photovoltaic power station power generation prediction method according to any one of the embodiments.
[0040] In a third aspect, a non-transitory machine readable medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to perform the photovoltaic power station power generation prediction method according to any one of the embodiments.
[0041] The photovoltaic power station power generation prediction method provided by the embodiments of the present application overcomes the problems of data scarcity of the target power station and large distribution difference between different power stations through knowledge transfer from other candidate power stations to the target power station. By selecting data in different power stations that are highly similar to the target power station for pre-training and fine-tuning, the power generation prediction accuracy of the target power station is significantly improved. Compared with the training data of a single power station, the rich data resources of different power stations can be effectively utilized, and the generalization ability of the model is improved. BRIEF DESCRIPTION OF DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other embodiments according to these drawings without creative labor.
[0043] Figure 1 is a flowchart of the photovoltaic power station power generation prediction method in the embodiments of the present application.
[0044] Figure 2 is an implementation schematic diagram of the photovoltaic power station power generation prediction method in the embodiments of the present application.
[0045] Figure 3 is a structural schematic diagram of the electronic device of the present application. DETAILED DESCRIPTION
[0046] The embodiments of the present application will be described in detail below with reference to the drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms, and should not be interpreted as being limited to the embodiments described herein, on the contrary, these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for illustrative purposes, and are not intended to limit the scope of protection of the present application.
[0047] With the increasing proportion of photovoltaic power generation in the power system, the prediction accuracy of the power generation of photovoltaic power stations is crucial for the energy deployment of the power grid. For newly built power stations or power stations with insufficient local historical data, the prediction accuracy is low due to insufficient sample data, and the migration ability of related technologies for data of other power stations is insufficient, and the data utilization rate is low in cross-power station data processing. To this end, the embodiment one of the present application provides a photovoltaic power station power generation power prediction method, which solves the problem that the data distribution difference of different photovoltaic power stations is large and difficult to migrate, and improves the prediction accuracy of photovoltaic power generation power under the condition that the sample data of the target power station is insufficient. Referring to Figure 1 and Figure 2 The photovoltaic power station power generation power prediction method provided by the embodiment one of the present application comprises the following steps:
[0048] Step S100, obtaining historical data of a target power station to be predicted and candidate data of candidate power stations.
[0049] Specifically, when the target power station to be predicted is a newly built power station or has insufficient historical data for other reasons, the embodiment of the present application introduces candidate power stations, and the candidate power stations are set to be multiple and are all set to photovoltaic power stations other than the target power station. Through cross-power station data processing, the photovoltaic power station power generation power prediction model can learn the universal photovoltaic power generation rule.
[0050] The obtained historical data includes historical environmental data and historical power generation data, and the obtained candidate data includes candidate environmental data and candidate power generation data.
[0051] In terms of data type, the historical environmental data and the candidate environmental data both include solar radiation data such as sunshine duration, environmental data such as humidity and temperature, and other meteorological environmental data such as wind speed, wind direction, atmospheric transparency and cloud coverage which directly or indirectly affect the power generation efficiency. The historical power generation data and the candidate power generation data are both set as power generation power.
[0052] In terms of data source, the historical data includes data of the target power station at different time periods, which can cover various climate conditions. The candidate data includes data of the candidate power station at different time periods, and the candidate power stations are distributed in different regions and have different photovoltaic power generation systems. Therefore, on the basis of covering different climate conditions, the candidate data also includes data of different regions and different photovoltaic power generation systems, which has the difference of regional distribution and power generation mode. The data selection of the step S100 of the embodiment can help the model to fully understand the relationship between photovoltaic power generation and meteorological environmental conditions, and provide rich information for model training.
[0053] Step S200, according to the historical data and the candidate data, a reference power station is selected from the candidate power stations.
[0054] As an implementable manner, step S200 comprises:
[0055] Step S210, data preprocessing is performed on the historical data of the target power station and the candidate data of the candidate power station.
[0056] Specifically, firstly, the correspondence between the historical environmental data and the historical power generation data in the historical data is obtained, and the correspondence between the candidate environmental data and the candidate power generation data in the candidate data is obtained. The data arrangement can help to establish the correspondence between the meteorological environmental conditions and the power generation.
[0057] Subsequently, the outliers in the historical data and the candidate data are removed. The outliers include values with missing data in the correspondence, values that cannot establish the correspondence, and outliers deviating from the overall distribution of data. In some embodiments, the outliers deviating from the overall distribution can be removed by the quartile method. In other embodiments, the outliers can also be determined and removed by box plot or scatter plot.
[0058] For the missing positions of the removed outliers and missing data, in the first embodiment of the present application, the supplementary data is obtained by cubic spline interpolation method. The data is divided into several intervals in order, and in each interval, a cubic polynomial of the form z=ax 3 +bx 2 +cx+d is used to fit the known data, and by constraining the first derivative and the second derivative of the adjacent cubic polynomials at the connection points to be continuous, the curve is ensured to be smooth. Then, according to the constructed polynomial, the function value of the missing position is calculated as the supplementary data to fill in the missing position. Compared with the linear interpolation method and the polynomial interpolation method, the cubic spline interpolation can better preserve the local trend and smoothness of the data, and is especially suitable for filling the missing values of time series data such as meteorological data and photovoltaic power.
[0059] Normalization is performed to obtain the data preprocessing result. Normalization processing can convert feature data of different dimensions to the same scale, avoiding the influence of value range difference on subsequent model training. In the first embodiment of the present application, Z-score scaling can be used for normalization processing.
[0060] Step S220, the data similarity between the candidate power station and the target power station is calculated one by one by multi-kernel maximum mean discrepancy (MK-MMD).
[0061] The multi-kernel maximum mean difference method maps the data of the candidate power station and the data of the target power station obtained by the preprocessing in step S210 to a high-dimensional feature space through a plurality of kernel functions, and evaluates the data similarity between the candidate power station and the target power station by calculating the mean difference between the two. For one of the candidate power stations, the calculation process refers to the following formula:
[0062]
[0063] In the formula, x i is one of the data samples of the candidate power station, and the candidate data of the candidate power station has n data samples after being processed in step S210 to participate in the data similarity operation. y j is one of the data samples of the target power station, and the historical data of the target power station has m data samples after being processed in step S210 to participate in the data similarity operation. Φ(·) is a transformation of data mapping to a high-dimensional feature space.
[0064] D MMD is the MMD value calculated by the multi-kernel maximum mean difference method; the larger the MMD value, the greater the difference between the data distribution of the candidate power station and the target power station, and the lower the data similarity. The MMD value tends to 0, indicating that the difference between the data distribution of the candidate power station and the target power station is small, and the data similarity is high.
[0065] Through the above formula, the MMD value of each candidate power station with the target power station is calculated one by one, and then the qualitative relationship of the data similarity between each candidate power station and the target power station is obtained.
[0066] In step S230, the data similarity is sorted from high to low, and the reference power station is selected according to the sorting result.
[0067] According to step S220, the MMD value of each candidate power station with the target power station is obtained, and the MMD value is a non-negative number. The plurality of MMD values are sorted from low to high, at this time, the data similarity between the corresponding candidate power station and the target power station is the high-to-low sorting required in step S230.
[0068] According to the ranking result, candidate power stations with high data similarity to the target power station are screened out. The screening result is used as a reference power station, and the number of the screened reference power stations is preset. The preset number of reference power stations can be set according to the model training accuracy requirement, the calculation capability, and the number of candidate power stations, etc. As an option, the proportion of the number of reference power stations to the number of candidate power stations can also be set, or the actual selection can be made according to the MMD value solution. The preset number of reference power stations is appropriately increased or decreased according to the experience value to avoid the data similarity of the candidate power stations in the preset number range being too low, which affects the model pre-training. In the first embodiment of the present application, the preferred reference power station is the candidate power station with the highest data similarity to the target power station.
[0069] In step S300, the long short-term memory network model is pre-trained according to the reference data of the reference power station to obtain an intermediate prediction model.
[0070] The data of the target power station is set as target domain data, and the reference data of the reference power station is source domain data with high similarity to the target domain data. The source domain data is used as the input of the model pre-training. The reference power station is screened from the candidate power stations in step S200, and the reference power station is part of the candidate power stations. Correspondingly, the reference data is part of the candidate data, and the reference data of the reference power station is the candidate data when the power station is used as a candidate power station. The candidate data includes candidate environmental data and candidate power generation data, and similarly, the reference data includes reference environmental data and reference power generation data.
[0071] The photovoltaic power station power generation prediction model established in the first embodiment of the present application is implemented based on a long short-term memory network (LSTM) time series prediction model. The LSTM model is good at processing time series data and can capture the time sequence characteristics between photovoltaic power generation and meteorological environment. Through the screening of the reference power station and the use of cross-power station data, the problem that the LSTM training is limited by insufficient target power station data is solved.
[0072] Specifically, step S300 includes:
[0073] The parameters of the LSTM model are initialized as random minimum values, and the initialized parameters include the weights and biases of the LSTM, etc., to avoid gradient explosion.
[0074] The reference environmental data in the reference data is input into the long short-term memory network model, and a prediction value is output. The reference data includes reference environmental data and reference power generation data corresponding to the reference environmental data, and the reference power generation data is a true value, i.e., a true power generation. There are N pairs of reference environmental data and reference power generation data in the reference data.
[0075] According to the predicted value and the true value, the model loss deviation is calculated with reference to the following formula:
[0076]
[0077] In the formula, L is the model loss deviation, and the model loss deviation L is calculated by a mean squared error (MSE) in the first embodiment of the present application. In the formula, N is the number of samples in the reference data, x k is the true value of the kth sample, is the predicted value of the kth sample output by the long short-term memory network model.
[0078] The LSTM model is trained, and the training target is the minimization of the model loss deviation L. The model loss deviation L is converged through training. The forward propagation is performed to input the sample into the LSTM model to output the predicted value, and the backward propagation is performed to adjust the parameters of the LSTM model in the negative direction of the gradient according to the model loss deviation L. The forward propagation and the backward propagation are repeatedly performed to iteratively update the parameters of the LSTM model until the model loss deviation L no longer obviously decreases, and the convergence is considered to be achieved. The LSTM model learns the potential law in the reference data, for example, how the factors such as the light intensity and the air temperature affect the change of the photovoltaic power generation power, and the intermediate prediction model is obtained through pre-training.
[0079] In step S400, the parameters of the intermediate prediction model are fine-tuned to obtain the photovoltaic power station power generation power prediction model.
[0080] Specifically, in the fine-tuning of the intermediate prediction model in step S400, the parameters are adjusted by using a layer-by-layer unfreezing strategy, which includes the following steps.
[0081] In the initial stage, the parameters of the bottom layer and the parameters of the intermediate layer of the intermediate prediction model are frozen, and only the parameters of the top layer of the intermediate prediction model are unfrozen, wherein the top layer is the output layer, and the parameters of the top layer include the weights of the output layer. The preprocessed historical environmental data is used as a training sample, and the intermediate prediction model obtained in step S300 is input to perform the first round of parameter fine-tuning.
[0082] The parameters of the intermediate layer are unfrozen layer by layer, the preprocessed historical environmental data is used as a training sample, and the prediction model obtained after the last round of adjustment is input to perform parameter fine-tuning again. The unfreezing is performed from the output layer to the bottom layer of the intermediate prediction model, and the unfreezing is stopped when the preset depth of the intermediate layer is reached. The layer-by-layer unfreezing strategy can make the model gradually participate in the training to adapt to the characteristics of the target domain.
[0083] After the parameters of part of the layers are unfrozen in each round, the preprocessed historical environmental data is used as a training sample to perform parameter fine-tuning, and the process specifically includes the following steps.
[0084] The historical data of the target power station is preprocessed according to step S210. The preprocessed historical environmental data is taken as a training sample, and the prediction model obtained in the last round of adjustment is inputted to obtain a model prediction value; if it is the first round of training, the intermediate prediction model is inputted to obtain a model prediction value.
[0085] According to the multi-kernel maximum mean difference value of the historical data and the reference data, and the mean square error of the model prediction value and the historical power generation data, the target power station loss function L is obtained according to the following formula finetune :
[0086]
[0087] In the formula, M is the number of training samples in the historical data of the target power station, and there are M pairs of historical environmental data and historical power generation data in the historical data. is the lth historical power generation data, that is, the real photovoltaic power generation power. is the lth model prediction value. λ is a hyperparameter of the target power station loss function L finetune . MMD is the multi-kernel maximum mean difference MMD value of the historical data of the target power station and the reference data of the reference power station, which is used to measure the feature distribution difference between the source domain data and the target domain data during pre-training.
[0088] The target power station loss function L finetune is obtained, and it is judged whether fine tuning is needed by updating the model parameters.
[0089] In some embodiments, when the intermediate prediction model contains P layers, the parameter of the pth layer is set to θ (p) , where p is an integer and 1≤p≤P. p=1 represents the lowest layer of the intermediate prediction model, θ (1) represents the parameter of the bottom layer of the intermediate prediction model; p=P represents the top layer of the intermediate prediction model, θ (P) represents the output layer parameter of the intermediate prediction model.
[0090] For the pth layer, the parameter update rule is:
[0091]
[0092] In the formula, e is used to identify the training round, and η represents the learning rate. represents the loss function, represents the loss function about the gradient of the pth layer. Freeze(θ (p) ,e) is a freezing control function, which is used to judge whether the pth layer is updated in the current training round e. The freezing control function Freeze(θ (p) ,e) is defined with reference to the following formula:
[0093]
[0094] In the formula, p unfreeze (e) indicates the lowest layer number that can be updated in the current training round e, which is associated with the preset depth. The result of the freeze control function is 1 or 0 based on the preset depth.
[0095] When p < p unfreeze (e) When the freeze control function is 0, the p-th layer is a frozen layer, and the parameter θ of the p-th layer is... (p) Not participating in the update, in the above update rules due to Freeze(θ) (p) ,e)=0, parameter θ (p) It remains unchanged.
[0096] When p≥p unfreeze (e) When the freeze control function is 1, the p-th layer is the unfreeze layer, and the parameters of the p-th layer are allowed to be updated, using the above update rule combined with the learning rate η and gradient. Update the parameters.
[0097] To achieve a gradual thawing effect, p unfreeze (e) This can be adjusted according to the different training rounds e. After each training round is completed, set e = e + 1, p unfreeze (e)=p unfreeze (e)+n′, n′≥0. Gradually allow more low-level parameters to participate in the training.
[0098] In actual training, only the output layer is unfrozen during model initialization, while the intermediate and bottom layers remain frozen. As the training epochs increase, the intermediate layer parameters are gradually unfrozen downwards until a preset depth is reached, while the bottom layer parameters remain frozen throughout. This preserves the general low-level features learned in step S300 pre-training, effectively preventing the model from forgetting the general features learned in the pre-training stage during fine-tuning. This approach is particularly suitable for scenarios with limited target power plant data, helping to reduce the risk of overfitting and improve the generalization ability and stability of the prediction model.
[0099] Once the thawing reaches the preset depth, n′=0, and thawing stops. However, training can continue on the target power station, adjusting the model parameters until the loss function of the target power station converges, thus obtaining the photovoltaic power generation prediction model.
[0100] The fine-tuning in step S400 enables the model to effectively combine the data characteristics of the target power station and other power stations. Through the layer-by-layer unfreezing mechanism, while fully preserving the advantages of the original model structure, it takes into account both local characteristics and global transfer effects, ensuring that the fine-tuned model has higher prediction accuracy and robustness on the target power station.
[0101] Step S500, input the predicted environment data of the target period into the photovoltaic power station power prediction model to obtain the power prediction result of the target period of the target power station.
[0102] Specifically, the future meteorological environment data and related features of the target period are input, including solar intensity, temperature, wind speed, etc. The input data is the prediction information collected by the meteorological forecasting system or the field monitoring equipment. The environment data of the target period is input into the photovoltaic power station power prediction model fine-tuned in step S400 to obtain the power prediction result of the target period of the target power station in the future. The prediction result can be used as an important basis for subsequent energy management and power grid scheduling.
[0103] The photovoltaic power station power prediction method provided by the embodiment one further comprises:
[0104] According to the power prediction result and the actual power result, the regression performance index is calculated. The regression performance index includes root mean squared error, mean absolute error and determination coefficient.
[0105] The root mean squared error (Root Mean Squared Error, RMSE) is calculated according to the following formula:
[0106]
[0107] In the formula, is the power prediction value of the qth future period. In order to ensure the accuracy of the calculation of the regression performance index, Q future periods are set, 1≤q≤Q. The power prediction value of each future period is obtained by steps S100 to S500 provided by the embodiment one. When calculating the power prediction value of the qth future period, the qth future period is taken as the target period of the prediction. In the formula is the actual power value of the qth future period, that is, the actual power.
[0108] The mean absolute error (Mean Absolute Error, MAE) is calculated according to the following formula:
[0109]
[0110] The determination coefficient (Coefficient of Determination, ) is calculated according to the following formula:
[0111]
[0112] In the formula, is the mean value of the actual power value of the Q future periods.
[0113] The root mean square error (RMSE) highlights the impact of extreme errors; a smaller RMSE indicates higher overall model prediction accuracy. The mean absolute error (MAE) is the average of the absolute deviations between predicted and actual values, reflecting the average level of error; a smaller MAE indicates better model performance. The coefficient of determination (R²)... 2 The coefficient of determination R measures the correlation between predicted and actual values by comparing the ratio of the model's residual sum of squares to the total sum of squares. 2 The closer the value of is to 1, the better the model fits the data and the stronger its explanatory power.
[0114] In Embodiment 1 of the present invention, when calculating the regression performance index of the target power plant, when MAE≤0.1, RMSE≤0.15 and R 2 When the value is ≥0.90, the photovoltaic power generation prediction model obtained in step S500 meets the prediction accuracy requirements. If the regression performance index does not meet the threshold requirements, it is considered that the photovoltaic power generation prediction model does not meet the prediction accuracy requirements, and the parameters of the photovoltaic power generation prediction model need to be adjusted. The model can be adjusted by adjusting the hyperparameter λ, the preset depth for layer-by-layer unfreezing, or the learning rate η. Alternatively, the training input of the model can be enhanced by adjusting the candidate data of the candidate power plants used to train the model and / or the historical data of the target power plant, etc., to improve model performance.
[0115] The photovoltaic power generation prediction method provided in Embodiment 1 of this invention solves the problems of data scarcity and large distribution differences between different power plants in traditional methods by transferring knowledge from other power plants to the target power plant. By selecting data highly similar to the target power plant from different power plants for pre-training, using an LSTM model to learn the temporal features of other power plants, and then optimizing the model's performance on the target power plant through a fine-tuning process, the prediction accuracy of the target power plant is significantly improved.
[0116] Compared to photovoltaic power generation prediction methods based on training from a single power station, Embodiment 1 of this invention can effectively utilize the rich data resources of different power stations, improve the generalization ability of the model, and reduce the dependence on a large amount of labeled data from the target power station, thereby achieving efficient and accurate prediction of photovoltaic power generation.
[0117] Embodiment 2 of the present invention also provides a non-transitory machine-readable medium storing a computer program, wherein the computer program, when executed by a computer processor, is used to cause the computer to execute the photovoltaic power generation prediction method of Embodiment 1 of the present invention.
[0118] Embodiment 3 of the present invention also provides a computer program product, including a computer program, wherein the computer program, when executed by a computer processor, is used to cause the computer to execute the photovoltaic power generation prediction method of Embodiment 1 of the present invention.
[0119] Embodiment 4 of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the photovoltaic power generation prediction method of Embodiment 1 of the present invention.
[0120] refer to Figure 3 The present invention will now describe a structural block diagram of an electronic device that can serve as an embodiment of the present invention, serving as an example of a hardware device applicable to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0121] like Figure 3 As shown, the electronic device includes a computing unit 101, which can make decisions based on data stored in a read-only memory (ROM).
[0122] The computer program in ROM 102 or the computer program loaded from storage unit 108 into random access memory (RAM) 103 performs various appropriate actions and processes. RAM 103 may also store various programs and data required for the operation of the electronic device. The computing unit 101, ROM 102, and RAM 103 are interconnected via bus 104. Input / output (I / O) interface 105 is also connected to bus 104.
[0123] A plurality of components in the electronic device are connected to the I / O interface 105, including an input unit 106, an output unit 107, a storage unit 108, and a communication unit 109. The input unit 106 can be any type of device capable of inputting information to the electronic device, and can receive inputted digital or character information, as well as generate key signal inputs related to user settings and / or function controls of the electronic device. The output unit 107 can be any type of device capable of presenting information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 108 can include, but is not limited to, a magnetic disk, an optical disk. The communication unit 109 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, and / or a wireless communication transceiver, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0124] The computing unit 101 can be various general and / or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 101 include, but are not limited to, a CPU, a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing units, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 101 performs various methods and processes described above. For example, in some embodiments, the method embodiments of the present invention can be implemented as a computer program tangibly embodied in a machine-readable medium, such as the storage unit 108. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device via the ROM 102 and / or the communication unit 109. In some embodiments, the computing unit 101 can be configured to perform the above-described methods by any other appropriate means, such as by means of firmware.
[0125] The computer program for implementing the method embodiments of the present invention can be written in any combination of one or more programming languages. The computer program can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine or server, or entirely on a remote machine or server.
[0126] In the context of embodiments of the present invention, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, or infrared signals, or any suitable combination thereof. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a searchable electronic database or a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0127] It should be noted that the term "comprising" and variations thereof as used in the embodiments of the present invention are to be interpreted generically and do not exclude other steps. The term "based on" is to be interpreted as "based, at least in part, on". The term "one embodiment" means "at least one embodiment". The term "another embodiment" means "at least one additional embodiment". The term "some embodiments" means "at least some embodiments". The terms "a" or "an", as used in the context of the embodiments of the present invention, are to be interpreted as "one or more". Unless otherwise stated, the terms "or" have the inclusive, not the exclusive meaning, i.e. they allow for "either A or B" as well as "both A and B".
[0128] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0129] The steps described in the method embodiments provided by the embodiments of the present invention can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of protection of the present invention is not limited in this respect.
[0130] The word "implementation" in this description refers to the fact that the specific features, structures, or characteristics described in connection with an implementation can be included in at least one implementation of the invention. The occurrence of the phrase in various locations and repetitions of the phrase throughout the specification does not necessarily all refer to the same implementation, nor does it necessarily mean that other implementations are mutually exclusive or alternative. Each implementation described in this specification is described in a related manner, and the same or similar parts of each implementation refer to each other. In particular, for device, apparatus, system implementations, since they are basically similar to method implementations, the description is relatively simple, and the relevant parts refer to the part of the method implementation description.
[0131] The above-described implementations only express several implementation manners of the present invention, and the description is relatively specific and detailed, but it cannot be understood as a limitation on the protection scope. It should be noted that, for ordinary skilled persons in the art, under the premise of not departing from the inventive concept, a number of modifications and improvements can be made, which all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.
Claims
1. A method for predicting the power generated by a photovoltaic power plant, characterized in that, The method comprises the following steps: obtaining historical data of a target power station to be predicted and candidate data of candidate power stations; wherein the historical data comprises historical environmental data and historical power generation data; screening reference power stations from the candidate power stations according to the historical data and the candidate data; pre-training a long short-term memory network model according to reference data of the reference power stations to obtain an intermediate prediction model; adjusting parameters of the intermediate prediction model to obtain a photovoltaic power station power generation power prediction model; inputting prediction environmental data of a target period into the photovoltaic power station power generation power prediction model to obtain a power generation power prediction result of the target power station in the target period.
2. The photovoltaic power plant power generation power prediction method according to claim 1, characterized in that, The screening of the reference power stations from the candidate power stations according to the historical data and the candidate data comprises: performing data preprocessing on the historical data of the target power station and the candidate data of the candidate power stations; wherein the candidate power stations are provided in plurality and are all photovoltaic power stations other than the target power station; calculating data similarity of the candidate power stations and the target power station one by one by a multi-core maximum mean difference method; sorting the data similarity from high to low, and selecting reference power stations according to the sorting result; wherein the number of the reference power stations is preset.
3. The photovoltaic power plant power production forecasting method according to claim 2, characterized in that, The data preprocessing on the historical data of the target power station and the candidate data of the candidate power stations comprises: obtaining a corresponding relationship between the historical environmental data and the historical power generation data in the historical data, and obtaining a corresponding relationship between candidate environmental data and candidate power generation data in the candidate data; eliminating outliers in the historical data and the candidate data; obtaining supplementary data by a cubic spline interpolation method, and filling the supplementary data into positions of the outliers; performing normalization to obtain a data preprocessing result.
4. The photovoltaic power plant power production forecasting method of claim 1, wherein, The pre-training of the long short-term memory network model according to the reference data of the reference power stations to obtain the intermediate prediction model comprises: initializing parameters of the long short-term memory network model as random minimum values; inputting reference environmental data in the reference data into the long short-term memory network model to output prediction values; wherein the reference data comprises the reference environmental data and real values corresponding to the reference environmental data; calculating a model loss deviation according to the prediction values and the real values; iteratively updating parameters of the long short-term memory network model until the model loss deviation converges to obtain the intermediate prediction model.
5. The photovoltaic power plant power production forecasting method of claim 1, wherein, The adjustment of the parameters of the intermediate prediction model to obtain the photovoltaic power station power generation power prediction model comprises: freezing parameters of a bottom layer and parameters of an intermediate layer of the intermediate prediction model, unfreezing parameters of an output layer of the intermediate prediction model, and training with the preprocessed historical environmental data as training samples; unfreezing the parameters of the intermediate layer layer by layer, and training with the preprocessed historical environmental data as training samples; wherein the unfreezing is from the output layer to the bottom layer, and stops when the unfreezing reaches a preset depth of the intermediate layer; after unfreezing to the preset depth, training with the preprocessed historical environmental data as training samples to obtain the photovoltaic power station power generation power prediction model.
6. The photovoltaic power plant power production forecasting method according to claim 5, characterized in that, Training with the pretreated historical environment data as training samples comprises: inputting the training samples into the intermediate prediction model or the model obtained in the last round of training to obtain a model prediction value; obtaining a target power station loss function according to the multi-core maximum mean difference between the historical data and the reference data, and the mean square error between the model prediction value and the historical power generation data.
7. The photovoltaic power plant power production forecasting method according to claim 5, characterized in that, After training with the pretreated historical environment data as training samples, the method further comprises: obtaining a freezing control function result of 1 or 0 according to the preset depth; when the freezing control function is 1, updating the parameters of the intermediate layer according to the parameter update gradient and the learning rate; when the freezing control function is 0, keeping the parameters of the intermediate layer unchanged.
8. The photovoltaic power plant power production forecasting method of claim 1, wherein, The method further comprises: calculating a regression performance index according to the power generation power prediction result of the target period and the actual result of the power generation power of the target period; wherein the regression performance index comprises root mean square error, mean absolute error and determination coefficient; when the regression performance index does not meet the regression performance index threshold requirement, adjusting the parameters of the photovoltaic power station power generation power prediction model.
9. An electronic device comprising: A processor and a memory storing programs, characterized in that the programs comprise instructions which, when executed by the processor, cause the processor to perform the photovoltaic power station power generation power prediction method according to any one of claims 1 to 8.
10. A non-transitory machine-readable medium having stored thereon computer instructions, wherein: The computer instructions are used to make the computer execute the photovoltaic power station power generation power prediction method according to any one of claims 1 to 8.
Citation Information
Cited By
Photovoltaic power station generating capacity prediction analysis method and system based on multi-source data
CN121840583A