CN117932294A - Photovoltaic power prediction method, device, medium and electronic equipment - Google Patents

Photovoltaic power prediction method, device, medium and electronic equipment Download PDF

Info

Publication number
CN117932294A
CN117932294A CN202311701168.0A CN202311701168A CN117932294A CN 117932294 A CN117932294 A CN 117932294A CN 202311701168 A CN202311701168 A CN 202311701168A CN 117932294 A CN117932294 A CN 117932294A
Authority
CN
China
Prior art keywords
model
meteorological
initial
photovoltaic power
power prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311701168.0A
Other languages
Chinese (zh)
Inventor
刘桂生
丁鑫
石卫兵
李科文
孙建
王辉
祝锐
周勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHN Energy Jianbi Power Plant
Original Assignee
CHN Energy Jianbi Power Plant
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CHN Energy Jianbi Power Plant filed Critical CHN Energy Jianbi Power Plant
Priority to CN202311701168.0A priority Critical patent/CN117932294A/en
Publication of CN117932294A publication Critical patent/CN117932294A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure relates to the technical field of photovoltaic power prediction, and relates to a photovoltaic power prediction method, a device, a medium and electronic equipment, comprising: inputting initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, wherein the photovoltaic prediction model comprises a plurality of prediction sub-models, each prediction sub-model performs feature extraction according to extracted hidden layer features through a gating attention mechanism, and determines a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequence; and fusing the plurality of initial power prediction results to obtain a target photovoltaic power prediction result, and increasing the accuracy and the robustness of photovoltaic power prediction.

Description

