Disclosure of Invention
In view of the above, the application provides a photovoltaic power station power prediction method, a device and related equipment, so as to predict photovoltaic power generation power of a photovoltaic power station.
To achieve the above object, a first aspect of the present application provides a photovoltaic power station power prediction method, including:
acquiring a weather forecast time sequence of a photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period;
inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point;
the power prediction model is obtained by training a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels;
The second time period is before the first time period, and the second time period is different from the first time period by a preset time interval, and the first time point is the last time point in the first time period;
the fourth time period is before the third time period, the fourth time period and the third time period are different by the preset time interval, and the second time point is the last time point in the third time period.
Preferably, the power prediction model comprises a first cyclic neural network layer, a first fully connected layer, a second cyclic neural network layer and a second fully connected layer;
the weather forecast time sequence and the irradiation intensity actual measurement time sequence are input into the first cyclic neural network layer, and the first cyclic neural network layer performs feature extraction on the weather forecast time sequence and the irradiation intensity actual measurement time sequence to obtain a first feature representation;
the first full-connection layer maps the first characteristic representation into a first sample tag space to obtain a first output variable, wherein the first output variable comprises weather forecast data;
the power actually measured time sequence is combined with the first output variable and then is input to the second circulating neural network layer;
The second cyclic neural network layer performs feature extraction on the power actual measurement time sequence and the first output variable to obtain a second feature representation;
the second full-connection layer maps the second feature representation into a second sample tag space to obtain a second output variable, wherein the second output variable comprises a power predicted value.
Preferably, the weather forecast time sequence includes a temperature forecast time sequence, a humidity forecast time sequence, a wind speed forecast time sequence, and an irradiation intensity forecast time sequence;
the meteorological measured data comprise a temperature measured value, a humidity measured value, a wind speed measured value and an irradiation intensity measured value;
each data item in the weather forecast data comprises a temperature forecast value, a humidity forecast value, a wind speed forecast value and an irradiation intensity forecast value;
the number of the neurons of the first full-connection layer is more than or equal to 5, and 4 neurons in the first full-connection layer respectively correspond to each data item in the weather forecast data; the number of neurons of the second fully connected layer is 1, and the neurons of the second fully connected layer correspond to the power predicted value.
Preferably, the training process of the power prediction model includes:
Acquiring a historical weather forecast data set, a historical weather actual measurement data set and a historical power actual measurement data set of the photovoltaic power station, wherein the historical weather forecast data set comprises weather forecast data of a plurality of historical time points, the historical weather actual measurement data set comprises weather actual measurement data of a plurality of historical time points, and the historical power actual measurement data set comprises power actual measurement data of a plurality of historical time points;
respectively carrying out data processing on the historical weather forecast data set, the historical weather actual measurement data set and the historical power actual measurement data set to obtain a historical weather forecast time sequence, a historical weather actual measurement time sequence and a historical power actual measurement time sequence, wherein the data processing is used for realizing data standardization and data completion;
constructing a training set based on the historical weather forecast time sequence, the historical weather actual measurement time sequence and the historical power actual measurement time sequence;
and training the power prediction model based on the training set and a preset loss function.
Preferably, the loss function is:
where n is the number of samples in the training set,
、/>
、/>
and->
For a preset weight coefficient, +. >
、
、/>
、/>
And->
Respectively the power measured value, the temperature measured value, the humidity measured value, the wind speed measured value and the irradiation intensity measured value of the ith sample, +.>
、/>
、/>
、/>
And->
The power predicted value, the temperature predicted value, the humidity predicted value, the wind speed predicted value and the irradiation intensity predicted value of the ith sample are respectively.
Preferably, the first period is N hours from a preset time to the preset time, N is a preset value, and the preset time interval is 24 hours;
the method for obtaining the weather forecast time sequence of the photovoltaic power station in the first time period, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the second time period comprises the following steps:
acquiring weather forecast data of a photovoltaic power station in a first time period, wherein the weather forecast data comprises temperature forecast data, humidity forecast data, wind speed forecast data and irradiation intensity forecast data;
performing interpolation operation on the weather forecast data to obtain a temperature forecast time sequence, a humidity forecast time sequence, a wind speed forecast time sequence and an irradiation intensity forecast time sequence;
obtaining the irradiation intensity measured data and the power measured data of the photovoltaic power station in a second time period, and respectively carrying out interpolation operation on the irradiation intensity measured data and the power measured data to obtain an irradiation intensity measured time sequence and a power measured time sequence;
Each time series within the same time period has the same time point and sequence length.
Preferably, the value of N is 4 and the number of time points per hour is 4.
A second aspect of the present application provides a photovoltaic power plant power prediction apparatus, comprising:
the data acquisition unit is used for acquiring a weather forecast time sequence of the photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period;
the power prediction unit is used for inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point;
the power prediction model is obtained by training a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels;
the second time period is before the first time period, and the second time period is different from the first time period by a preset time interval, and the first time point is the last time point in the first time period;
The fourth time period is before the third time period, the fourth time period and the third time period are different by the preset time interval, and the second time point is the last time point in the third time period.
A third aspect of the present application provides a photovoltaic power plant power prediction apparatus comprising: a memory and a processor;
the memory is used for storing programs;
the processor is used for executing the program to realize the steps of the photovoltaic power station power prediction method.
A fourth aspect of the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a photovoltaic power plant power prediction method as described above.
According to the technical scheme, the weather forecast time sequence of the photovoltaic power station in the first time period, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the second time period are firstly obtained. The second time period is before the first time period, namely the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the second time period are historical actual measurement data; and the second time period is different from the first time period by a preset time interval, wherein the preset time interval has a sunlight periodicity attribute, so that the meteorological data of the second time period has a certain reference meaning for the first time period. And then, inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point. Wherein the first time point is the last time point in the first time period, and it can be understood that each time point in each time period corresponds to a time point of each element in the time sequence in the time period. It should be noted that, the power prediction model is obtained by training with a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels. Wherein the second time point is the last time point in the third time period; the fourth time period is before the third time period, namely the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the fourth time period are historical actual measurement data; and the fourth time period is different from the third time period by the preset time interval, and the preset time interval has a sunlight periodicity attribute, so that the meteorological data of the fourth time period has a certain reference meaning for the third time period. The method and the system utilize the correlation of the weather data in time, the correlation of the weather forecast data and the weather actual measurement data and the correlation of the weather data and the power of the photovoltaic power station to train the power prediction model, so that the power prediction model can predict the power value based on the weather forecast data, the historical irradiation intensity actual measurement data and the historical power actual measurement data, and have important application value.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The machine learning model applied to photovoltaic power generation power prediction mainly comprises a cyclic neural network model, a convolutional neural network model and a transducer series model. Based on given data, such as numerical weather forecast, photovoltaic power plant power, meteorological monitoring data, etc., such machine learning methods train a model to learn the mapping of the given data to photovoltaic power generation power, and this trained model is then used to predict the power generation power of the power plant for future time periods.
The observed quantity for predicting the photovoltaic power generation power includes the following components: 1) Data of numerical weather forecast: forecasting temperature, forecasting humidity, forecasting wind speed and forecasting irradiation intensity; 2) Site weather monitoring data: measured temperature, measured humidity, measured wind speed, and measured irradiation intensity; 3) Actual power generated. Photovoltaic power generation power prediction is classified into short-term photovoltaic power generation power prediction (3 days in the future, 15 minutes in time resolution) and ultra-short-term photovoltaic power generation power prediction (15 minutes to 4 hours in the future, 15 minutes in time resolution) according to a prediction range.
In theory, the correlation between the photovoltaic power generation power and the real irradiation intensity is closer, and because the real irradiation intensity data of the corresponding time point is not obtained when the future photovoltaic power generation power is predicted, only the data such as the historical measured irradiation intensity, the predicted irradiation intensity and the like can be adopted.
In order to realize the power prediction of the photovoltaic power station, referring to fig. 1, two models may be constructed, specifically, first, a mapping relationship of a predicted temperature (P) TP, a predicted humidity (P) RH, a predicted wind speed (P) WS, a predicted irradiation intensity (P) SR, a historical measured irradiation intensity (M) SR to the measured irradiation intensity SR is constructed, that is, a machine learning model a is trained based on the predicted meteorological data and the historical measured irradiation intensity data, and is used for predicting the irradiation intensity SR. Then training a machine learning model B based on the predicted irradiation intensity SR and the predicted temperature (P) TP, the predicted humidity (P) RH, the predicted wind speed (P) WS and the historical power (M) PV for predicting the photovoltaic power PV. In the method, both models define input and output, and the degree of freedom of the models is not high. In view of this, the present application attempts to write the two models to a model framework and introduce a new intermediate variable to increase the degrees of freedom of the models.
The photovoltaic power station power prediction method provided by the embodiment of the application is described below. Referring to fig. 2, the photovoltaic power station power prediction method provided in the embodiment of the present application may include the following steps:
step S101, a weather forecast time sequence of the photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period are obtained.
It is understood that the first time period is equal in length to the second time period; the weather forecast time sequence in the first time period consists of weather forecast data of all time points in the first time, wherein the weather forecast data can comprise temperature, humidity, wind speed, irradiation intensity, ultraviolet intensity and the like. The irradiation intensity actual measurement time sequence in the second time period consists of irradiation intensity actual measurement data of each time point in the second time period; the power measured time sequence in the second time period consists of power measured data of each time point in the second time period.
Step S102, inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point.
As shown in fig. 3, the second time period is before the first time period, and the second time period is different from the first time period by a preset time interval, and the first time point is the last time point in the first time period. It will be appreciated that there are a plurality of points in time within each time period, each point in time within each time period being in one-to-one correspondence with each element in the time series within that time period. The preset time interval has a insolation periodic attribute or other related attributes, so that the meteorological data of the second time period has a certain reference meaning for the first time period.
By way of example, assuming that the photovoltaic power plant needs to be predicted for photovoltaic power generation at 11:45 pm on 3 months 6 days, then the first time period may be set to 8:00 am to 11:45 pm on 3 months 6 days, and the second time period may be set to 8:00 am to 11:45 pm on 3 months 5 days. It will be appreciated that the weather forecast time series is provided with data points at 11:45 noon, i.e. the time point 11:45 noon is the last time point of the first and second time periods.
The power prediction model is obtained by training a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels.
As shown in fig. 4, the third period is equal in length to the fourth period; the fourth time period is before the third time period, and the fourth time period is different from the third time period by a preset time interval, and the second time point is the last time point in the third time period. It will be appreciated that there are a plurality of points in time within each time period, each point in time within each time period being in one-to-one correspondence with each element in the time series within that time period. The preset time interval is identical to the preset time interval, and also has a solar periodic attribute or other related attribute, so that the meteorological data of the fourth time period has a certain reference meaning for the third time period.
Illustratively, as shown in fig. 5, assume that the third time period is 8:00 a.m. for 3 months and 6 days to 11:45 a.m., the fourth time period is 8:00 a.m. for 3 months and 5 days to 11:45 a.m., and 11:45 a last time point (i.e., the second time point) of the third time period. Then, the data in the solid line box in the figure is the training sample, and the data in the broken line box is the sample label corresponding to the training sample. Wherein, (P) TP, (P) RH, (P) WS, and (P) SR respectively represent temperature forecast data, humidity forecast data, wind speed forecast data, and irradiation intensity forecast data; (M) TP, (M) RH, (M) WS, and (M) SR respectively represent temperature measured data, humidity measured data, wind speed measured data, and irradiation intensity measured data; (M) PV represents the measured power value.
According to the method, firstly, a weather forecast time sequence of a photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period are obtained. The second time period is before the first time period, namely the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the second time period are historical actual measurement data; and the second time period is different from the first time period by a preset time interval, wherein the preset time interval has a sunlight periodicity attribute, so that the meteorological data of the second time period has a certain reference meaning for the first time period. And then, inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point. Wherein the first time point is the last time point in the first time period, and it can be understood that each time point in each time period corresponds to a time point of each element in the time sequence in the time period. It should be noted that, the power prediction model is obtained by training with a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels. Wherein the second time point is the last time point in the third time period; the fourth time period is before the third time period, namely the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the fourth time period are historical actual measurement data; and the fourth time period is different from the third time period by the preset time interval, and the preset time interval has a sunlight periodicity attribute, so that the meteorological data of the fourth time period has a certain reference meaning for the third time period. The method and the system utilize the correlation of the weather data in time, the correlation of the weather forecast data and the weather actual measurement data and the correlation of the weather data and the power of the photovoltaic power station to train the power prediction model, so that the power prediction model can predict the power value based on the weather forecast data, the historical irradiation intensity actual measurement data and the historical power actual measurement data, and have important application value.
In some embodiments of the present application, the aforementioned weather forecast time sequences include a temperature forecast time sequence, a humidity forecast time sequence, a wind speed forecast time sequence, and an irradiance intensity forecast time sequence.
The weather measured data comprise a temperature measured value, a humidity measured value, a wind speed measured value and an irradiation intensity measured value.
Each data item in the weather forecast data comprises a temperature forecast value, a humidity forecast value, a wind speed forecast value and an irradiation intensity forecast value.
In some embodiments of the present application, the first period of time mentioned in step S101 is N hours from the preset time to the preset time, N is a preset value, and the preset time interval is 24 hours.
The above setting of the time interval is applicable to the case where the weather is relatively stable and the weather conditions on adjacent dates are relatively close.
In some embodiments of the present application, the value of N is 4 and the number of time points per hour is 4. I.e. 4 data points per hour (one data point per 15 minutes), in this case 16 data points per time series, i.e. a series length of 16.
It is understood that the duration setting and the data point setting of the second time period are also consistent with the first time period. As can be seen from the foregoing description, the input of the power prediction model includes a weather forecast time sequence in the first period, an irradiation intensity actual measurement time sequence in the second period, and a power actual measurement time sequence, and the weather forecast time sequence includes 4 time sequences of temperature, humidity, wind speed, and irradiation intensity, that is, the input of the power prediction model includes 6 time sequences. Then, it can be deduced that the dimension of the power prediction model input data at the model training is
Wherein->
For batch_size,16 is the sequence length (time covered is +.>
) 6 is the number of feature numbers (corresponding to 6 time series), and the output of the power prediction model includes +.>
Temperature predicted value, humidity predicted value, wind speed predicted value, irradiation intensity predicted value and power predicted value at moment, namely dimension of marked data is +.>
。
In some embodiments of the present application, step S101 obtains a weather forecast time sequence of the photovoltaic power station in the first period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in the second period, which may include:
s1, weather forecast data of the photovoltaic power station in a first time period are obtained.
The weather forecast data comprises temperature forecast data, humidity forecast data, wind speed forecast data and irradiation intensity forecast data.
And S2, carrying out interpolation operation on the weather forecast data to obtain a temperature forecast time sequence, a humidity forecast time sequence, a wind speed forecast time sequence and an irradiation intensity forecast time sequence.
S3, obtaining the irradiation intensity measured data and the power measured data of the photovoltaic power station in the second time period, and respectively carrying out interpolation operation on the irradiation intensity measured data and the power measured data to obtain an irradiation intensity measured time sequence and a power measured time sequence.
For each time sequence in the same time period, each time sequence has the same time point and sequence length after interpolation operation.
In some embodiments of the present application, as shown in fig. 6, the power prediction model mentioned in step S102 may include a first recurrent neural network layer, a first fully connected layer, a second recurrent neural network layer, and a second fully connected layer.
The first and second recurrent neural network layers may be, for example, GRU networks (gated recurrent neural network, gated recurrent neural networks). The workflow of each component in the power prediction model is as follows:
the weather forecast time sequence and the irradiation intensity actual measurement time sequence are input into a first cyclic neural network layer, and the first cyclic neural network layer performs feature extraction on the weather forecast time sequence and the irradiation intensity actual measurement time sequence to obtain a first feature representation.
The first full-connection layer maps the first feature representation into a first sample tag space to obtain a first output variable, wherein the first output variable comprises weather forecast data.
And the power actually-measured time sequence is combined with the first output variable and then is input into the second cyclic neural network layer.
And the second cyclic neural network layer performs feature extraction on the power actual measurement time sequence and the first output variable to obtain a second feature representation.
The second full connection layer maps the second feature representation into a second sample tag space to obtain a second output variable, wherein the second output variable comprises a power prediction value.
It will be appreciated that this first output variable is an intermediate variable that is used in model training for supervised learning. More of the practical concern in model applications is the second output variable.
In fig. 6, the weather forecast time series includes a temperature forecast time series (P) TP, a humidity forecast time series (P) RH, a wind speed forecast time series (P) WS, and an irradiation intensity forecast time series (P) SR.
The above embodiment merges the machine learning model a for predicting site weather data and the machine learning model B for predicting power generation into one model frame, improving convenience of model application.
In some embodiments of the present application, as shown in fig. 6, the number of neurons of the first fully connected layer is greater than or equal to 5, and 4 neurons in the first fully connected layer respectively correspond to each data item in the weather forecast data; the number of neurons of the second fully connected layer is 1, and the neurons of the second fully connected layer correspond to the power prediction value.
Fig. 6 illustrates only the case where the number of neurons is 5, specifically corresponding to the intermediate output variable shown in the dashed box, in which 1 more free neurons output variable F, and the other 4 neurons output temperature predicted values TP, humidity predicted values RH, wind speed predicted values, WS irradiation intensity predicted values SR, respectively, corresponding to the first output variable.
Since there are only 4 neurons constrained in the first fully connected layer, and the number of neurons in the first fully connected layer is greater than or equal to 5, more unconstrained neurons can extract unnamed physical features from the data, so that the capability of extracting information from the model is enhanced, and the degree of freedom of the model is improved from the viewpoint of the intermediate output quantity of the model.
In some embodiments of the present application, the foregoing training process of the power prediction model may include the following steps:
step S201, a historical weather forecast data set, a historical weather actual measurement data set and a historical power actual measurement data set of the photovoltaic power station are obtained.
The historical weather forecast data set may include weather forecast data of a plurality of historical time points, the historical weather actual measurement data set may include weather actual measurement data of a plurality of historical time points, and the historical power actual measurement data set may include power actual measurement data of a plurality of historical time points.
Step S202, respectively carrying out data processing on the historical weather forecast data set, the historical weather actual measurement data set and the historical power actual measurement data set to obtain a historical weather forecast time sequence, a historical weather actual measurement time sequence and a historical power actual measurement time sequence.
The data processing is used for realizing data standardization and data completion. Specifically, when a data loss occurs, interpolation is performed by using a suitable mathematical method to complement the missing data. After the data are completed, all the data are normalized by using a proper normalization method.
Step S203, a training set is constructed based on the historical weather forecast time sequence, the historical weather actual measurement time sequence and the historical power actual measurement time sequence.
Step S204, training the power prediction model based on the training set and a preset loss function.
Specifically, training samples in a training set are input into a power prediction model one by one to obtain output weather prediction data and a power prediction value, wherein the weather prediction data is an intermediate output quantity, the power prediction value is a final output quantity, a loss value is calculated based on the output quantities, a loss function and sample labels corresponding to the training samples, and whether the power prediction model is trained is judged based on the loss value. If not, transmitting the loss value to a power prediction model for adjusting model parameters; if yes, determining the model at the moment as a finally adopted model, and obtaining a trained power prediction model.
In some embodiments of the present application, the mean square error (mean squared error, MSE) may be utilized to evaluate model performance. Based on this, the aforementioned loss function may be:
wherein n is the number of samples in the training set;
、/>
、/>
and->
The parameters are settable for preset weight coefficients, can be preset according to practical application, and besides the free neurons, the degree of freedom of the model can be increased to a certain extent by introducing the weight coefficients; />
、/>
、/>
、/>
And->
Respectively the power measured value, the temperature measured value, the humidity measured value, the wind speed measured value and the irradiation intensity measured value of the ith sample; />
、/>
、/>
、
And->
The power predicted value, the temperature predicted value, the humidity predicted value, the wind speed predicted value and the irradiation intensity predicted value of the ith sample are respectively.
The photovoltaic power station power prediction device provided by the embodiment of the present application is described below, and the photovoltaic power station power prediction device described below and the photovoltaic power station power prediction method described above may be referred to correspondingly.
Referring to fig. 7, the photovoltaic power station power prediction apparatus provided in the embodiment of the present application may include:
a data acquisition unit 21, configured to acquire a weather forecast time sequence of the photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period;
The power prediction unit 22 is configured to input the weather forecast time sequence, the irradiation intensity actual measurement time sequence, and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point;
the power prediction model is obtained by training a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels;
the second time period is before the first time period, and the second time period is different from the first time period by a preset time interval, and the first time point is the last time point in the first time period;
the fourth time period is before the third time period, the fourth time period and the third time period are different by the preset time interval, and the second time point is the last time point in the third time period.
In some embodiments of the present application, the photovoltaic power plant power prediction apparatus further comprises a model training unit for performing training of a power prediction model, the training process may include:
Acquiring a historical weather forecast data set, a historical weather actual measurement data set and a historical power actual measurement data set of the photovoltaic power station, wherein the historical weather forecast data set comprises weather forecast data of a plurality of historical time points, the historical weather actual measurement data set comprises weather actual measurement data of a plurality of historical time points, and the historical power actual measurement data set comprises power actual measurement data of a plurality of historical time points;
respectively carrying out data processing on the historical weather forecast data set, the historical weather actual measurement data set and the historical power actual measurement data set to obtain a historical weather forecast time sequence, a historical weather actual measurement time sequence and a historical power actual measurement time sequence, wherein the data processing is used for realizing data standardization and data completion;
constructing a training set based on the historical weather forecast time sequence, the historical weather actual measurement time sequence and the historical power actual measurement time sequence;
and training the power prediction model based on the training set and a preset loss function.
In some embodiments of the present application, the first period of time is from a preset time to N hours after the preset time, N is a preset value, and the preset time interval is 24 hours;
The data acquisition unit 21 acquires a weather forecast time sequence, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence of the photovoltaic power plant in the first time period, and may include:
acquiring weather forecast data of a photovoltaic power station in a first time period, wherein the weather forecast data comprises temperature forecast data, humidity forecast data, wind speed forecast data and irradiation intensity forecast data;
performing interpolation operation on the weather forecast data to obtain a temperature forecast time sequence, a humidity forecast time sequence, a wind speed forecast time sequence and an irradiation intensity forecast time sequence;
obtaining the irradiation intensity measured data and the power measured data of the photovoltaic power station in a second time period, and respectively carrying out interpolation operation on the irradiation intensity measured data and the power measured data to obtain an irradiation intensity measured time sequence and a power measured time sequence;
each time series within the same time period has the same time point and sequence length.
In some embodiments of the present application, the value of N is 4 and the number of time points per hour is 4.
The photovoltaic power station power prediction device provided by the embodiment of the application can be applied to photovoltaic power station power prediction equipment, such as a computer and the like. Alternatively, fig. 8 shows a block diagram of a hardware structure of the photovoltaic power plant power prediction apparatus, and referring to fig. 8, the hardware structure of the photovoltaic power plant power prediction apparatus may include: at least one processor 31, at least one communication interface 32, at least one memory 33 and at least one communication bus 34.
In the embodiment of the present application, the number of the processor 31, the communication interface 32, the memory 33, and the communication bus 34 is at least one, and the processor 31, the communication interface 32, and the memory 33 complete communication with each other through the communication bus 34;
the processor 31 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application, etc.;
the memory 33 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one magnetic disk memory;
wherein the memory 33 stores a program, the processor 31 may call the program stored in the memory 33, the program being for:
acquiring a weather forecast time sequence of a photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period;
inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point;
the power prediction model is obtained by training a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels;
The second time period is before the first time period, and the second time period is different from the first time period by a preset time interval, and the first time point is the last time point in the first time period;
the fourth time period is before the third time period, the fourth time period and the third time period are different by the preset time interval, and the second time point is the last time point in the third time period.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
The embodiment of the application also provides a storage medium, which may store a program adapted to be executed by a processor, the program being configured to:
acquiring a weather forecast time sequence of a photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period;
inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point;
the power prediction model is obtained by training a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels;
The second time period is before the first time period, and the second time period is different from the first time period by a preset time interval, and the first time point is the last time point in the first time period;
the fourth time period is before the third time period, the fourth time period and the third time period are different by the preset time interval, and the second time point is the last time point in the third time period.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
To sum up:
according to the method, firstly, a weather forecast time sequence of a photovoltaic power station in a first time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a second time period are obtained. The second time period is before the first time period, namely the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the second time period are historical actual measurement data; and the second time period is different from the first time period by a preset time interval, wherein the preset time interval has a sunlight periodicity attribute, so that the meteorological data of the second time period has a certain reference meaning for the first time period. And then, inputting the weather forecast time sequence, the irradiation intensity actual measurement time sequence and the power actual measurement time sequence into a trained power prediction model to obtain a power prediction value at a first time point. Wherein the first time point is the last time point in the first time period, and it can be understood that each time point in each time period corresponds to a time point of each element in the time sequence in the time period. It should be noted that, the power prediction model is obtained by training with a weather forecast time sequence in a third time period, an irradiation intensity actual measurement time sequence and a power actual measurement time sequence in a fourth time period as training samples, and weather actual measurement data and a power actual measurement value at a second time point as sample labels. Wherein the second time point is the last time point in the third time period; the fourth time period is before the third time period, namely the irradiation intensity actual measurement time sequence and the power actual measurement time sequence in the fourth time period are historical actual measurement data; and the fourth time period is different from the third time period by the preset time interval, and the preset time interval has a sunlight periodicity attribute, so that the meteorological data of the fourth time period has a certain reference meaning for the third time period. The method and the system utilize the correlation of the weather data in time, the correlation of the weather forecast data and the weather actual measurement data and the correlation of the weather data and the power of the photovoltaic power station to train the power prediction model, so that the power prediction model can predict the power value based on the weather forecast data, the historical irradiation intensity actual measurement data and the historical power actual measurement data, and have important application value.
In addition, by fusing the model for predicting site weather data and the model for predicting power generation into one model frame, convenience of model application is improved. Further, since there are only 4 constrained neurons in the first fully connected layer of the power prediction model, and the number of neurons in the first fully connected layer is greater than or equal to 5, then a plurality of unconstrained neurons can extract unnamed physical features from the data, so that the capability of the model for extracting information is enhanced, and the degree of freedom of the model is improved from the viewpoint of the intermediate output of the model.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.