CN117200200A - Training method of photovoltaic power prediction model - Google Patents

Training method of photovoltaic power prediction model Download PDF

Info

Publication number
CN117200200A
CN117200200A CN202311147720.6A CN202311147720A CN117200200A CN 117200200 A CN117200200 A CN 117200200A CN 202311147720 A CN202311147720 A CN 202311147720A CN 117200200 A CN117200200 A CN 117200200A
Authority
CN
China
Prior art keywords
weather
data
sub
historical
photovoltaic power
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
CN202311147720.6A
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.)
State Grid Shanghai Electric Power Co Ltd
Original Assignee
State Grid Shanghai Electric Power Co Ltd
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 State Grid Shanghai Electric Power Co Ltd filed Critical State Grid Shanghai Electric Power Co Ltd
Priority to CN202311147720.6A priority Critical patent/CN117200200A/en
Publication of CN117200200A publication Critical patent/CN117200200A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

The application relates to a training method of a photovoltaic power prediction model, belongs to the technical field of photovoltaic power generation, and aims to solve the problems that the existing photovoltaic power prediction model has low prediction precision and the existing deep learning network model has low calculation efficiency when applied to photovoltaic power prediction. The method of the application comprises the following steps: classifying the daily weather of the region where the photovoltaic electric field to be predicted is located in a historical period into stationary weather and turning weather; classifying weather in each history period in a stationary weather day and a turning weather day into a plurality of sub-weather types based on generalized weather types; constructing a training data set of each sub-weather type; training the pre-established photovoltaic power prediction model through training data sets of all sub-weather types respectively to obtain sub-photovoltaic power prediction models corresponding to all the sub-weather types. The photovoltaic power prediction model trained by the method has higher prediction precision.

Description