Photovoltaic power prediction method, device, medium and electronic equipment
Technical Field
The disclosure relates to the technical field of photovoltaic power prediction, in particular to a photovoltaic power prediction method, a device, a medium and electronic equipment.
Background
At present, almost all developed countries and developing countries are developing solar energy greatly, and the solar energy is used as the most easily obtained clean energy, and has the characteristics of abundant resources, no pollution, free use, no transportation and the like. The most commonly used method for solar power generation is to utilize photovoltaic power generation, which can effectively relieve the problem of insufficient energy sources in social development, and reduce fossil fuel use in economic development to relieve energy pollution. Thus, the use and research of photovoltaic power generation is rapidly increasing worldwide. However, due to weather and day and night, photovoltaic power generation has strong volatility and extremely unstable. These problems can easily lead to serious errors and even dangers in the operation of the power system. Therefore, the photovoltaic power station is required to accurately predict the photovoltaic power generation power, the accurate prediction with high precision can help the power station to reduce economic loss and also can improve the effective utilization of the photovoltaic power, and is important for realizing reliable energy planning and operation management.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a photovoltaic power prediction method, apparatus, medium, and electronic device.
According to a first aspect of embodiments of the present disclosure, there is provided a photovoltaic power prediction method, including:
Inputting initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, wherein the photovoltaic prediction model comprises a plurality of prediction sub-models, each prediction sub-model performs feature extraction according to extracted hidden layer features through a gating attention mechanism, and determines a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequence;
and fusing the plurality of initial power prediction results to obtain a target photovoltaic power prediction result.
Optionally, each predictor model performs feature extraction through a gating attention mechanism according to the extracted hidden layer features, and determines a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequences, including:
each predictor model respectively performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features with different layers;
Inputting the corresponding output layer characteristics and hidden layer characteristics into a gating attention layer corresponding to the predictor model for characteristic extraction, and obtaining a characteristic meteorological sequence output by the gating attention layer, wherein the characteristic meteorological sequence comprises a gating value and an attention weight;
and determining a corresponding initial photovoltaic power prediction result according to the gating value and the attention weight value.
Optionally, the inputting the corresponding output layer feature and the hidden layer feature into a gating attention layer corresponding to the predictor model to perform feature extraction, to obtain a feature meteorological sequence output by the gating attention layer, including:
unifying the output layer characteristics and the hidden layer characteristics to be the same dimension;
respectively inputting the hidden layer characteristics and the output layer characteristics with unified dimensions into a gating attention layer corresponding to the predictor model to perform linear mapping calculation, and correspondingly obtaining a first attention component and a second attention component;
determining a gating value corresponding to the predictor model according to the first attention component and the second attention component;
Determining an intermediate variable according to the gating value of the predictor model and the corresponding layer transmission characteristic;
And determining the attention weight according to the intermediate variable.
Optionally, the predictor models are a two-way long-short-term memory model and a gating circulation unit model, each predictor model respectively performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features with different layers, and the method comprises the following steps:
the two-way long-short-term memory model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and 4 layers of hidden layer features;
And the gating circulation unit model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features of 1 layer.
Optionally, the fusing the plurality of initial power prediction results to obtain a target photovoltaic power prediction result includes:
superposing and fusing the plurality of initial power prediction results in a preset dimension space to determine target meteorological features;
And inputting the target meteorological features into a pre-trained meta-model to obtain the target photovoltaic power prediction result.
Optionally, the meta-model includes a random forest model, and the inputting the target meteorological feature into a pre-trained meta-model to obtain the target photovoltaic power prediction result includes:
Inputting target meteorological features into the random forest model, and determining a plurality of decision results through a plurality of decision trees pre-established in the random forest model;
and determining the target photovoltaic power prediction result according to the average value of the decision results.
Optionally, the decision tree in the random forest model is built by:
Extracting the sample meteorological features for a plurality of times, determining a plurality of random sample sets, and taking the plurality of random sample sets as root nodes of a decision tree;
And selecting one meteorological feature from a plurality of meteorological features of the random sample set corresponding to each node as a splitting attribute of the node according to a preset strategy to split, determining a plurality of next-stage nodes corresponding to the splitting attribute of the node, stopping splitting until a preset requirement is met, and completing the establishment of the decision tree.
Optionally, before inputting the initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, the method comprises the following steps:
Interpolating the missing values in the historical meteorological sequence data by a linear difference method, and determining the interpolated historical meteorological data;
removing abnormal data in the interpolated historical meteorological data by a standard difference method, and determining a removal result;
And carrying out normalization processing on the removal result to determine the initial meteorological sequence data.
According to a second aspect of embodiments of the present disclosure, there is provided a photovoltaic power prediction apparatus comprising:
The input module is configured to input initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, the photovoltaic prediction model comprises a plurality of prediction sub-models, each prediction sub-model performs feature extraction through a gating attention mechanism according to the extracted hidden layer features, and the corresponding initial photovoltaic power prediction result is determined according to the extracted feature meteorological sequence.
And the fusion module is configured to fuse the plurality of initial power prediction results to obtain a target photovoltaic power prediction result.
According to a third aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the method of the first aspect of the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
A memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of the first aspect of the disclosure.
According to the technical scheme, the gating attention mechanism is integrated into each predictor model, so that the time sequence learning capability of the predictor models for meteorological sequence data is improved, and the prediction results of the plurality of predictor models are integrated, so that the capability and complementarity of the predictor models are fully utilized, and the accuracy and robustness of the photovoltaic power prediction and the adaptability of the models to meteorological changes are improved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
fig. 1 is a flow chart illustrating a photovoltaic power prediction method according to an exemplary embodiment.
FIG. 2 is a schematic diagram illustrating a two-way long and short term memory model based on a gated attention mechanism, according to an example embodiment.
Fig. 3 is a schematic structural diagram of a photovoltaic prediction model, according to an example embodiment.
FIG. 4 is a schematic diagram illustrating a trained photovoltaic prediction model according to an exemplary embodiment.
Fig. 5 is a block diagram illustrating a photovoltaic power prediction apparatus according to an exemplary embodiment.
Fig. 6 is a block diagram of an electronic device, according to an example embodiment.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
It should be noted that, all actions for acquiring signals, information or data in the present disclosure are performed under the condition of conforming to the corresponding data protection rule policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
Before introducing the photovoltaic power prediction method, the photovoltaic power prediction device, the photovoltaic power prediction medium and the electronic equipment provided by the disclosure, an application scene of the disclosure is first described.
In the field of photovoltaic power prediction, because of the precision problem of geographic information and instability of meteorological information, the photovoltaic power prediction effect is not ideal, and the photovoltaic power prediction model is difficult to better cope with the condition of meteorological factor change, so that the robustness and generalization of the photovoltaic power prediction model are poor.
In view of this, in order to improve accuracy of photovoltaic power prediction, the disclosure provides a photovoltaic power prediction method, and fig. 1 is a flowchart of a photovoltaic power prediction method according to an exemplary embodiment, as shown in fig. 1, including the following steps.
In step S11, the initial meteorological sequence data is input into a pre-trained photovoltaic prediction model, and a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model are obtained.
The photovoltaic prediction model comprises a plurality of prediction sub-models, wherein each prediction sub-model performs feature extraction through a gating attention mechanism according to the extracted hidden layer features, and determines a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequences.
In one embodiment, the predictor models include BiLSTM (Bi-directional Long Short-Term Memory) models, GRU (Gate Recurrent Unit, gated loop unit) models, and RNN (Recurrent Neural Network ) models, wherein the BiLSTM models are more perceptive in capturing long-Term dependencies of meteorological sequences; the GRU model is more efficient at handling short-term dependencies in meteorological sequences or capturing local patterns.
In one embodiment, a BiLSTM model and a GRU model can be selected as predictor models in a photovoltaic prediction model, so that the perceptibility of the two models to a meteorological sequence can be combined, the capturing capability of the photovoltaic prediction model to short-term and long-term dependency of initial meteorological sequence data can be enhanced, further, a gating attention mechanism is embedded into each predictor model, namely, features initially extracted by the predictor model are input into a gating attention layer of the predictor model, the mining capability of time sequence correlation of the input features is enhanced through gating attention in the gating attention layer, for example, after the gating attention mechanism is integrated into the BiLSTM model and the GRU model, two base models of Gtaed-BiLSTM (a two-way long-short-term memory model based on the gating attention mechanism) and Gated-GRU (a gating circulation unit model based on the gating attention mechanism) can be obtained, and Gtaed-BiLSTM and Gated-GRU can be extracted according to the extracted hidden layer features, and the corresponding meteorological power prediction result can be determined according to the extracted features of the initial meteorological sequence.
FIG. 2 is a schematic view of photovoltaic power prediction of a two-way long and short term memory model based on a gated attention mechanism, according to an exemplary embodiment, as shown in FIG. 2, by first BiLSTM performing feature extraction on input initial meteorological sequence data, determining hidden layer features (HIDDEN STATE) and output layer features (features), then inputting the extracted hidden layer features and output layer features into an embedded gated attention layer, performing feature extraction through a gating network (gate) and an attention network (attention weight) in the gated attention layer, and determining a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequence.
It is worth noting that the gating attention mechanism generally consists of two key parts: an Input Gate (Input Gate) and a forget Gate (Forget Gate). The input gate determines the extent to which the input information for the current location contributes to the attention weight, while the forget gate determines whether the information for the previous location is retained. An advantage of the gated attention mechanism is that it can adaptively selectively retain and utilize information of the input sequence. By introducing an input gate and forgetting the gate, the predictor model can learn proper attention behaviors in different tasks and environments, so that the expressive capacity and generalization capacity of the model are improved. In the context of a timing prediction task, for example: photovoltaic power prediction under different meteorological environments. If the gating attention mechanism is embedded in BiLSTM and GRU models, the model can be lifted from the following two points:
First, focus time sequence: the gated attention mechanism is able to learn the importance of different positions in the sequence and add a learnable weight to the data of a particular part according to the importance. Thus BiLSTM and GRU models can focus more on time steps critical to the time-critical prediction task, ignoring time steps not critical to the prediction.
Second, alleviate long-term dependency problems: in processing long sequences, conventional RNN models may suffer from the problem of gradient extinction or gradient explosion, resulting in difficulty in capturing long-term dependencies. By gating the attention mechanism, the model can more accurately and selectively memorize or forget the information of the key time steps, thereby better capturing the long-term sequence dependence.
In one embodiment, to verify the effectiveness of the gated attention mechanism embedding module, two base models are compared to their corresponding base models, both of which are more accurate than the base models. Specific calculations are shown in table 1 below, the addition of Gated-BiLSTM and Gated-GRU to the gated attention mechanism reduced 8.82% and 20.50% on RMSE (Root Mean Square Error ) and 6.94% and 24.8% on MAE (Mean Absolute Error ), respectively, and both R2 (R-Square, goodness-of-fit) were improved, confirming the effectiveness of the gated attention mechanism module.
TABLE 1
Wherein, RMSE, R2 and MAE are regression analysis evaluation indexes. The smaller the values of RMSE and MAE, the higher the R2 value represents the higher the accuracy of the prediction.
In step S12, the multiple initial power prediction results are fused to obtain a target photovoltaic power prediction result.
In one embodiment, a plurality of initial power prediction results can be fused through an integrated learning mechanism, the fused features are learned through a meta-model, and finally a target photovoltaic power prediction result is output through the meta-model. The meta model may be an RF (Random Forest) model, and the ensemble learning mechanism may be a Stacking ensemble learning mechanism, which is a method of integrating a plurality of base models into a more powerful ensemble model, and integrating the prediction results by combining the prediction results of the plurality of base models and using one meta model, thereby realizing more accurate prediction.
In one embodiment, referring to FIG. 3, the entire photovoltaic power prediction process may be considered as one integrated large model, namely a photovoltaic prediction model (packaging-Gated-BiLSTM-GRU), which includes a gated attention embedding module and a packaging integration module. The gating attention embedding module inputs BiLSTM and GRU primary extracted features into a gating attention layer, and enhances the mining capability of the time sequence correlation of the input features by the network through gating attention. The Stacking integrated module takes Gated-BiLSTM and Gated-GRU which are obtained by embedding the gating attention as a base model, takes a random forest as a meta model, and further learns the diversity characteristics of the base model through the meta model by a Stacking integrated mechanism, so that the robustness and the prediction precision of the whole network Stacking-Gated-BiLSTM-GRU are further improved.
It should be noted that, to verify Stacking the validity of the integrated module, the integrated model Stacking-Gated-BiLSTM-GRU obtained after integration is compared with the non-integrated base model, and it can be seen from table 2 that the accuracy of the integrated model is further improved compared with that of the two base models, so that the integrated model can be better attached to the actual power, and the validity of the Stacking integrated module is demonstrated by reducing 56.66% and 65.35% on RMSE and MAE respectively.
TABLE 2
Note that: G-BiLSTM represents Gated-BiLSTM, G-GRU represents Gated-GRU, SGBG represents Stacking-Gated-BiLSTM-GRU.
In one embodiment, referring to FIG. 3, the photovoltaic prediction model is trained by first inputting a training set into a first layer learner, the first layer learner including a plurality of base learners, e.g., gated-BiLSTM and Gated-GRU, merging initial power predictions predicted by the base learners stacking, and inputting the merged results into a second layer learner, the second learning period including a meta learner, e.g., a random forest model, learning features in the merged results by the meta learner, and finally outputting the predicted results.
It should be noted that, in order to verify the superiority of the photovoltaic prediction inspection model in the photovoltaic power prediction task, the training set is selected from DKA (Desert Knowledge Australia) solar centers, a certain power station is located in australia ALICE SPRINGS, a complete one year data set of the power station 2019 is taken from the data set, the meteorological data and the power data acquisition time interval are 5min, and the meteorological factors comprise at least one of temperature, global level radiation, scattered level radiation, inclined scattered radiation, wind direction and precipitation.
In terms of experimental setting, data of 2019 1 to 10 months are selected as training samples, wherein 1 to 6 months of data are used as training set 1 for training a base model, and 6 to 10 months of data are used as training set 2 for training a meta model. The test sample is selected to be used for carrying out experiments on four single days corresponding to four different weather conditions, wherein 11 months 1 day, 11 months 2 days, 11 months 28 days and 11 months 30 respectively represent sunny days, cloudy days, rain/sunny days and yin/cloudy days.
According to the technical scheme, the gating attention mechanism is integrated into each predictor model, so that the time sequence learning capability of the predictor models for meteorological sequence data is improved, and the prediction results of the plurality of predictor models are integrated, so that the capability and complementarity of the predictor models are fully utilized, and the accuracy and robustness of the photovoltaic power prediction and the adaptability of the models to meteorological changes are improved.
Optionally, each predictor model performs feature extraction through a gating attention mechanism according to the extracted hidden layer features, and determines a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequences, including:
Firstly, each predictor model respectively performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features with different layers.
In one embodiment, the predictor models are BiLSTM models and the GRU models, for an input meteorological feature sequence of size nx1×5 (N is the sequence length, 5 is the dimension of the input meteorological feature), the BiLSTM model extracts 4 layers of hidden layer features h 1∈R4×N×64 and out 1∈RN×1×128 obtained by preliminary features, and the GRU models extract hidden layer features h 2∈R1×N×64 and out 2∈RN×1×64 obtained by preliminary features.
Where N is the length of the meteorological sequence, 5 represents the dimension of the input initial meteorological sequence data, i.e. there are 5 different meteorological factors as features, 1 is the dimension of the original sequence amplified for three-dimensional input definition adapted to pytorch environments.
And then, inputting the corresponding output layer characteristics and hidden layer characteristics into a gating attention layer corresponding to the predictor model to perform characteristic extraction, so as to obtain a characteristic meteorological sequence output by the gating attention layer, wherein the characteristic meteorological sequence comprises a gating value and an attention weight.
In one embodiment, biLSTM model inputs h 1 and out 1 to the gated attention layer for feature extraction, determines the gating value gate1 and the attention weight att_weight 1 corresponding to BiLSTM model, and the GRU model inputs h 2 and out 2 to the gated attention layer for feature extraction, determines the gating value gate 2 and the attention weight att_weight 2 corresponding to GRU model.
And finally, determining a corresponding initial photovoltaic power prediction result according to the gating value and the attention weight value.
In one embodiment, the gating value and the attention weight are multiplied to obtain a gating attention layer output (X 1,X2)∈RN ×64, wherein the gating value gate 1 corresponding to the BiLSTM model and the attention weight att_weight 1 are multiplied to obtain X 1, the gating value gate 2 corresponding to the GRU model and the attention weight att_weight 2 are multiplied to obtain X 2, and the gating attention layer output is multiplied to obtain final output characteristics of the base models Gated-BiLSTM and Gated-GRU via the full connection layer FC (Fully Connected Layer) (Y 1,Y2)∈RN×1).
Optionally, the inputting the corresponding output layer feature and the hidden layer feature into a gating attention layer corresponding to the predictor model to perform feature extraction, to obtain a feature meteorological sequence output by the gating attention layer, including:
and in the first step, the output layer characteristics and the hidden layer characteristics are unified into the same dimension.
In one embodiment, the dimensions of the output layer features and hidden layer features may be unified as n×64.
And secondly, respectively inputting the hidden layer characteristics and the output layer characteristics with unified dimensions into a gating attention layer corresponding to the predictor model to perform linear mapping calculation, and correspondingly obtaining a first attention component and a second attention component.
In one embodiment, taking a GRU model as an example, the output layer feature out 2∈RN×1×64 and the hidden layer feature h 2∈R1×N×64 determined by feature extraction of the GRU model are unified in a dimension n×64, then linear mapping calculation is performed on the unified output layer feature to determine a first attention component q=linear (h 2), linear mapping calculation is performed on the unified hidden layer feature to determine a second attention component k=linear (out 2).
And thirdly, determining a gating value corresponding to the predictor model according to the first attention component and the second attention component.
Continuing with the description of the above embodiment, the gate value gate 2:gate2 =sigmoid (q+k) of the GRU submodel is determined by the following calculation formula.
And fourthly, determining an intermediate variable according to the gating value of the predictor model and the corresponding layer transmission characteristic.
Continuing with the description of the above embodiment, the gate value gate 2 of the GRU sub-model is applied in its corresponding output layer feature out 2, i.e., the gate value is multiplied by the output layer feature to determine the intermediate variable gate_out=gate 2*out2.
And fifthly, determining the attention weight according to the intermediate variable.
Continuing with the description of the above embodiments, attention weights corresponding to the GRU submodels may be obtained by the following calculation: att_weight 2 =softmax (linear_out).
It should be noted that, the predictor model may determine the attention weight corresponding thereto through the above-mentioned one to five steps, for example, the BiLSTM submodel may determine the attention weight corresponding thereto through the above-mentioned steps, which will not be repeated herein.
Optionally, the predictor models are a two-way long-short-term memory model and a gating circulation unit model, each predictor model respectively performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features with different layers, and the method comprises the following steps:
In one aspect, the two-way long-short term memory model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and 4 layers of hidden layer features.
In one embodiment, initial meteorological feature extraction is performed on initial meteorological sequence data X with a size of nx1×5 through a BiLSTM model, and corresponding 4-layer hidden layer features h 1∈R4×N×64 and output layer features out 1∈RN×1×128 are determined.
And on the other hand, the gating circulation unit model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features of 1 layer.
In one embodiment, initial meteorological feature extraction is performed on initial meteorological sequence data X with a size of nx1×5 through a GRU model, and corresponding 1-layer hidden layer features h 2∈R1×N×64 and output layer features out 2∈RN×1×64 are determined.
It is worth noting that since BiLSTM and the GRU models have complementary model structures as base models, namely BiLSTM and the GRU are variant models of RNN, the BiLSTM model is more powerful in capturing long-term dependence of an input sequence, and has stronger perceptibility of long-distance dependence of the input sequence. The GRU model is more efficient at handling short-term dependencies and capturing local patterns. The different structures of BiLSTM and GRU models can enhance the capture ability of the integrated model to short-term and long-term dependencies of the input sequence.
Optionally, the fusing the plurality of initial power prediction results to obtain a target photovoltaic power prediction result includes:
firstly, the multiple initial power prediction results are overlapped and fused in a preset dimension space, and the target meteorological features are determined.
In one embodiment, a first initial power prediction result Y 1 is obtained through BiLSTM model prediction, wherein Y 1∈RN ×1 is obtained through GRU model prediction, a second initial power prediction result Y 2 is obtained through GRU model prediction, wherein Y 2∈RN×1 stacks Y 1 and Y 2 in a second dimension, and further, features of BiLSTM model and GRU model which are biased to different angles depending on long term and short term can be fused, so that input features of meta-model, namely target meteorological features X' er N×2, are obtained.
It should be noted that stacking integration allows the photovoltaic prediction model to take full advantage of each predictor model. By integrating multiple models, the overall model is more resistant to outliers and noise, and the overall model's adaptability to weather changes can be improved, resulting in a more reliable prediction result.
And then, inputting the target meteorological features into a pre-trained meta-model to obtain the target photovoltaic power prediction result.
Continuing to describe with the above embodiment, the target meteorological feature X' is input into the meta-model random forest RF to obtain a final output, i.e., the target photovoltaic power prediction result output e R N×1.
By the method, stability and robustness of the photovoltaic prediction model can be effectively improved.
Optionally, the meta-model includes a random forest model, and the inputting the target meteorological feature into a pre-trained meta-model to obtain the target photovoltaic power prediction result includes:
Inputting target meteorological features into the random forest model, and determining a plurality of decision results through a plurality of decision trees pre-established in the random forest model.
And determining the target photovoltaic power prediction result according to the average value of the decision results.
In one embodiment, the random forest model performs feature learning on the target meteorological features, and the target photovoltaic power prediction result is determined through the decision results of the plurality of decision trees, so that the accuracy of the prediction result of the photovoltaic prediction model is effectively improved.
It is worth noting that the photovoltaic prediction model in the present disclosure may have an outstanding photovoltaic power prediction effect under different weather environments. The calculation results of the specific precision evaluation indexes are shown in table 3, the photovoltaic prediction model is obviously improved on three precision indexes of four different types of weather, and the specific analysis is as follows:
The corresponding results for 11 months 1 day (sunny day) were 60.05% -72.22% lower on RMSE and 68.08% -78.48% lower on MAE compared to LSTM and GRU for the model herein.
Compared with LSTM and GRU, the corresponding results of 11 months and 2 days (cloudiness) show that the model is reduced by 73.90-75.28% on RMSE and 79.98-79.99% on MAE.
The corresponding results for day 28 (rain/sun) 11 months were 55.41% -70.50% lower on RMSE and 63.25% -77.29% lower on MAE compared to LSTM and GRU for the model herein.
The corresponding results for 11 months 30 days (cloudy/cloudy) were 43.01% to 54.95% lower on RMSE and 48.28% to 62.42% lower on MAE for the model herein compared to LSTM and GRU.
It is noted that while the R2 of the LSTM and GRU models compared to each other can reach above 0.98 on sunny days, there is a significant drop in the three weather changes, cloudy, rainy/sunny and cloudy/cloudy, whereas the R2 of the model herein can be maintained at a level above 0.99 on four days, which also shows that the model herein has a strong adaptability to weather changes.
The power prediction curve of the photovoltaic prediction model (SGBG) in the three different prediction models has little difference from the true value, and particularly has good fit with the true value curve under different weather conditions.
TABLE 3 Table 3
Optionally, the decision tree in the random forest model is built by:
the method comprises the steps of extracting sample meteorological features repeatedly, determining a plurality of random sample sets, and taking the plurality of random sample sets as root nodes of a decision tree.
In one embodiment, if the sample meteorological features are M, M training samples (bootstrap samples) are randomly and switchback extracted for the sample meteorological features and used as random sample sets, and each random sample set is a root node of a decision tree.
And selecting one meteorological feature from a plurality of meteorological features of the random sample set corresponding to each node as a splitting attribute of the node according to a preset strategy to split, determining a plurality of next-stage nodes corresponding to the splitting attribute of the node, stopping splitting until a preset requirement is met, and completing the establishment of the decision tree.
In one embodiment, if the feature dimension of each random sample set is K, a constant K may be set, where K is far smaller than K, K feature subsets are randomly selected from K features, when each decision tree splits, an optimal decision tree is selected from K features according to a preset strategy to split, each decision tree splits as far as possible, pruning is not performed, and splitting is stopped until a preset requirement is met, so that establishment of the decision tree is completed.
Optionally, before inputting the initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, the method comprises the following steps:
firstly, interpolating missing values in historical meteorological sequence data by a linear difference method, and determining the interpolated historical meteorological data.
It is worth to be noted that, the interpolation is performed on the missing values in the linear difference method through the linear difference method, so that accuracy and consistency of the historical meteorological data can be increased, and the time sequence corresponding to the historical meteorological data is more complete.
And then, removing abnormal data in the interpolated historical meteorological data by a standard deviation method, and determining a removal result.
And finally, carrying out normalization processing on the removal result to determine the initial meteorological sequence data.
By preprocessing the historical meteorological sequence data in the mode, the accuracy and the integrity of the initial meteorological sequence data are improved, and further the photovoltaic power prediction result is more accurate.
Fig. 5 is a block diagram illustrating a photovoltaic power prediction apparatus according to an exemplary embodiment. Referring to fig. 5, the photovoltaic power prediction apparatus 200 includes:
The input module 201 is configured to input initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, wherein the photovoltaic prediction model comprises a plurality of prediction sub-models, each prediction sub-model performs feature extraction according to extracted hidden layer features through a gating attention mechanism, and determines a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequence.
And the fusion module 202 is configured to fuse the plurality of initial power prediction results to obtain a target photovoltaic power prediction result.
Optionally, the input module 201 is configured to:
each predictor model respectively performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features with different layers;
Inputting the corresponding output layer characteristics and hidden layer characteristics into a gating attention layer corresponding to the predictor model for characteristic extraction, and obtaining a characteristic meteorological sequence output by the gating attention layer, wherein the characteristic meteorological sequence comprises a gating value and an attention weight;
and determining a corresponding initial photovoltaic power prediction result according to the gating value and the attention weight value.
Optionally, the input module 201 is configured to:
unifying the output layer characteristics and the hidden layer characteristics to be the same dimension;
respectively inputting the hidden layer characteristics and the output layer characteristics with unified dimensions into a gating attention layer corresponding to the predictor model to perform linear mapping calculation, and correspondingly obtaining a first attention component and a second attention component;
determining a gating value corresponding to the predictor model according to the first attention component and the second attention component;
Determining an intermediate variable according to the gating value of the predictor model and the corresponding layer transmission characteristic;
And determining the attention weight according to the intermediate variable.
Optionally, the predictor model is a two-way long-short term memory model and a gating loop unit model, and the input module 201 is configured to:
the two-way long-short-term memory model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and 4 layers of hidden layer features;
And the gating circulation unit model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features of 1 layer.
Optionally, the fusion module 202 is configured to:
superposing and fusing the plurality of initial power prediction results in a preset dimension space to determine target meteorological features;
And inputting the target meteorological features into a pre-trained meta-model to obtain the target photovoltaic power prediction result.
Optionally, the fusion module 202 is configured to:
Inputting target meteorological features into the random forest model, and determining a plurality of decision results through a plurality of decision trees pre-established in the random forest model;
and determining the target photovoltaic power prediction result according to the average value of the decision results.
Optionally, the fusion module 202 is configured to:
Extracting the sample meteorological features for a plurality of times, determining a plurality of random sample sets, and taking the plurality of random sample sets as root nodes of a decision tree;
And selecting one meteorological feature from a plurality of meteorological features of the random sample set corresponding to each node as a splitting attribute of the node according to a preset strategy to split, determining a plurality of next-stage nodes corresponding to the splitting attribute of the node, stopping splitting until a preset requirement is met, and completing the establishment of the decision tree.
Optionally, the input module 201 is configured to:
Interpolating the missing values in the historical meteorological sequence data by a linear difference method, and determining the interpolated historical meteorological data;
removing abnormal data in the interpolated historical meteorological data by a standard difference method, and determining a removal result;
And carrying out normalization processing on the removal result to determine the initial meteorological sequence data.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The present disclosure also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the photovoltaic power prediction method provided by the present disclosure.
The present disclosure also provides an electronic device, including:
A memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the photovoltaic power prediction method provided by the present disclosure.
Fig. 6 is a block diagram of an electronic device 700, according to an example embodiment. As shown in fig. 6, the electronic device 700 may include: a processor 701, a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700 to perform all or part of the steps in the photovoltaic power prediction method described above. The memory 702 is used to store various types of data to support operation on the electronic device 700, which may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, messages sent and received, pictures, audio, video, and so forth. The Memory 702 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 703 can include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 702 or transmitted through the communication component 705. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is for wired or wireless communication between the electronic device 700 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, near Field Communication (NFC) for short, 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or a combination of more of them, is not limited herein. The corresponding communication component 705 may thus comprise: wi-Fi module, bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASIC), digital signal Processor (DIGITAL SIGNAL Processor, DSP), digital signal processing device (DIGITAL SIGNAL Processing Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field Programmable GATE ARRAY, FPGA), controller, microcontroller, microprocessor, or other electronic component for performing the above-described photovoltaic power prediction method.
In another exemplary embodiment, a computer readable storage medium is also provided comprising program instructions which, when executed by a processor, implement the steps of the photovoltaic power prediction method described above. For example, the computer readable storage medium may be the memory 702 including program instructions described above, which are executable by the processor 701 of the electronic device 700 to perform the photovoltaic power prediction method described above.
Fig. 7 is a block diagram illustrating an electronic device 1900 according to an example embodiment. For example, electronic device 1900 may be provided as a server. Referring to fig. 7, the electronic device 1900 includes a processor 1922, which may be one or more in number, and a memory 1932 for storing computer programs executable by the processor 1922. The computer program stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, the processor 1922 may be configured to execute the computer program to perform the photovoltaic power prediction method described above.
In addition, the electronic device 1900 may further include a power component 1926 and a communication component 1950, the power component 1926 may be configured to perform power management of the electronic device 1900, and the communication component 1950 may be configured to enable communication of the electronic device 1900, e.g., wired or wireless communication. In addition, the electronic device 1900 may also include an input/output (I/O) interface 1958. Electronic device 1900 may operate based on an operating system stored in memory 1932.
In another exemplary embodiment, a computer readable storage medium is also provided comprising program instructions which, when executed by a processor, implement the steps of the photovoltaic power prediction method described above. For example, the non-transitory computer readable storage medium may be the memory 1932 described above including program instructions that are executable by the processor 1922 of the electronic device 1900 to perform the photovoltaic power prediction method described above.
In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described photovoltaic power prediction method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the embodiments described above, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the foregoing embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, the present disclosure does not further describe various possible combinations.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (11)