Training method of photovoltaic power prediction model
Technical Field
The application relates to the technical field of photovoltaic power generation, in particular to a training method of a photovoltaic power prediction model.
Background
Photovoltaic power generation is a renewable, clean and flexible distributed energy source and plays an important role in meeting the increasing clean energy demands worldwide. With the integration of photovoltaic power generation, obvious economic benefit and environmental benefit are brought, the permeability of the photovoltaic power generation is gradually improved, but the high popularization rate of the photovoltaic power generation brings a plurality of new problems for the operation of the existing power grid system. Particularly, the photovoltaic output has volatility and intermittence, and the photovoltaic power station can bring impact to a power system after being connected into a power grid in a high proportion. In order to solve the above problems, the demand for photovoltaic output prediction is continuously increasing, wherein the distributed photovoltaic power station output prediction based on refined weather typing recognition in a microclimate environment is an important field of photovoltaic output prediction, and the accuracy of photovoltaic power prediction can be improved through effective division of weather types.
In the prior art, weather typing techniques for photovoltaic output prediction are mostly subdivided for all weather types, for example, weather types are divided into 3 types by definition indexes, or sunny types are further divided into three types by introducing total cloud amount cross subdivision. However, in engineering application, due to uncertainty of meteorological environment factors, the influence of turning weather (namely weather with severe weather changes) with large fluctuation in one day on photovoltaic output and stability and scheduling of a power grid is large, the influence is usually considered when photovoltaic grid-connected energy storage design is carried out, the day of turning weather with large-amplitude power fluctuation cannot be well identified by the traditional weather type division, and therefore effective classification of model training samples cannot be achieved based on the traditional weather typing method, prediction accuracy of a prediction model is low, and therefore more accurate photovoltaic power prediction results cannot be obtained.
Most of the existing photovoltaic power prediction models are shallow models, but the shallow models have limitations in aspects of feature selection, generalization capability, complex sample processing and the like, and the problem of lower precision exists when the shallow models are adopted for predicting the photovoltaic power. Compared with the traditional shallow model, the deep learning model such as a roll neural network can extract the characteristics of deeper data, and has great improvement in accuracy. However, in the field of photovoltaic power prediction, in order to ensure the prediction accuracy, the training data volume of a photovoltaic power prediction model is huge, the structure of a traditional neural network and other deep learning models is complex, and the problem of low calculation efficiency exists.
Disclosure of Invention
In view of the above analysis, the embodiment of the application aims to provide a training method of a photovoltaic power prediction model, which is used for solving the problems of low prediction precision of the existing photovoltaic power prediction model and low calculation efficiency when the existing deep learning network model is applied to photovoltaic power prediction.
The embodiment of the application provides a training method of a photovoltaic power prediction model, which comprises the following steps:
classifying the daily weather of the region where the photovoltaic electric field to be predicted is located in the historical period based on meteorological changes and photovoltaic output fluctuation conditions, and classifying the weather into stationary weather and turning weather;
classifying weather in each history period in a stationary weather day and a turning weather day into a plurality of sub-weather types based on generalized weather types;
respectively preprocessing historical weather data and historical photovoltaic data of a historical period corresponding to each sub weather type, and constructing a training data set of each sub weather type;
training the pre-established photovoltaic power prediction model through training data sets of all sub-weather types respectively to obtain sub-photovoltaic power prediction models corresponding to all the sub-weather types.
Based on the further improvement of the method, a variance cost function and a cross entropy cost function are adopted to construct a loss function of the photovoltaic power prediction model,
the variance cost function is: loss_1= (y-y) 0 ) 2 /2;
The cross entropy cost function is: loss_2= - [ yln (y 0 )+(1-y 0 )ln(1-y 0 )];
The loss function is: loss=q 1 loss_1+q 2 loss_2;
Wherein y is the output value of the photovoltaic power prediction model, y 0 For the measured value of photovoltaic power, loss is the total Loss, loss_1 is the variance Loss, loss_2 is the cross entropy Loss, q 1 And q 2 Is a weight coefficient.
Based on a further improvement of the method, the photovoltaic power prediction model is a lightweight convolutional neural network model, and the lightweight convolutional neural network model comprises:
the first convolution layer is used for extracting shallow layer characteristics of input data and outputting shallow layer characteristic data;
the maximum pooling layer is used for reducing the dimension of the shallow characteristic data;
the plurality of shuffleNet modules are used for extracting deep semantic features from the dimension-reduced shallow feature data in a point-by-point group rolling and channel shuffling mode;
and the second convolution layer is used for reducing the channel dimension of the deep semantic features and outputting a prediction result.
Based on further improvement of the method, in the training data set, historical weather data are input data of a photovoltaic power prediction model, and historical photovoltaic data are output correction data of the photovoltaic power prediction model.
Based on further improvement of the above method, the preprocessing is performed on the historical weather data and the historical photovoltaic data of the historical period corresponding to each sub weather type, and a training data set of each sub weather type is constructed, including:
and carrying out correlation analysis on the historical weather data and the historical photovoltaic power data of the historical period corresponding to the same sub-weather type, and selecting at least two types of weather characteristic data with high correlation from the historical weather data to construct an input data sequence of the sub-weather type.
Based on a further improvement of the above method, the method further comprises:
establishing a first weather identification model, training the first weather identification model through historical weather data of stationary weather days and turning weather days, and obtaining a trained first weather identification model for identifying whether the weather type of the predicted day is turning weather or stationary weather;
based on a further improvement of the above method, the method further comprises:
establishing a first sub-weather identification model, training the first sub-weather identification model through historical weather data of a historical period corresponding to each sub-weather type of the stationary weather day, and acquiring a trained first sub-weather identification model for identifying sub-weather types of each prediction period of a prediction day of the stationary weather;
the method comprises the steps of establishing a second sub-weather identification model, training the second sub-weather identification model through historical weather data of historical time periods corresponding to all sub-weather types of turning weather days, and obtaining a trained second sub-weather identification model for identifying the sub-weather types of all prediction time periods of the prediction days of the turning weather.
Based on the further improvement of the method, the daily weather of the region where the photovoltaic electric field to be predicted is located in the historical period is classified into stationary weather and turning weather based on meteorological change and photovoltaic output fluctuation conditions, and the method comprises the following steps:
acquiring power change rate data according to historical photovoltaic power data of a photovoltaic electric field to be predicted;
clustering and dividing the power change rate data into at least two types based on an SOM network, and screening the type with the largest power fluctuation range to serve as a potential turning weather sample;
calculating a definition index of the period corresponding to the potential turning weather sample according to the historical solar radiation data;
and identifying the weather type of the day on which the potential turning weather sample is located, the definition index of which is smaller than the definition threshold value, as turning weather, and the weather type of the other days in the historical period as stationary weather.
Based on a further improvement of the method, the power change rate is a time-by-time power difference and is calculated according to the following formula:
ΔP=P i+1 -P i
wherein, the delta P is the time-by-time power change rate, P i+1 For the power value at time i+1 daily, P i The power value at time i is the value of power at time i per day.
Based on the further improvement of the method, the weather of each history period of the stationary weather day and the turning weather day is respectively classified into a plurality of sub-weather types by a K-means clustering method based on generalized weather types.
Compared with the prior art, the application has at least one of the following beneficial effects:
1. according to the photovoltaic power prediction model training method, photovoltaic power is greatly fluctuated due to turning weather with large change in weather in one day, and influence on photovoltaic output is large, so that daily weather in a historical period is divided into two types of stationary weather and turning weather based on weather change and photovoltaic output fluctuation conditions, then weather in each historical period of each day is subdivided based on generalized weather types, a plurality of sub-weather types under the stationary weather and the turning weather are obtained, fine division of the weather types is achieved, and then the photovoltaic power prediction model is trained according to data of the historical period corresponding to each sub-weather type after pretreatment, so that the trained photovoltaic power prediction model has high prediction precision, and further more accurate photovoltaic power prediction results can be obtained.
2. According to the application, the sub-photovoltaic power prediction model is a lightweight convolutional neural network model, and the model structure is improved, so that the calculation amount is reduced while the prediction accuracy is ensured, the prediction efficiency is improved, a self-attention module is added to extract more accurate characteristics, and the shuffleNet unit is improved, so that the calculation amount of the network can be effectively reduced while the accuracy loss is not great.
3. According to the application, the power change rate is adopted to represent historical photovoltaic power data fluctuation, then clustering primary screening is carried out on the power change rate data, and secondary screening is carried out by combining astronomical weather factors-definition indexes, so that the day of turning weather with larger amplitude of power fluctuation is accurately identified, the weather type is effectively divided, and the accuracy of photovoltaic power prediction results is ensured.
4. According to the method, the weather of each time period in each day is considered to be changed, particularly the weather of different time periods in the turning weather day is changed greatly, and the influence on the photovoltaic output is large, so that the weather of each history time period of the stationary weather day and the turning weather day is classified and divided into a plurality of sub-weather types by a K-means clustering method based on generalized weather types, and the weather types of each prediction time period of the prediction day can be accurately identified.
In the application, the technical schemes can be mutually combined to realize more preferable combination schemes. Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the application, like reference numerals being used to refer to like parts throughout the several views.
FIG. 1 is a flow chart of a model training method for photovoltaic power prediction according to an embodiment of the present application;
FIG. 2 is a flow chart of dividing daily weather in a history period in step 1 according to an embodiment of the present application.
Detailed Description
The following detailed description of preferred embodiments of the application is made in connection with the accompanying drawings, which form a part hereof, and together with the description of the embodiments of the application, are used to explain the principles of the application and are not intended to limit the scope of the application.
The application provides a training method of a photovoltaic power prediction model, as shown in fig. 1. The method comprises the following steps:
step 1, classifying daily weather in a historical period of a region where a photovoltaic electric field to be predicted is located based on weather variation and photovoltaic output fluctuation conditions, and classifying the weather into stationary weather and turning weather;
step 2, classifying weather in each history period in a stationary weather day and a turning weather day into a plurality of sub-weather types based on generalized weather types;
step 3, respectively preprocessing historical weather data and historical photovoltaic data of a historical period corresponding to each sub weather type, and constructing a training data set of each sub weather type;
and 4, training the pre-established photovoltaic power prediction model through training data sets of all the sub-weather types respectively to obtain sub-photovoltaic power prediction models corresponding to all the sub-weather types.
When the method is implemented, the corresponding trained sub-photovoltaic power prediction model is selected according to the sub-weather types of each prediction period of the prediction day to obtain the photovoltaic prediction power.
Compared with the prior art, the photovoltaic power prediction model training method has the advantages that the fact that the turning weather with larger change in weather in one day causes large fluctuation of photovoltaic power and has larger influence on photovoltaic output is considered, so that the daily weather in the historical period is divided into two types of stationary weather and turning weather based on weather change and photovoltaic output fluctuation conditions, the daily weather in each historical period is subdivided based on generalized weather types, a plurality of sub-weather types under the stationary weather and the turning weather are obtained, fine division of the weather types is achieved, and the photovoltaic power prediction model is trained through the preprocessed data of the historical period corresponding to each sub-weather type, so that the trained photovoltaic power prediction model has higher prediction precision, and more accurate photovoltaic power prediction results can be obtained.
In the embodiment of the application, the turning weather refers to weather in which weather changes and the weather changes can cause the photovoltaic power to fluctuate greatly, and the weather in which weather changes but does not cause the photovoltaic power to fluctuate greatly is excluded.
The history period is generally longer, for example, one year or more, so that more training samples of turning weather can be obtained, which is beneficial to improving prediction accuracy.
In one embodiment, as shown in fig. 2, step 1, classifying the daily weather of the region where the photovoltaic electric field to be predicted is located in the historical period into stationary weather and turning weather based on the weather change and the fluctuation of the photovoltaic output, includes:
step 11, acquiring power change rate data according to historical photovoltaic power data of a photovoltaic electric field to be predicted;
step 12, clustering and dividing the power change rate data into at least two types based on an SOM network, and screening out the type with the largest power fluctuation amplitude as a potential turning weather sample;
step 13, calculating a definition index of the period corresponding to the potential turning weather sample according to the historical solar radiation data;
and 14, identifying the weather type of the day on which the potential turning weather sample with the definition index smaller than the definition threshold value is located as turning weather, and identifying the weather types of other dates in the historical period as stationary weather.
The weather type dividing method is realized based on historical photovoltaic power data and contemporaneous historical solar radiation data, and in the implementation, the fact that the weather conditions with severe changes are usually accompanied by large fluctuation of photovoltaic output is considered, so that the fluctuation identification amplitude is met in value through the power change rate, but the power fluctuation is caused by non-weather factors, especially the photovoltaic power is greatly fluctuated under the influence of a solar altitude angle in sunny sunrise or sunset, so that the characteristic of power fluctuation is required to be focused when the turning weather is identified, and physical quantities capable of reflecting the fluctuation of the illumination radiation quantity caused by the weather change are also required to be introduced, wherein the clarity index can reflect the transparency degree of the atmosphere and is closely related to the weather condition and the solar radiation, and therefore, in the embodiment of the application, the data of the potential turning samples obtained by clustering according to the power change rate are screened out through secondary screening through the clarity index, and only the data of the real turning weather which can cause large power fluctuation are reserved, so that the turning weather is identified. That is, if the photovoltaic output of a certain day can meet the fluctuation range requirement of the power change rate, and the day can meet the corresponding atmospheric condition, the weather type of the day can be identified as turning weather with larger fluctuation range.
Compared with the prior art, in the embodiment of the application, the power change rate is adopted to represent historical photovoltaic power data fluctuation, then clustering primary screening is carried out on the power change rate data, and secondary screening is carried out by combining astronomical meteorological factors-definition indexes, so that turning weather with larger amplitude of power fluctuation is accurately identified, the weather type is effectively divided, and the accuracy of photovoltaic power prediction results is ensured.
In addition, the historical photovoltaic power data and the historical solar radiation data adopted in the embodiment of the application are data obtained from the photovoltaic electric field to be predicted and subjected to data quality inspection.
Preferably, in step 11, the step of obtaining the power change rate data according to the historical photovoltaic power data of the photovoltaic electric field to be predicted includes the following steps:
step 1101, calculating a solar altitude in a target area, and taking a time period when the solar altitude is greater than a preset angle as a photovoltaic output statistic time period;
step 1102, calculating the power change rate of the photovoltaic output statistic time period according to the historical photovoltaic output data so as to obtain power change rate data.
The solar altitude refers to an included angle between solar rays and a normal line of a ground plane. In implementation, considering that the photovoltaic output has obvious time period characteristics, the initial historical photovoltaic power data is screened by calculating the solar altitude angle of the region where the photovoltaic electric field to be predicted is located, so that the effective data can be better utilized.
The solar altitude is calculated according to the following formula:
ω=(t-12)×15°;
wherein alpha is s Is the solar altitude angle theta z Is a zenith angle, the shape of the zenith angle is a zenith angle,the latitude of the target area is represented by delta, delta is represented by declination angle, omega is represented by hour angle, n is represented by a serial number of a date in one year, and t is represented by hours.
For example, 1 month and 1 day each year, n=1; 12 months 31 days of the year, n=365; 12 months 31 days of leap years, n=366.
The angle of day is positive from point Q on the noon of the sun (from noon of the sun), negative in the clockwise direction, i.e. negative in the morning and positive in the afternoon, and is equal in value to the time from noon (hours) times 15 °.
In step 1101, the preset angle has a value ranging from 5 ° to 15 °, preferably 10 °. That is, a period in which the solar altitude is greater than 10 ° is preferably taken as the photovoltaic output statistic period.
More specifically, the power change rate is the difference between time-by-time powers, and is calculated according to the following formula: Δp=p i+1 -P i The method comprises the steps of carrying out a first treatment on the surface of the Wherein, the delta P is the time-by-time power change rate, P i+1 For the power value at time i+1 daily, P i The power value at time i is the value of power at time i per day.
When the method is implemented, firstly, the historical photovoltaic power data are arranged according to time sequence hour values, and then the power change rate per hour is obtained.
Step 12: and clustering and dividing the power change rate data into at least two types based on an SOM network, and screening the type with the largest power fluctuation range to serve as a potential turning weather sample.
Because the current standard is difficult to define and give a magnitude for the magnitude of the power fluctuation, in order to screen out a type of data sample with large negative fluctuation of the power change rate, in the embodiment of the application, the data with the power change rate is subjected to unsupervised self-organizing clustering through an SOM network (self-organizing map neural network), and is divided into a plurality of types, so that a type of data sample with the largest power fluctuation range is screened out and used as a potential turning weather sample.
The SOM network is a non-teacher learning network, and can adapt to a complex mode of photovoltaic power data by automatically searching internal rules and essential attributes in a data sample, self-organizing and self-adaptively changing network parameters and structures, and accurately and effectively classifying.
Further, in step 12, the class with the largest power negative fluctuation amplitude is screened out and used as a potential turning weather sample. The type with the largest power negative fluctuation amplitude is the type with the largest fluctuation amplitude, wherein the power change rate is a negative value.
The type with the largest power negative fluctuation amplitude is adopted as a potential turning weather sample, most of the cases occur when severe weather changes such as overcast weather or rain and snow weather are changed into sunny weather, and clear weather data can be screened out when turning weather is identified by using a definition index, so that the type with the largest power negative fluctuation amplitude is directly screened out as the potential turning weather sample during clustering screening, and the processing efficiency is improved.
Meanwhile, photovoltaic power reduction caused by instability of meteorological factors in photovoltaic output fluctuation has the greatest influence on stability and scheduling of a power grid, the photovoltaic power has remarkable time periodicity along with solar altitude change in one day, and large-amplitude power positive fluctuation occurs in one day, and large-amplitude power negative fluctuation is accompanied, so that a class with the largest power positive fluctuation amplitude is not screened out and used as a potential turning weather sample in cluster screening, and the identification result of turning weather and the photovoltaic predicted power result are not greatly influenced.
Specifically, the number of clusters of the SOM network is set to 5. In this way, in step 12, the power change rate data is clustered and divided into five types based on the SOM network, wherein the type with the largest power negative fluctuation is separated from the other four types, and the other four types mainly comprise the types of sunny days, rainy days, sunny turning negative with small power fluctuation, and the like, and the type with the largest power negative fluctuation also comprises the types of sunny days, abrupt turning weather, and the like.
Step 13: and calculating the definition index of the day of the potential turning weather sample according to the contemporaneous historical solar radiation data.
Specifically, the sharpness index of the day of the potentially turning weather sample is calculated according to the following formula:wherein k is T For clarity index, I is total radiation, I 0 Is the total solar radiation of the ground level.
The total solar radiation of the ground level is calculated according to the following formula:
wherein E is sc Gamma is the correction value of solar radiation flux in the upper atmosphere caused by the change of the distance between the sun and the earth, omega s For the time period from sunrise to sunsetIs a time angle of (1).
And step 14, identifying the weather type of the day on which the potential turning weather sample with the definition index smaller than the definition threshold is located as turning weather.
In step 14, the weather type of the time point where the potentially turning weather sample is located is identified by the definition index. Wherein the value of the definition threshold is in the range of 0.1 to 0.3, preferably 0.2.
Generally, k T The weather corresponding to less than 0.2 is light rain, gust, small snow, light fog, haze, medium rain and above, medium snow and above, etc.
In one embodiment, in step 2, weather in each history period of the stationary weather day and the turning weather day is classified into a plurality of sub-weather types by a K-means clustering method based on generalized weather types, respectively.
Wherein the generalized weather types include: sunny days, cloudy clouds and sleet.
In the embodiment of the application, the weather in each time period in each day is considered to be changed, particularly the weather in different time periods in the turning weather day is changed greatly, and the influence on the photovoltaic output is great, so that the weather in each history time period of the stationary weather day and the turning weather day is classified into a plurality of sub-weather types by a K-means clustering method based on generalized weather types, thereby ensuring that the weather types of each prediction time period of the prediction day can be accurately identified.
In practice, the photovoltaic output has a periodicity related to solar irradiation, and therefore, the statistical period of photovoltaic output and corresponding weather data is generally 8 per day: 00 to 18:00. The daily statistical period of the history period is divided into a plurality of history periods at preset time intervals, for example, each history period is 1h. Then, historical weather data of each historical period of a stable weather day are obtained, the data are divided into four types through a K-means clustering method, and the corresponding four types of weather are respectively smooth sunny weather, smooth cloudy weather and smooth rainy and snowy weather. Similarly, historical weather data of each historical period of a turning weather day are obtained, the data are divided into four types by a K-means clustering method, and the four types of weather are turning sunny weather, turning cloudy weather and turning rainy and snowy weather respectively.
In one embodiment, step 3, preprocessing the historical weather data and the historical photovoltaic data of the historical period corresponding to each sub-weather type respectively, and constructing a training data set of each sub-weather type includes: and carrying out correlation analysis on the historical weather data and the historical photovoltaic power data of the historical period corresponding to the same sub-weather type, and selecting at least two types of weather characteristic data with high correlation from the historical weather data to construct an input data sequence of the sub-weather type.
In this embodiment, after dividing the weather types of each history period daily into a plurality of sub-weather types, performing correlation analysis on the history weather data and the history photovoltaic power data of the history period corresponding to the same sub-weather type, and screening out weather feature data with high correlation with the photovoltaic output under each sub-weather type for model training, so that the sample size can be reduced, and the prediction accuracy can be ensured.
Specifically, in an input data sequence of four sub-weather types corresponding to a stationary weather day, five weather characteristic data of irradiance, humidity, temperature, cloud cover and visibility are sequentially included from high to low according to correlation;
and in the input data sequence of four sub-weather types corresponding to the turning weather days, five weather characteristic data such as irradiance, humidity, visibility, cloud cover and temperature are sequentially included according to the correlation from high to low.
It should be noted that, the historical weather data and the historical photovoltaic power data of the daily historical period in the historical period are taken as one training sample, that is, the training data set of each sub-weather type includes the historical weather data and the historical photovoltaic power data of one or more historical periods corresponding to the sub-weather type. In addition, in each training sample, weather data is input data, and photovoltaic power data is output correction data (tag).
In one embodiment, the photovoltaic power prediction model in step 4 is a lightweight convolutional neural network model comprising:
the first convolution layer is used for extracting shallow layer characteristics of input data and outputting shallow layer characteristic data;
the maximum pooling layer is used for reducing the dimension of the shallow characteristic data;
the plurality of shuffleNet modules are used for extracting deep semantic features from the dimension-reduced shallow feature data in a point-by-point group rolling and channel shuffling mode;
and the second convolution layer is used for reducing the channel dimension of the deep semantic features and outputting a prediction result.
In the application, in order to improve training efficiency, a lightweight convolutional neural network model is constructed as a photovoltaic power prediction model. Wherein the lightweight convolutional neural network model is a modified ShuffleNet model.
Specifically, the first convolution layer is used for extracting shallow layer features of input data, reducing data dimension and increasing the number of feature channels.
And extracting deep semantic features from the feature data after the dimension reduction through a plurality of ShuffleNet modules. Each module increases the number of feature channels while continuously reducing the feature data dimension, and gradually extracts the deep semantic features of the edge points. The ShuffleNet adopts point-by-point group rolling and channel shuffling, so that the calculation amount of the network can be effectively reduced while the loss of accuracy is not great, and the calculation cost is greatly reduced.
Specifically, to enhance the feature extraction capability of the network, each of the ShuffleNet modules includes a ShuffleNet unit and a channel attention module connected in sequence.
A channel attention module is added after each ShuffleNet cell structure to further extract more accurate features. The channel attention module consists of global average pooling, 2 full connection layers, a ReLU layer and a Sigmoid activation layer, and generates corresponding weights for each channel, so that the network can autonomously select according to the importance of each characteristic channel. Multiplying the characteristics output by the ShuffleNet unit by the weights calculated by the channel attention module yields characteristics of increased attention weights.
The improved SheffeNet model changes the global average pooling and full connection layer at the tail part of the existing SheffeNet model into 1 convolution layer, namely a second convolution layer, wherein the convolution kernel of the convolution layer is 1 multiplied by 1, the number of the convolution layers is 2, and the step length is 1.
Specifically, the ShuffleNet unit includes a convolution layer, a Channel Shuffle layer (Channel Shuffle), a deep convolution layer, a convolution layer, and a fusion layer connected in sequence. In the ShuffleNet unit, both convolution layers are 1×1 convolution layers, and the depth convolution layer is a 3×3 depth convolution layer.
By constructing the lightweight neural network structure, the model can ensure the prediction accuracy, reduce the operation amount and improve the detection efficiency.
After the lightweight convolutional neural network model is built, model training is carried out based on the classified training sample data, the gradient descent method is used for carrying out back propagation updating on parameters in the network training process, and model parameters are optimized, so that a trained sub-photovoltaic power prediction model corresponding to eight sub-weather types is obtained.
Specifically, a variance cost function and a cross entropy cost function are adopted to construct a Loss function Loss of the model. And stopping training after the model reaches the required precision or reaches the preset iteration times, and obtaining the trained sub-photovoltaic power prediction model.
The variance cost function is:
the cross entropy cost function is: loss_2= - [ yln (y 0 )+(1-y 0 )ln(1-y 0 )];
The loss function is: loss=q 1 loss_1+q 2 loss_2;
Wherein y is the output value of the photovoltaic power prediction model, y 0 Is the measured value (target value) of the photovoltaic power; wherein q is 1 And q 2 And setting the weight coefficient according to actual conditions.
The method of the embodiment of the application further comprises the following steps: and after the trained photovoltaic power prediction model is obtained, evaluating the accuracy of the model prediction result by adopting root mean square error and absolute value error.
Specifically, root mean square error e RMSE The calculation formula of (2) is as follows:
absolute value error e MAE The calculation formula of (2) is as follows:
wherein: p (P) t,pre The predicted value of the photovoltaic power at the time t; p (P) t The measured value of the photovoltaic power at the time t; n is a predicted period; c (C) ap The rated power of the photovoltaic output of the power station.
After the photovoltaic power prediction model is trained, the model can be used for predicting the photovoltaic power. When photovoltaic power is predicted, whether the weather type of the predicted day is stable weather or turning weather is determined, and then the weather type of each predicted period of the predicted day is further determined.
Specifically, the sub-weather types corresponding to each prediction period of the prediction day are determined by the following method:
step 501, a first weather identification model is established, and training is carried out on the first weather identification model through historical weather data of stationary weather days and turning weather days;
step 502, a first sub-weather identification model is established, and training is carried out on the first sub-weather identification model through historical weather data of a historical period corresponding to each sub-weather type of a steady weather day;
step 503, establishing a second sub-weather identification model, and training the second sub-weather identification model through turning over historical weather data of a historical period corresponding to each sub-weather type of the weather day;
step 504, inputting weather forecast data of a prediction day into a trained first weather identification model to obtain a weather type of the prediction day, selecting a corresponding trained sub-weather identification model based on the weather type of the prediction day, and inputting the weather type of each prediction period of the prediction day into the selected trained sub-weather identification model to obtain the weather type of each prediction period of the prediction day.
According to the embodiment of the application, the first weather identification model for identifying the weather type of the prediction day and the first sub weather identification model and the second sub weather model for identifying each prediction period of the prediction day are trained through the history weather data after accurate classification, so that whether the prediction day is a turning weather day with larger power fluctuation can be effectively identified, the weather type of each prediction period of the prediction day can be identified more accurately, and the accuracy of the photovoltaic power prediction result can be improved.
Specifically, the first weather identification model takes weather data of a certain day as input, and takes turning weather or stationary weather as output. The first sub-weather identification model takes weather data of a certain period of a stable weather day as input, and takes four sub-weather types of stable sunny weather, stable cloudy weather and stable rainy and snowy weather as output; the second sub-weather identification model takes weather data of a certain period in a turning weather day as input and takes four sub-weather types of turning sunny weather, turning cloudy weather and turning rainy and snowy weather as output.
The first weather identification model, the first sub-weather identification model and the second sub-weather identification model are deep learning models, such as kohonen models, neural network models and the like.
Those skilled in the art will appreciate that all or part of the flow of the methods of the embodiments described above may be accomplished by way of a computer program to instruct associated hardware, where the program may be stored on a computer readable storage medium. Wherein the computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.
The present application is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present application are intended to be included in the scope of the present application.

Claims (10)

1. A method of training a photovoltaic power prediction model, the method comprising the steps of:
classifying the daily weather of the region where the photovoltaic electric field to be predicted is located in the historical period based on meteorological changes and photovoltaic output fluctuation conditions, and classifying the weather into stationary weather and turning weather;
classifying weather in each history period in a stationary weather day and a turning weather day into a plurality of sub-weather types based on generalized weather types;
respectively preprocessing historical weather data and historical photovoltaic data of a historical period corresponding to each sub weather type, and constructing a training data set of each sub weather type;
training the pre-established photovoltaic power prediction model through training data sets of all sub-weather types respectively to obtain sub-photovoltaic power prediction models corresponding to all the sub-weather types.
2. The method of claim 1, wherein a variance cost function and a cross entropy cost function are used to construct a loss function of the photovoltaic power prediction model,
the variance cost function is: loss_1= (y-y) 0 ) 2 /2;
The cross entropy cost function is: loss_2= - [ yln (y 0 )+(1-y 0 )ln(1-y 0 )];
The loss function is: loss=q 1 loss_1+q 2 loss_2;
Wherein y is the output value of the photovoltaic power prediction model, y 0 For the measured value of photovoltaic power, loss is the total Loss, loss_1 is the variance Loss, loss_2 is the cross entropy Loss, q 1 And q 2 Is a weight coefficient.
3. The method of claim 1 or 2, wherein the photovoltaic power prediction model is a lightweight convolutional neural network model comprising:
the first convolution layer is used for extracting shallow layer characteristics of input data and outputting shallow layer characteristic data;
the maximum pooling layer is used for reducing the dimension of the shallow characteristic data;
the plurality of shuffleNet modules are used for extracting deep semantic features from the dimension-reduced shallow feature data in a point-by-point group rolling and channel shuffling mode;
and the second convolution layer is used for reducing the channel dimension of the deep semantic features and outputting a prediction result.
4. A method according to claim 3, wherein the ShuffleNet module comprises a ShuffleNet unit and a channel attention module connected in sequence.
5. The method of claim 4, wherein the ShuffleNet unit comprises a convolutional layer, a channel shuffle layer, a deep convolutional layer, a convolutional layer, and a fusion layer, which are connected in sequence.
6. The method according to claim 1 or 2, wherein in the training dataset, historical weather data is input data of a photovoltaic power prediction model, and historical photovoltaic data is output correction data of the photovoltaic power prediction model.
7. The method according to claim 1 or 2, wherein preprocessing the historical weather data and the historical photovoltaic data of the historical period corresponding to each sub-weather type respectively to construct a training data set of each sub-weather type comprises:
and carrying out correlation analysis on the historical weather data and the historical photovoltaic power data of the historical period corresponding to the same sub-weather type, and selecting at least two types of weather characteristic data with high correlation from the historical weather data to construct an input data sequence of the sub-weather type.
8. The method according to claim 1 or 2, wherein classifying the daily weather in the historical period of the region where the photovoltaic electric field to be predicted is located, into stationary weather and turning weather, based on the meteorological change and the fluctuation of the photovoltaic output, comprises:
acquiring power change rate data according to historical photovoltaic power data of a photovoltaic electric field to be predicted;
clustering and dividing the power change rate data into at least two types based on an SOM network, and screening the type with the largest power fluctuation range to serve as a potential turning weather sample;
calculating a definition index of the period corresponding to the potential turning weather sample according to the historical solar radiation data;
and identifying the weather type of the day on which the potential turning weather sample is located, the definition index of which is smaller than the definition threshold value, as turning weather, and the weather type of the other days in the historical period as stationary weather.
9. The method of claim 8, wherein the rate of power change is a time-by-time power difference, calculated according to the following equation:
ΔP=P i+1 -P i
wherein, the delta P is the time-by-time power change rate, P i+1 For the power value at time i+1 daily, P i The power value at time i is the value of power at time i per day.
10. The method according to claim 1 or 2, wherein the weather of each history period of stationary weather day and turning weather day is classified into a plurality of sub-weather types by a K-means clustering method based on generalized weather types, respectively.
CN202311147720.6A 2023-09-06 2023-09-06 Training method of photovoltaic power prediction model Pending CN117200200A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311147720.6A CN117200200A (en) 2023-09-06 2023-09-06 Training method of photovoltaic power prediction model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311147720.6A CN117200200A (en) 2023-09-06 2023-09-06 Training method of photovoltaic power prediction model

Publications (1)

Publication Number Publication Date
CN117200200A true CN117200200A (en) 2023-12-08

Family

ID=88988131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311147720.6A Pending CN117200200A (en) 2023-09-06 2023-09-06 Training method of photovoltaic power prediction model

Country Status (1)

Country Link
CN (1) CN117200200A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113837426A (en) * 2020-11-29 2021-12-24 上海电力大学 Weather-typing-based photovoltaic power prediction method
US20220373984A1 (en) * 2021-05-19 2022-11-24 Shandong University Hybrid photovoltaic power prediction method and system based on multi-source data fusion
CN115661481A (en) * 2022-11-10 2023-01-31 北京京航计算通讯研究所 Intelligent locker edge point detection model training method, equipment and storage medium
CN115936177A (en) * 2022-10-31 2023-04-07 济南大学 Photovoltaic output power prediction method and system based on neural network
CN116227677A (en) * 2022-12-29 2023-06-06 浙江工业大学 Power prediction correction method considering photovoltaic power climbing characteristics

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113837426A (en) * 2020-11-29 2021-12-24 上海电力大学 Weather-typing-based photovoltaic power prediction method
US20220373984A1 (en) * 2021-05-19 2022-11-24 Shandong University Hybrid photovoltaic power prediction method and system based on multi-source data fusion
CN115936177A (en) * 2022-10-31 2023-04-07 济南大学 Photovoltaic output power prediction method and system based on neural network
CN115661481A (en) * 2022-11-10 2023-01-31 北京京航计算通讯研究所 Intelligent locker edge point detection model training method, equipment and storage medium
CN116227677A (en) * 2022-12-29 2023-06-06 浙江工业大学 Power prediction correction method considering photovoltaic power climbing characteristics

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘扬: "基于短期负荷预测的主动配电网分布式调度", 中国优秀硕士学位论文全文数据库, no. 04, 15 April 2022 (2022-04-15), pages 38 *
黄乾: "基于卷积神经网络的短期负荷概率预测方法研究", 中国博士学位论文全文数据库, no. 01, 15 January 2022 (2022-01-15), pages 29 *

Similar Documents

Publication Publication Date Title
JP6759966B2 (en) How to operate the photovoltaic power generation system
Lai et al. Daily clearness index profiles cluster analysis for photovoltaic system
Zhang et al. Forecast of solar energy production-A deep learning approach
CN109165774A (en) A kind of short-term photovoltaic power prediction technique
JP6693330B2 (en) Solar power system operation
CN110766134A (en) Photovoltaic power station short-term power prediction method based on cyclic neural network
CN111079980A (en) Optical power prediction method based on self-adaptive classification strategy and hybrid optimization SVR
CN115049171B (en) Photovoltaic power prediction method and system based on feature migration
Lucio et al. Loss-of-load probability model for stand-alone photovoltaic systems in Europe
CN116128150B (en) Photovoltaic intelligent output prediction method based on two-stage optimization
CN111582555B (en) Photovoltaic power prediction method based on foundation cloud picture image characteristics
CN117374956A (en) Short-term prediction method for photovoltaic power generation of comprehensive energy station
CN111242355A (en) Photovoltaic probability prediction method and system based on Bayesian neural network
Govender et al. Cluster analysis for classification and forecasting of solar irradiance in Durban, South Africa
CN112418346A (en) Numerical weather forecast total radiation system error classification calculation method
CN114882373A (en) Multi-feature fusion sandstorm prediction method based on deep neural network
Omar et al. Seasonal clustering forecasting technique for intelligent hourly solar irradiance systems
CN113920349A (en) Wind and light typical scene construction method containing meteorological data based on density peak value-FCM
CN117175569B (en) Photovoltaic prediction method and system based on refined weather typing
CN117200199B (en) Photovoltaic power prediction method and system based on weather typing
CN117200200A (en) Training method of photovoltaic power prediction model
CN116881743B (en) Meteorological turning weather identification method and system for photovoltaic power prediction
CN116029440A (en) Ultra-short-term power prediction method and device for photovoltaic power station
CN111596384B (en) Inclined plane radiation prediction method based on weather type effective identification
Zhu et al. A method of cloud classification based on DNI

Legal Events

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