1. A method of photovoltaic power prediction, the method comprising:
Inputting initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, wherein the photovoltaic prediction model comprises a plurality of prediction sub-models, each prediction sub-model performs feature extraction according to extracted hidden layer features through a gating attention mechanism, and determines a corresponding initial photovoltaic power prediction result according to the extracted feature meteorological sequence;
and fusing the plurality of initial power prediction results to obtain a target photovoltaic power prediction result.
2. The method of claim 1, wherein each predictor model performs feature extraction by a gated attention mechanism based on the extracted hidden layer features, and determines a corresponding initial photovoltaic power prediction result based on the extracted feature weather sequence, comprising:
each predictor model respectively performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features with different layers;
Inputting the corresponding output layer characteristics and hidden layer characteristics into a gating attention layer corresponding to the predictor model for characteristic extraction, and obtaining a characteristic meteorological sequence output by the gating attention layer, wherein the characteristic meteorological sequence comprises a gating value and an attention weight;
and determining a corresponding initial photovoltaic power prediction result according to the gating value and the attention weight value.
3. The method according to claim 2, wherein the inputting the corresponding output layer features and the hidden layer features into the gated attention layer corresponding to the predictor model performs feature extraction to obtain the characteristic weather sequence output by the gated attention layer, and includes:
unifying the output layer characteristics and the hidden layer characteristics to be the same dimension;
respectively inputting the hidden layer characteristics and the output layer characteristics with unified dimensions into a gating attention layer corresponding to the predictor model to perform linear mapping calculation, and correspondingly obtaining a first attention component and a second attention component;
determining a gating value corresponding to the predictor model according to the first attention component and the second attention component;
Determining an intermediate variable according to the gating value of the predictor model and the corresponding output layer characteristic;
And determining the attention weight according to the intermediate variable.
4. The method of claim 2, wherein the predictive sub-models are a two-way long-short-term memory model and a gated loop unit model, and each predictive sub-model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features with different layers, and the method comprises the steps of:
the two-way long-short-term memory model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and 4 layers of hidden layer features;
And the gating circulation unit model performs initial meteorological feature extraction on the initial meteorological sequence data to obtain corresponding output layer features and hidden layer features of 1 layer.
5. The method of claim 1, wherein the fusing the plurality of initial power predictions to obtain a target photovoltaic power prediction comprises:
superposing and fusing the plurality of initial power prediction results in a preset dimension space to determine target meteorological features;
And inputting the target meteorological features into a pre-trained meta-model to obtain the target photovoltaic power prediction result.
6. The method of claim 5, wherein the meta-model comprises a random forest model, wherein the inputting the target meteorological features into a pre-trained meta-model results in the target photovoltaic power prediction result, comprising:
Inputting target meteorological features into the random forest model, and determining a plurality of decision results through a plurality of decision trees pre-established in the random forest model;
and determining the target photovoltaic power prediction result according to the average value of the decision results.
7. The method of claim 6, wherein the decision tree in the random forest model is created by:
Extracting the sample meteorological features for a plurality of times, determining a plurality of random sample sets, and taking the plurality of random sample sets as root nodes of a decision tree;
And selecting one meteorological feature from a plurality of meteorological features of the random sample set corresponding to each node as a splitting attribute of the node according to a preset strategy to split, determining a plurality of next-stage nodes corresponding to the splitting attribute of the node, stopping splitting until a preset requirement is met, and completing the establishment of the decision tree.
8. The method of any one of claims 1-7, comprising, prior to inputting initial weather sequence data into a pre-trained photovoltaic prediction model, obtaining a plurality of initial photovoltaic power predictions output by the photovoltaic prediction model:
Interpolating the missing values in the historical meteorological sequence data by a linear difference method, and determining the interpolated historical meteorological data;
removing abnormal data in the interpolated historical meteorological data by a standard difference method, and determining a removal result;
And carrying out normalization processing on the removal result to determine the initial meteorological sequence data.
9. A photovoltaic power generation apparatus, comprising:
the input module is configured to input initial meteorological sequence data into a pre-trained photovoltaic prediction model to obtain a plurality of initial photovoltaic power prediction results output by the photovoltaic prediction model, the photovoltaic prediction model comprises a plurality of prediction sub-models, each prediction sub-model performs feature extraction through a gating attention mechanism according to the extracted hidden layer features, and the corresponding initial photovoltaic power prediction result is determined according to the extracted feature meteorological sequence;
and the fusion module is configured to fuse the plurality of initial power prediction results to obtain a target photovoltaic power prediction result.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-8.
11. An electronic device, comprising:
A memory having a computer program stored thereon;
A processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-8.
CN202311701168.0A 2023-12-11 2023-12-11 Photovoltaic power prediction method, device, medium and electronic equipment Pending CN117932294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311701168.0A CN117932294A (en) 2023-12-11 2023-12-11 Photovoltaic power prediction method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311701168.0A CN117932294A (en) 2023-12-11 2023-12-11 Photovoltaic power prediction method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117932294A true CN117932294A (en) 2024-04-26

Family

ID=90756315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311701168.0A Pending CN117932294A (en) 2023-12-11 2023-12-11 Photovoltaic power prediction method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117932294A (en)

Similar Documents

Publication Publication Date Title
Al-Dahidi et al. Assessment of artificial neural networks learning algorithms and training datasets for solar photovoltaic power production prediction
Saeed et al. Hybrid bidirectional LSTM model for short-term wind speed interval prediction
CN111784041B (en) Wind power prediction method and system based on graph convolution neural network
CN113592185B (en) Power load prediction method based on Transformer
CN106845644A (en) A kind of heterogeneous network of the contact for learning user and Mobile solution by correlation
CN113988477A (en) Photovoltaic power short-term prediction method and device based on machine learning and storage medium
CN113157886B (en) Automatic question and answer generation method, system, terminal and readable storage medium
CN111967675A (en) Photovoltaic power generation amount prediction method and prediction device
CN112733701A (en) Robust scene recognition method and system based on capsule network
CN114077913A (en) Method and system for multi-step prediction of future wind speed based on automatic reservoir neural network
Li et al. Evolutionary deep learning with extended Kalman filter for effective prediction modeling and efficient data assimilation
CN114492978A (en) Time-space sequence prediction method and device based on multi-layer attention mechanism
Suresh et al. Probabilistic LSTM-Autoencoder based hour-ahead solar power forecasting model for intra-day electricity market participation: A Polish case study
CN115347571A (en) Photovoltaic power generation power short-term prediction method and device based on transfer learning
TWI684927B (en) Prediction system and method for solar photovoltaic power generation
Bento et al. Ocean wave power forecasting using convolutional neural networks
CN116362363A (en) Water quality prediction method, device, equipment and storage medium
Thangavelu et al. Forecasting of solar radiation for a cleaner environment using robust machine learning techniques
CN117932294A (en) Photovoltaic power prediction method, device, medium and electronic equipment
CN115587664B (en) Solar radiation prediction method and system based on graph convolution long-short-term memory network
CN110751430A (en) Method and apparatus for determining delivery time, storage medium, and electronic device
CN114418243B (en) Distributed new energy cloud grid prediction method and system
Bosma et al. Estimating solar and wind power production using computer vision deep learning techniques on weather maps
Peng et al. Short‐term wind power prediction based on stacked denoised auto‐encoder deep learning and multi‐level transfer learning
Pham et al. LS-SPP: A LSTM-Based Solar Power Prediction Method from Weather Forecast Information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination