CN117200200A - Training method of photovoltaic power prediction model - Google Patents
Training method of photovoltaic power prediction model Download PDFInfo
- 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
- historical
- sub
- photovoltaic
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000012549 training Methods 0.000 title claims abstract description 34
- 230000005684 electric field Effects 0.000 claims abstract description 7
- 230000008859 change Effects 0.000 claims description 30
- 230000005855 radiation Effects 0.000 claims description 12
- 238000013527 convolutional neural network Methods 0.000 claims description 11
- 230000002354 daily effect Effects 0.000 claims description 11
- 238000003064 k means clustering Methods 0.000 claims description 7
- 230000003203 everyday effect Effects 0.000 claims description 6
- 238000011176 pooling Methods 0.000 claims description 5
- 238000012937 correction Methods 0.000 claims description 4
- 238000010219 correlation analysis Methods 0.000 claims description 4
- 230000004927 fusion Effects 0.000 claims description 2
- 238000010248 power generation Methods 0.000 abstract description 5
- 238000004364 calculation method Methods 0.000 abstract description 4
- 238000013135 deep learning Methods 0.000 abstract description 2
- 230000000875 corresponding effect Effects 0.000 description 30
- 230000006870 function Effects 0.000 description 12
- 230000006872 improvement Effects 0.000 description 9
- 238000012216 screening Methods 0.000 description 8
- 230000008901 benefit Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000013136 deep learning model Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000035515 penetration Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000004146 energy storage Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000004907 flux Effects 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Photovoltaic Devices (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域Technical field
本发明涉及光伏发电技术领域,尤其涉及一种光伏功率预测模型的训练方法。The invention relates to the technical field of photovoltaic power generation, and in particular to a training method for a photovoltaic power prediction model.
背景技术Background technique
光伏发电是一种可再生、清洁、灵活的分布式能源,在满足世界范围内日益增长的清洁能源需求方面发挥着重要作用。随着光伏发电一体化带来了显著的经济效益和环境效益,光伏发电渗透率逐步提高,但它的高普及率也给现有电网系统的运行带来了许多新的问题。尤其是,光伏出力具有波动性和间歇性,光伏电站高比例地接入电网后,会给电力系统带来冲击。为了解决上述问题,对光伏出力预测的需求不断增加,其中,微气象环境下基于精细化天气分型识别的分布式光伏电站出力预测是光伏出力预测的重要领域,通过对天气类型的有效划分可以提高光伏功率预测的精准度。Photovoltaic power generation is a renewable, clean, and flexible distributed energy source that plays an important role in meeting the growing demand for clean energy worldwide. As the integration of photovoltaic power generation has brought significant economic and environmental benefits, the penetration rate of photovoltaic power generation has gradually increased, but its high penetration rate has also brought many new problems to the operation of the existing power grid system. In particular, photovoltaic output is volatile and intermittent. When a high proportion of photovoltaic power stations are connected to the power grid, it will have an impact on the power system. In order to solve the above problems, the demand for photovoltaic output forecasting continues to increase. Among them, distributed photovoltaic power station output forecasting based on refined weather classification identification in micro-meteorological environments is an important area of photovoltaic output forecasting. Through effective classification of weather types, it can Improve the accuracy of photovoltaic power prediction.
现有技术中,用于光伏出力预测的天气分型技术大多针对全天气类型进行细分,例如通过清晰度指数对天气类型进行划分将天气划分为3类,或者通过引入总云量交叉细分进而将晴天类型分为三类。但是,在工程应用中,由于气象环境因子的不确定性,往往一天之中出现较大波动的转折天气(即气象剧烈变化的天气)对于光伏出力以及电网的稳定性和调度的影响较大,在进行光伏并网储能设计时通常要考虑这种影响,而以往的天气类型划分不能很好的识别出出现较大幅度的功率波动的转折天气所在日,从而基于现有的天气分型方法不能实现对模型训练样本进行有效分类,导致预测模型的预测精度较低,因此无法获得更加精准的光伏功率预测结果。In the existing technology, most of the weather classification technologies used for photovoltaic output prediction are subdivided for all weather types. For example, weather types are divided into three categories through clarity index, or cross subdivision is introduced by introducing total cloud cover. Then the sunny day types are divided into three categories. However, in engineering applications, due to the uncertainty of meteorological environmental factors, turning weather with large fluctuations in a day (that is, weather with drastic changes in meteorology) often has a greater impact on photovoltaic output and the stability and dispatch of the power grid. This impact is usually considered when designing photovoltaic grid-connected energy storage. However, the previous classification of weather types cannot well identify the turning weather days when large power fluctuations occur. Therefore, based on the existing weather classification method Effective classification of model training samples cannot be achieved, resulting in low prediction accuracy of the prediction model, and therefore more accurate photovoltaic power prediction results cannot be obtained.
现有的光伏功率预测模型大部分为浅层模型,但是浅层模型在特征选择、泛化能力和处理复杂样本等方面具有局限性,采用浅层模型预测光伏功率时存在精度较低的问题。深度学习模型,例如卷神经网络等,相较于传统的浅层模型能够提取出数据更深层次的特征,在准确性方面具有很大的提高。然而,在光伏功率预测领域,为保障预测精准度,光伏功率预测模型的训练数据量庞大,传统的神经网络等深度学习模型的结构复杂,存在计算效率低的问题。Most of the existing photovoltaic power prediction models are shallow models, but shallow models have limitations in feature selection, generalization capabilities, and processing of complex samples. There is a problem of low accuracy when using shallow models to predict photovoltaic power. Deep learning models, such as convolutional neural networks, can extract deeper features of data compared to traditional shallow models, and have greatly improved accuracy. However, in the field of photovoltaic power prediction, in order to ensure prediction accuracy, the amount of training data for photovoltaic power prediction models is huge, and deep learning models such as traditional neural networks have complex structures and suffer from low computational efficiency.
发明内容Contents of the invention
鉴于上述的分析,本发明实施例旨在提供一种光伏功率预测模型的训练方法,用以解决现有的光伏功率预测模型的预测精度低以及现有的深度学习网络模型应用于光伏功率预测时存在计算效率低的问题。In view of the above analysis, embodiments of the present invention aim to provide a training method for a photovoltaic power prediction model to solve the problem of low prediction accuracy of existing photovoltaic power prediction models and the problem when the existing deep learning network model is applied to photovoltaic power prediction. There is a problem of low computational efficiency.
本发明实施例提供了一种光伏功率预测模型的训练方法,所述方法包括以下步骤:An embodiment of the present invention provides a training method for a photovoltaic power prediction model. The method includes the following steps:
基于气象变化和光伏出力波动情况,对待预测光伏电场所在地区在历史时期中每日的天气进行分类,划分为平稳天气和转折天气;Based on meteorological changes and photovoltaic output fluctuations, the daily weather in the area where the photovoltaic farm is to be predicted is classified into stable weather and transitional weather during the historical period;
基于广义天气类型,对平稳天气日和转折天气日中的各历史时段的天气进行分类,划分为多个子天气类型;Based on generalized weather types, the weather in each historical period of stable weather days and turning weather days is classified into multiple sub-weather types;
分别对各子天气类型对应的历史时段的历史天气数据和历史光伏数据进行预处理,构建各子天气类型的训练数据集;Preprocess the historical weather data and historical photovoltaic data for the historical period corresponding to each sub-weather type respectively, and construct a training data set for each sub-weather type;
分别通过各子天气类型的训练数据集对预先建立的光伏功率预测模型进行训练,以获取各子天气类型对应的子光伏功率预测模型。The pre-established photovoltaic power prediction model is trained through the training data sets of each sub-weather type respectively to obtain the sub-photovoltaic power prediction model corresponding to each sub-weather type.
基于上述方法的进一步改进,采用方差代价函数和交叉熵代价函数构建光伏功率预测模型的损失函数,Based on the further improvement of the above method, the variance cost function and the cross-entropy cost function are used to construct the loss function of the photovoltaic power prediction model,
方差代价函数为:loss_1=(y-y0)2/2;The variance cost function is: loss_1=(yy 0 ) 2 /2;
交叉熵代价函数为:loss_2=-[yln(y0)+(1-y0)ln(1-y0)];The cross entropy cost function is: loss_2=-[yln(y 0 )+(1-y 0 )ln(1-y 0 )];
所述损失函数为:Loss=q1loss_1+q2loss_2;The loss function is: Loss=q 1 loss_1+q 2 loss_2;
式中,y为光伏功率预测模型的输出值,y0为光伏功率的实测值,Loss为总损失,loss_1为方差损失,loss_2为交叉熵损失,q1和q2为权重系数。In the formula, y is the output value of the photovoltaic power prediction model, y 0 is the actual 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 are the weight coefficients.
基于上述方法的进一步改进,所述光伏功率预测模型为轻量化卷积神经网络模型,所述轻量化卷积神经网络模型包括:Based on further improvement of the above method, the photovoltaic power prediction model is a lightweight convolutional neural network model, and the lightweight convolutional neural network model includes:
第一卷积层,用于提取输入数据的浅层特征并输出浅层特征数据;The first convolutional layer is used to extract shallow features of the input data and output shallow feature data;
最大池化层,用于降低浅层特征数据的维度;Maximum pooling layer, used to reduce the dimensionality of shallow feature data;
多个shuffleNet模块,用于采用逐点群卷积和通道混洗的方式从降维后的浅层特征数据中提取深层语义特征;Multiple shuffleNet modules are used to extract deep semantic features from the reduced-dimensional shallow feature data using point-wise group convolution and channel shuffling;
第二卷积层,用于降低深层语义特征的通道维度,输出预测结果。The second convolutional layer is used to reduce the channel dimension of deep semantic features and output prediction results.
基于上述方法的进一步改进,在所述训练数据集中,历史天气数据为光伏功率预测模型的输入数据,历史光伏数据为光伏功率预测模型的输出矫正数据。Based on further improvement of the above method, in the training data set, the historical weather data is the input data of the photovoltaic power prediction model, and the historical photovoltaic data is the output correction data of the photovoltaic power prediction model.
基于上述方法的进一步改进,所述分别对各子天气类型对应的历史时段的历史天气数据和历史光伏数据进行预处理,构建各子天气类型的训练数据集,包括:Based on the further improvement of the above method, the historical weather data and historical photovoltaic data of the historical period corresponding to each sub-weather type are preprocessed respectively to construct a training data set for each sub-weather type, including:
对同一子天气类型对应的历史时段的历史天气数据和历史光伏功率数据进行相关性分析,从所述历史天气数据中选择相关性高的至少两类气象特征数据构建该子天气类型的输入数据序列。Perform correlation analysis on historical weather data and historical photovoltaic power data for the historical period corresponding to the same sub-weather type, and select at least two types of meteorological characteristic data with high correlation from the historical weather data to construct the input data sequence of the sub-weather type. .
基于上述方法的进一步改进,所述方法还包括:Based on further improvements of the above method, the method also includes:
建立第一天气识别模型,通过平稳天气日和转折天气日的历史天气数据对第一天气识别模型进行训练,获取训练好的第一天气识别模型,用于识别预测日的天气类型是转折天气还是平稳天气;Establish a first weather identification model, train the first weather identification model through historical weather data of stable weather days and turning weather days, and obtain the trained first weather identification model, which is used to identify whether the weather type on the predicted day is turning weather or turning weather. Smooth weather;
基于上述方法的进一步改进,所述方法还包括:Based on further improvements of the above method, the method also includes:
建立第一子天气识别模型,通过平稳天气日的各子天气类型对应的历史时段的历史天气数据对第一子天气识别模型进行训练,获取训练好的第一子天气识别模型,用于识别天气类型为平稳天气的预测日的各预测时段的子天气类型;Establish a first sub-weather identification model, train the first sub-weather identification model through historical weather data of historical periods corresponding to each sub-weather type on stable weather days, and obtain the trained first sub-weather identification model for identifying weather The sub-weather types of each forecast period for forecast days with stationary weather type;
建立第二子天气识别模型,通过转折天气日的各子天气类型对应的历史时段的历史天气数据对第二子天气识别模型进行训练,获取训练好的第二子天气识别模型,用于识别天气类型为转折天气的预测日的各预测时段的子天气类型。Establish a second sub-weather identification model, train the second sub-weather identification model through the historical weather data of the historical period corresponding to each sub-weather type on the turning weather day, and obtain the trained second sub-weather identification model for identifying weather The sub-weather types of each forecast period for forecast days with type turning weather.
基于上述方法的进一步改进,所述基于气象变化和光伏出力波动情况,对待预测光伏电场所在地区在历史时期中每日的天气进行分类,划分为平稳天气和转折天气,包括:Based on the further improvement of the above method, based on meteorological changes and photovoltaic output fluctuations, the daily weather in the historical period where the photovoltaic farm is to be predicted is classified into stable weather and transitional weather, including:
根据待预测光伏电场的历史光伏功率数据获取功率变化率数据;Obtain power change rate data based on historical photovoltaic power data of the photovoltaic electric field to be predicted;
基于SOM网络对所述功率变化率数据进行聚类并划分为至少两类,并将功率波动幅度最大的一类筛选出并作为潜在转折天气样本;The power change rate data is clustered and divided into at least two categories based on the SOM network, and the category with the largest power fluctuation is selected and used as a potential turning weather sample;
根据历史太阳辐射数据计算所述潜在转折天气样本对应时段的清晰度指数;Calculate the clarity index of the corresponding period of the potential turning weather sample based on historical solar radiation data;
将清晰度指数小于清晰度阈值的所述潜在转折天气样本所在日的天气类型识别为转折天气,历史时期中的其他日期的天气类型为平稳天气。The weather type on the day of the potential turning weather sample with a clarity index less than the clarity threshold is identified as turning weather, and the weather type on other days in the historical period is identified as stationary weather.
基于上述方法的进一步改进,所述功率变化率为逐时功率之差,根据如下公式计算:Based on the further improvement of the above method, the power change rate is the difference between the hourly power, calculated according to the following formula:
ΔP=Pi+1-Pi;ΔP=P i+1 -P i ;
式中,ΔP逐时功率变化率,Pi+1为每日i+1时刻的功率值,Pi为每日i时刻的功率值。In the formula, ΔP is the hourly power change rate, Pi +1 is the power value at time i+1 every day, and Pi is the power value at time i every day.
基于上述方法的进一步改进,基于广义天气类型,通过K均值聚类方法分别对平稳天气日和转折天气日的各历史时段的天气进行分类,划分为多个子天气类型。Based on the further improvement of the above method, based on generalized weather types, the K-means clustering method is used to classify the weather in each historical period of stable weather days and turning weather days, and divide it into multiple sub-weather types.
与现有技术相比,本发明至少可实现如下有益效果之一:Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
1、本发明中,考虑到一天中天气出现较大变化的转折天气会引起光伏功率出现大幅波动,对于光伏出力的影响较大,因此首先基于天气变化和光伏出力波动情况将历史时期中每日的天气划分为平稳天气和转折天气两类,然后再基于广义天气类型对每日的各历史时段的天气进行细分,获取平稳天气日和转折天气日下的多个子天气类型,实现了对天气类型的精细化划分,之后分别通过预处理后的各子天气类型对应的历史时段的数据对光伏功率预测模型进行训练,从而使训练好的光伏功率预测模型具有较高的预测精度,进而能够获取更加精准的光伏功率预测结果。1. In the present invention, considering that turning weather with large changes in the weather during the day will cause large fluctuations in photovoltaic power, which will have a greater impact on photovoltaic output, firstly, based on weather changes and photovoltaic output fluctuations, the daily data in the historical period will be calculated. The weather is divided into two categories: stable weather and transitional weather. Then, the weather in each historical period of the day is subdivided based on the generalized weather type, and multiple sub-weather types under stable weather days and transitional weather days are obtained to realize the weather analysis. Fine division of types, and then the photovoltaic power prediction model is trained through the preprocessed historical period data corresponding to each sub-weather type, so that the trained photovoltaic power prediction model has high prediction accuracy, and can then obtain More accurate photovoltaic power prediction results.
2、本发明中,子光伏功率预测模型为轻量化卷积神经网络模型,通过改进模型结构,使得模型在保证预测准确率的同时,降低运算量,提高预测效率,其中增加自注意力模块以提取更准确的特征,改进shuffleNet单元,以保障精确率损失不大的同时能够有效降低网络的计算量。2. In the present invention, the sub-photovoltaic power prediction model is a lightweight convolutional neural network model. By improving the model structure, the model can reduce the amount of calculation and improve the prediction efficiency while ensuring the prediction accuracy. Among them, a self-attention module is added to Extract more accurate features and improve the shuffleNet unit to ensure that there is little loss in accuracy while effectively reducing the computational load of the network.
3、本发明中,采用功率变化率表示历史光伏功率数据波动,然后通过对功率变化率数据进行聚类初筛,再结合天文气象因子-清晰度指数进行二次筛选,从而较精确地将出现较大幅度的功率波动的转折天气的所在日识别出来,实现对天气类型的有效划分,确保光伏功率预测结果的精准度。3. In the present invention, the power change rate is used to represent the historical photovoltaic power data fluctuations, and then the power change rate data is clustered for primary screening, and then combined with the astronomical and meteorological factors-clarity index for secondary screening, so as to more accurately classify the occurrence of photovoltaic power data. The day of turning weather with larger power fluctuations can be identified to achieve effective classification of weather types and ensure the accuracy of photovoltaic power prediction results.
4、本发明中,考虑到每日中各时段的天气会发生变化,尤其是转折天气日中不同时段天气变化较大,对光伏出力的影响较大,因此,本发明中,基于广义天气类型,通过K均值聚类方法分别对平稳天气日和转折天气日的各历史时段的天气进行分类划分为多个子天气类型,以确保能够精确地识别预测日的各预测时段的天气类型。4. In the present invention, it is considered that the weather will change at each time period of the day, especially the weather changes greatly at different time periods during the turning weather day, which will have a greater impact on photovoltaic output. Therefore, in the present invention, based on the generalized weather type , the K-means clustering method is used to classify the weather in each historical period of stable weather days and turning weather days into multiple sub-weather types to ensure that the weather types in each prediction period of the prediction day can be accurately identified.
本发明中,上述各技术方案之间还可以相互组合,以实现更多的优选组合方案。本发明的其他特征和优点将在随后的说明书中阐述,并且,部分优点可从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过说明书以及附图中所特别指出的内容中来实现和获得。In the present invention, the above technical solutions can also be combined with each other to achieve more preferred combination solutions. Additional features and advantages of the invention will be set forth in the description which follows, and in part, some advantages will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and obtained by the disclosure particularly pointed out in the description and drawings.
附图说明Description of the drawings
附图仅用于示出具体实施例的目的,而并不认为是对本发明的限制,在整个附图中,相同的参考符号表示相同的部件。The drawings are for the purpose of illustrating specific embodiments only and are not to be construed as limitations of the invention. Throughout the drawings, the same reference characters represent the same components.
图1为本发明实施例的用于光伏功率预测的模型训练方法的流程图;Figure 1 is a flow chart of a model training method for photovoltaic power prediction according to an embodiment of the present invention;
图2为本发明实施例的步骤1中对历史时期中每日的天气进行划分的流程图。Figure 2 is a flow chart for classifying daily weather in a historical period in step 1 of the embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图来具体描述本发明的优选实施例,其中,附图构成本申请一部分,并与本发明的实施例一起用于阐释本发明的原理,并非用于限定本发明的范围。The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
本发明提供一种光伏功率预测模型的训练方法,如图1中所示。所述方法包括以下步骤:The present invention provides a training method for a photovoltaic power prediction model, as shown in Figure 1. The method includes the following steps:
步骤1,基于气象变化和光伏出力波动情况,对待预测光伏电场所在地区在历史时期中每日的天气进行分类,划分为平稳天气和转折天气;Step 1: Based on meteorological changes and photovoltaic output fluctuations, classify the daily weather in the historical period where the photovoltaic farm is to be forecast, and divide it into stable weather and transitional weather;
步骤2,基于广义天气类型,对平稳天气日和转折天气日中的各历史时段的天气进行分类,划分为多个子天气类型;Step 2: Based on generalized weather types, classify the weather in each historical period of stable weather days and turning weather days, and divide it into multiple sub-weather types;
步骤3,分别对各子天气类型对应的历史时段的历史天气数据和历史光伏数据进行预处理,构建各子天气类型的训练数据集;Step 3: Preprocess the historical weather data and historical photovoltaic data for the historical period corresponding to each sub-weather type respectively, and construct a training data set for each sub-weather type;
步骤4,分别通过各子天气类型的训练数据集对预先建立的光伏功率预测模型进行训练,以获取各子天气类型对应的子光伏功率预测模型。Step 4: Train the pre-established photovoltaic power prediction model through the training data sets of each sub-weather type respectively to obtain the sub-photovoltaic power prediction model corresponding to each sub-weather type.
实施时,根据预测日的各预测时段的子天气类型选择相应的训练好的子光伏功率预测模型获取光伏预测功率。During implementation, the corresponding trained sub-photovoltaic power prediction model is selected according to the sub-weather type of each prediction period on the prediction day to obtain the photovoltaic predicted power.
与现有技术相比,本发明中,考虑到一天中天气出现较大变化的转折天气会引起光伏功率出现大幅波动,对于光伏出力的影响较大,因此首先基于天气变化和光伏出力波动情况将历史时期中每日的天气划分为平稳天气和转折天气两类,然后再基于广义天气类型对每日的各历史时段的天气进行细分,获取平稳天气日和转折天气日下的多个子天气类型,实现了对天气类型的精细化划分,之后分别通过预处理后的各子天气类型对应的历史时段的数据对光伏功率预测模型进行训练,从而使训练好的光伏功率预测模型具有较高的预测精度,进而能够获取更加精准的光伏功率预测结果。Compared with the existing technology, in the present invention, considering that turning weather with large changes in the weather during the day will cause large fluctuations in photovoltaic power, which will have a greater impact on photovoltaic output, therefore, first, based on weather changes and photovoltaic output fluctuations, the The daily weather in the historical period is divided into two categories: stable weather and transitional weather. Then the weather in each historical period of the day is subdivided based on the generalized weather type to obtain multiple sub-weather types for stable weather days and transitional weather days. , achieves a refined division of weather types, and then trains the photovoltaic power prediction model through the preprocessed historical period data corresponding to each sub-weather type, so that the trained photovoltaic power prediction model has a higher prediction Accuracy, thereby enabling more accurate photovoltaic power prediction results.
需要说明地是,本发明实施例中,其中,转折天气是指气象发生变化且气象变化能够引起光伏功率大幅波动的天气,不包括气象发生变化但不会引起光伏功率大幅波动的天气。It should be noted that in the embodiment of the present invention, turning weather refers to weather in which the weather changes and the weather changes can cause large fluctuations in photovoltaic power, excluding weather in which the weather changes but does not cause large fluctuations in photovoltaic power.
上述的历史时期一般为选取较长的时间,例如一年或一年以上,从而获取更多的转折天气的训练样本,有利于提高预测精度。The above-mentioned historical period is generally selected over a longer period of time, such as one year or more, so as to obtain more training samples of changing weather, which is beneficial to improving prediction accuracy.
在一个实施例中,如图2中所示,步骤1,所述基于气象变化和光伏出力波动情况,对待预测光伏电场所在地区在历史时期中每日的天气进行分类,划分为平稳天气和转折天气,包括:In one embodiment, as shown in Figure 2, in step 1, based on meteorological changes and photovoltaic output fluctuations, the daily weather in the historical period in the area where the photovoltaic farm is to be predicted is classified into stable weather and transitional weather. Weather, including:
步骤11,根据待预测光伏电场的历史光伏功率数据获取功率变化率数据;Step 11: Obtain power change rate data based on historical photovoltaic power data of the photovoltaic electric field to be predicted;
步骤12,基于SOM网络对所述功率变化率数据进行聚类并划分为至少两类,并将功率波动幅度最大的一类筛选出并作为潜在转折天气样本;Step 12: Cluster the power change rate data based on the SOM network and divide it into at least two categories, and filter out the category with the largest power fluctuation and use it as a potential turning weather sample;
步骤13,根据历史太阳辐射数据计算所述潜在转折天气样本对应时段的清晰度指数;Step 13: Calculate the clarity index of the corresponding period of the potential turning weather sample based on historical solar radiation data;
步骤14,将清晰度指数小于清晰度阈值的所述潜在转折天气样本所在日的天气类型识别为转折天气,历史时期中的其他日期的天气类型为平稳天气。Step 14: Identify the weather type on the day of the potential turning weather sample whose clarity index is less than the clarity threshold as turning weather, and the weather type on other dates in the historical period as stationary weather.
本发明实施例的天气类型划分方法是基于历史光伏功率数据和同期的历史太阳辐射数据实现的,实施时,考虑到剧烈变化的气象条件下通常伴随着光伏出力的大幅波动,因此首先通过功率变化率在数值上满足波动的识别幅度,但是非天气因素也会引起功率波动,尤其是晴天日出或日落时候光伏功率受太阳高度角的影响会大幅波动,因此在识别转折天气时不仅需要关注功率波动这一特征,还需要引入能够反映因此天气变化引起的光照辐射量波动的物理量,其中,清晰度指数能够反应大气的透明程度,与天气状况及太阳辐射密切相关,因此本发明实施例中通过清晰度指数进行二次筛选,将根据功率变化率进行聚类得到的潜在转折天气样本中的晴天数据筛除,仅保留会导致功率波动较大的真正转折天气的数据,从而实现转折天气的识别。即如果某一日的光伏出力能够满足功率变化率的波动幅度要求,同时该日又能够满足相应的大气条件,则可将该日的天气类型识别为具有较大波动幅度的转折天气。The weather type classification method of the embodiment of the present invention is based on historical photovoltaic power data and historical solar radiation data of the same period. During implementation, considering that drastic changes in meteorological conditions are usually accompanied by large fluctuations in photovoltaic output, the power changes are first used The rate meets the fluctuation identification amplitude numerically, but non-weather factors can also cause power fluctuations. Especially at sunrise or sunset on a sunny day, the photovoltaic power will fluctuate greatly due to the influence of the sun's altitude angle. Therefore, when identifying turning weather, it is not only necessary to pay attention to the power The characteristic of fluctuations also requires the introduction of physical quantities that can reflect the fluctuations in illumination radiation caused by weather changes. Among them, the clarity index can reflect the transparency of the atmosphere and is closely related to weather conditions and solar radiation. Therefore, in the embodiment of the present invention, The clarity index is used for secondary screening to filter out the sunny data in the potential turning weather samples clustered according to the power change rate, and only retain the data of the real turning weather that will cause large power fluctuations, thereby realizing the identification of turning weather. . That is, if the photovoltaic output on a certain day can meet the fluctuation amplitude requirements of the power change rate, and at the same time the corresponding atmospheric conditions can be met on that day, the weather type on that day can be identified as turning weather with large fluctuation amplitude.
与现有技术相比,本发明实施例中,采用功率变化率表示历史光伏功率数据波动,然后通过对功率变化率数据进行聚类初筛,再结合天文气象因子-清晰度指数进行二次筛选,从而较精确地将出现较大幅度的功率波动的转折天气识别出来,实现对天气类型的有效划分,确保光伏功率预测结果的精准度。Compared with the existing technology, in the embodiment of the present invention, the power change rate is used to represent historical photovoltaic power data fluctuations, and then the power change rate data is clustered for primary screening, and then combined with astronomical and meteorological factors-clarity index for secondary screening , thereby more accurately identifying turning weather with larger power fluctuations, achieving effective classification of weather types, and ensuring the accuracy of photovoltaic power prediction results.
此外,本发明实施例中所采用的历史光伏功率数据和历史太阳辐射数据是从待预测光伏电场获取并经过数据质量检查后的数据。In addition, the historical photovoltaic power data and historical solar radiation data used in the embodiment of the present invention are data obtained from the photovoltaic electric field to be predicted and subjected to data quality inspection.
优选地,步骤11,所述根据待预测光伏电场的历史光伏功率数据获取功率变化率数据,包括如下步骤:Preferably, step 11, obtaining power change rate data based on historical photovoltaic power data of the photovoltaic electric field to be predicted, includes the following steps:
步骤1101,计算目标地区的太阳高度角,并将太阳高度角大于预设角度的时段作为光伏出力统计时间段;Step 1101: Calculate the solar altitude angle of the target area, and use the period when the solar altitude angle is greater than the preset angle as the photovoltaic output statistical time period;
步骤1102,根据所述历史光伏出力数据计算所述光伏出力统计时间段的功率变化率,以获取功率变化率数据。Step 1102: Calculate the power change rate of the photovoltaic output statistical period according to the historical photovoltaic output data to obtain power change rate data.
其中,太阳高度角是指太阳光线与地平面法线之间的夹角。实施时,考虑到光伏出力具有显著的时间周期特性,通过计算待预测光伏电场所在地区的太阳高度角对初始的历史光伏功率数据进行筛选处理,从而能够更好地利用有效数据。Among them, the solar altitude angle refers to the angle between the sun's rays and the normal line of the ground plane. During implementation, considering that photovoltaic output has significant time period characteristics, the initial historical photovoltaic power data is screened by calculating the solar altitude angle in the area where the photovoltaic electric field to be predicted is located, so that effective data can be better utilized.
所述太阳高度角根据如下公式计算:The solar altitude angle is calculated according to the following formula:
ω=(t-12)×15°;ω=(t-12)×15°;
式中,αs为太阳高度角,θz为天顶角,为目标地区的纬度,δ为赤纬角,ω为时角,n为一年中日期的序号,t为小时。In the formula, α s is the solar altitude angle, θ z is the zenith angle, is the latitude of the target area, δ is the declination angle, ω is the hour angle, n is the serial number of the date in the year, and t is the hour.
例如,每年的1月1日,n=1;平年的12月31日,n=365;闰年的12月31日,n=366。For example, on January 1 of every year, n=1; on December 31 of a normal year, n=365; on December 31 of a leap year, n=366.
时角从天子午圈上的Q点起算(从太阳的正午起算),顺时针方向为正,逆时针方向为负,即上午为负,下午为正,它的数值上等于离正午的时间(小时)乘以15°。The hour angle is calculated from the Q point on the meridian circle (from the sun’s noon). The clockwise direction is positive and the counterclockwise direction is negative, that is, it is negative in the morning and positive in the afternoon. Its value is equal to the time from noon ( hours) times 15°.
步骤1101中,所述预设角度的取值范围为5°至15°,优选为10°。即,优选将太阳高度角大于10°的时段作为光伏出力统计时间段。In step 1101, the preset angle ranges from 5° to 15°, preferably 10°. That is, it is preferable to use the period when the solar altitude angle is greater than 10° as the photovoltaic output statistical period.
进一步具体地,所述功率变化率为逐时功率之差,根据如下公式计算:ΔP=Pi+1-Pi;式中,ΔP逐时功率变化率,Pi+1为每日i+1时刻的功率值,Pi为每日i时刻的功率值。Further specifically, the power change rate is the hourly power difference, calculated according to the following formula: ΔP=P i+1 -P i ; where ΔP hourly power change rate, P i+1 is daily i+ The power value at time 1, Pi is the power value at time i every day.
实施时,首先将历史光伏功率数据按照时序小时值进行排列,然后求取逐小时的功率变化率。During implementation, the historical photovoltaic power data are first arranged according to the time series hourly values, and then the hourly power change rate is obtained.
步骤12:基于SOM网络对所述功率变化率数据进行聚类并划分为至少两类,并将功率波动幅度最大的一类筛选出并作为潜在转折天气样本。Step 12: Cluster the power change rate data based on the SOM network and divide it into at least two categories, and filter out the category with the largest power fluctuation as a potential turning weather sample.
由于目前的标准对于功率波动的大小很难界定给出一个量值,因此,为了筛选出功率的变化率负波动足够大的一类数据样本,本发明实施例中通过SOM网络(自组织映射神经网络)对功率变化率数据进行无监督自组织聚类,划分为多个类别,从而筛选出功率波动幅度最大的一类数据样本并将其作为潜在转折天气样本。Since the current standards are difficult to define a value for the size of power fluctuations, in order to screen out a type of data samples with sufficiently large negative fluctuations in the power change rate, in the embodiment of the present invention, the SOM network (Self-Organizing Mapping Neural Network) is used. Network) conducts unsupervised self-organized clustering on the power change rate data and divides it into multiple categories, thereby screening out the data sample with the largest power fluctuation and using it as a potential turning weather sample.
其中,SOM网络是无导师学习网络,其通过自动寻找数据样本中的内在规律和本质属性,自组织、自适应地改变网络参数与结构,能够适应光伏功率数据的复杂模式,准确、有效地进行分类。Among them, the SOM network is a tutor-less learning network. It automatically searches for the inherent laws and essential attributes in data samples, self-organizes and adaptively changes the network parameters and structure, and can adapt to the complex patterns of photovoltaic power data, accurately and effectively. Classification.
进一步地,步骤12中,将功率负波动幅度最大的一类筛选出并作为潜在转折天气样本。功率负波动幅度最大的一类为功率变化率为负值且波动幅度最大的一类。Further, in step 12, the category with the largest negative power fluctuation amplitude is screened out and used as a potential turning weather sample. The category with the largest negative power fluctuation amplitude is the category with a negative power change rate and the largest fluctuation amplitude.
其中,采用功率负波动幅度最大的一类作为潜在转折天气样本,是由于功率正波动幅度较大的情况,大多是发生在由阴天或雨雪等恶劣天气变化为晴天时,而采用清晰度指数识别转折天气时会将晴天数据筛除,因此在聚类筛选时直接将功率负波动幅度最大的一类筛选出作为潜在转折天气样本,有利于提高处理效率。Among them, the category with the largest negative power fluctuations is used as a potential turning weather sample because the positive power fluctuations with large amplitudes mostly occur when the weather changes from cloudy or rainy and snowy weather to sunny days, while clarity is used. When the index identifies turning weather, sunny data will be filtered out. Therefore, during clustering and screening, the category with the largest negative power fluctuations is directly selected as a potential turning weather sample, which is beneficial to improving processing efficiency.
同时,光伏出力波动中由气象因素的不稳定导致的光伏功率下降对电网的稳定性以及调度影响最大,并且光伏功率随着一天中太阳高度角变化有着显著的时间周期性,一天中出现幅度较大的功率正波动时,也会伴随着较大幅度的功率负波动,因此在聚类筛选时未将功率正波动幅度最大的一类筛选出并作为潜在转折天气样本,不会对转折天气的识别结果和光伏预测功率结果产生较大影响。At the same time, the photovoltaic power decline caused by the instability of meteorological factors during photovoltaic output fluctuations has the greatest impact on the stability and dispatch of the power grid. Moreover, photovoltaic power has a significant time periodicity with the change of the sun's altitude angle throughout the day, and the amplitude appears larger during the day. Large positive power fluctuations will also be accompanied by large negative power fluctuations. Therefore, during the clustering screening, the category with the largest positive power fluctuations was not selected and used as a potential turning weather sample, which would not be used to predict turning weather. The identification results and photovoltaic predicted power results have a greater impact.
具体地,将SOM网络的聚类数目设置为5。这样,步骤12中,基于SOM网络对所述功率变化率数据进行聚类并划分为五类,其中功率负波动最大的一类与其他四类分开,其他四类主要包括了晴天、雨天、功率波动不大的晴转阴等类型,功率负波动最大的一类此时也包括了晴天以及突然的转折天气等类型。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 based on the SOM network and divided into five categories. Among them, the category with the largest negative power fluctuations is separated from the other four categories. The other four categories mainly include sunny days, rainy days, power Types such as sunny to overcast with little fluctuation, and the type with the largest negative power fluctuations also include sunny days and sudden changes in weather.
步骤13:根据同期的历史太阳辐射数据计算所述潜在转折天气样本所在日的清晰度指数。Step 13: Calculate the clarity index of the day of the potential turning weather sample based on the historical solar radiation data of the same period.
具体地,所述潜在转折天气样本所在日的清晰度指数根据如下公式计算:式中,kT为清晰度指数,I为总辐射,I0为地外水平面太阳总辐射。Specifically, the clarity index on the day of the potential turning weather sample is calculated according to the following formula: In the formula, k T is the clarity index, I is the total radiation, and I 0 is the total solar radiation on the extraterrestrial horizontal plane.
地外水平面太阳总辐射根据如下公式计算:The total solar radiation on the extraterrestrial horizontal plane is calculated according to the following formula:
式中,Esc为太阳常数,γ为日地距离变化引起大气层上界的太阳辐射通量的修正值,ωs为日出至日落时间段中的时角。In the formula, E sc is the solar constant, γ is the correction value of the solar radiation flux at the upper boundary of the atmosphere caused by changes in the distance between the sun and the earth, and ω s is the hour angle from sunrise to sunset.
步骤14,将清晰度指数小于清晰度阈值的所述潜在转折天气样本所在日的天气类型识别为转折天气。Step 14: Identify the weather type on the day of the potential turning weather sample whose clarity index is less than the clarity threshold as turning weather.
步骤14中,通过清晰度指数识别所述潜在转折天气样本所在时间点的天气类型。其中,所述清晰度阈值的取值范围为0.1至0.3,优选为0.2。In step 14, the weather type at the time point where the potential turning weather sample is located is identified through the clarity index. Wherein, the definition threshold ranges from 0.1 to 0.3, preferably 0.2.
一般来说,kT<0.2时对应的天气为小雨、阵雨、小雪、轻雾、霾、中雨及以上、中雪及以上等。Generally speaking, the corresponding weather when k T <0.2 is light rain, showers, light snow, light fog, haze, moderate rain and above, moderate snow and above, etc.
在一个实施例中,步骤2中,基于广义天气类型,通过K均值聚类方法分别对平稳天气日和转折天气日的各历史时段的天气进行分类,划分为多个子天气类型。In one embodiment, in step 2, based on generalized weather types, the K-means clustering method is used to classify the weather in each historical period of stable weather days and turning weather days, and divide it into multiple sub-weather types.
其中,所述广义天气类型包括:晴天、阴天、多云和雨雪。Wherein, the generalized weather types include: sunny, cloudy, cloudy, rain and snow.
本发明实施例中,考虑到每日中各时段的天气会发生变化,尤其是转折天气日中不同时段天气变化较大,对光伏出力的影响较大,因此,本发明中,基于广义天气类型,通过K均值聚类方法分别对平稳天气日和转折天气日的各历史时段的天气进行分类划分为多个子天气类型,以确保能够精确地识别预测日的各预测时段的天气类型。In the embodiment of the present invention, it is considered that the weather will change at various times of the day, especially the weather changes greatly at different times of the day during turning weather, which will have a greater impact on photovoltaic output. Therefore, in the present invention, based on the generalized weather type , the K-means clustering method is used to classify the weather in each historical period of stable weather days and turning weather days into multiple sub-weather types to ensure that the weather types in each prediction period of the prediction day can be accurately identified.
实施时,光伏出力具有周期性与太阳辐照相关,因此,光伏出力以及相应的天气数据的统计时段一般在每日8:00至18:00。将历史时期的每日的统计时段按照预设的时间间隔划分为多个历史时段,例如,每个历史时段为1h。然后,获取平稳天气日的各历史时段的历史天气数据,通过K均值聚类方法将上述数据划分为四类,对应的四种子天气类型分别为平稳晴天天气、平稳阴天天气、平稳多云天气、平稳雨雪天气。同样地,获取转折天气日的各历史时段的历史天气数据,通过K均值聚类方法将上述数据划分为四类,对应的四种子天气类型分别为转折晴天天气、转折阴天天气、转折多云天气、转折雨雪天气。During implementation, photovoltaic output is cyclically related to solar irradiation. Therefore, the statistical period for photovoltaic output and corresponding weather data is generally from 8:00 to 18:00 every day. Divide the daily statistical period of the historical period into multiple historical periods according to preset time intervals, for example, each historical period is 1 hour. Then, obtain the historical weather data for each historical period of the stable weather day, and divide the above data into four categories through the K-means clustering method. The corresponding four sub-weather types are stable sunny weather, stable cloudy weather, stable cloudy weather, Smooth rain and snow weather. Similarly, obtain the historical weather data for each historical period of the turning weather day, and divide the above data into four categories through the K-means clustering method. The corresponding four sub-weather types are turning sunny weather, turning cloudy weather, and turning cloudy weather. , turning rain and snow weather.
在一个实施例中,步骤3,所述分别对各子天气类型对应的历史时段的历史天气数据和历史光伏数据进行预处理,构建各子天气类型的训练数据集,包括:对同一子天气类型对应的历史时段的历史天气数据和历史光伏功率数据进行相关性分析,从所述历史天气数据中选择相关性高的至少两类气象特征数据构建该子天气类型的输入数据序列。In one embodiment, step 3, preprocessing historical weather data and historical photovoltaic data for the historical period corresponding to each sub-weather type, and constructing a training data set for each sub-weather type, includes: Correlation analysis is performed on the historical weather data and historical photovoltaic power data of the corresponding historical period, and at least two types of meteorological characteristic data with high correlation are selected from the historical weather data to construct the input data sequence of the sub-weather type.
本实施例中,将历史时期每日的各历史时段的天气类型划分为多个子天气类型后,对同一子天气类型对应的历史时段的历史天气数据和历史光伏功率数据进行相关性分析,筛选出各子天气类型下与光伏出力相关性高的气象特征数据用于模型训练,既能够减少样本量,又能够保证预测精度。In this embodiment, after the weather types of each historical period of each day in the historical period are divided into multiple sub-weather types, correlation analysis is performed on the historical weather data and historical photovoltaic power data of the historical period corresponding to the same sub-weather type, and the filtered out Meteorological characteristic data that are highly correlated with photovoltaic output under each sub-weather type is used for model training, which can not only reduce the sample size but also ensure prediction accuracy.
具体地,平稳天气日对应的四个子天气类型的输入数据序列中,按照相关性从高至低依次包括辐照度、湿度、温度、云量和能见度等五类气象特征数据;Specifically, the input data sequences of the four sub-weather types corresponding to the stable weather days include five types of meteorological characteristic data, including irradiance, humidity, temperature, cloud cover and visibility, in order from high to low in correlation;
转折天气日对应的四个子天气类型的输入数据序列中,按照相关性从高至低依次包括辐照度、湿度、能见度、云量和温度等五类气象特征数据。The input data sequence of the four sub-weather types corresponding to the turning weather day includes five types of meteorological characteristic data, including irradiance, humidity, visibility, cloud cover and temperature, in order from high to low in correlation.
需要说明地是,历史时期中每日的历史时段的历史天气数据和历史光伏功率数据作为一个训练样本,即各子天气类型的训练数据集中包括该子天气类型对应的一个或多个历史时段的历史天气数据和历史光伏功率数据。此外,每个训练样本中,天气数据为输入数据,光伏功率数据为输出矫正数据(标签)。It should be noted that the historical weather data and historical photovoltaic power data of each historical period in the historical period are used as a training sample, that is, the training data set of each sub-weather type includes one or more historical periods corresponding to the sub-weather type. Historical weather data and historical photovoltaic power data. In addition, in each training sample, weather data is the input data, and photovoltaic power data is the output correction data (label).
在一个实施例中,步骤4中的所述光伏功率预测模型为轻量化卷积神经网络模型,所述轻量化卷积神经网络模型包括:In one embodiment, the photovoltaic power prediction model in step 4 is a lightweight convolutional neural network model, and the lightweight convolutional neural network model includes:
第一卷积层,用于提取输入数据的浅层特征并输出浅层特征数据;The first convolutional layer is used to extract shallow features of the input data and output shallow feature data;
最大池化层,用于降低浅层特征数据的维度;Maximum pooling layer, used to reduce the dimensionality of shallow feature data;
多个shuffleNet模块,用于采用逐点群卷积和通道混洗的方式从降维后的浅层特征数据中提取深层语义特征;Multiple shuffleNet modules are used to extract deep semantic features from the reduced-dimensional shallow feature data using point-wise group convolution and channel shuffling;
第二卷积层,用于降低深层语义特征的通道维度,输出预测结果。The second convolutional layer is used to reduce the channel dimension of deep semantic features and output prediction results.
本发明中,为了提高训练效率,构建轻量化卷积神经网络模型作为光伏功率预测模型。其中,所述轻量化卷积神经网络模型为改进的ShuffleNet模型。In the present invention, 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 an improved ShuffleNet model.
具体地,第一卷积层用于提取输入数据的浅层特征、降低数据维度以及增加特征通道数。Specifically, the first convolutional layer is used to extract shallow features of the input data, reduce the data dimension, and increase the number of feature channels.
降维后的特征数据通过多个ShuffleNet模块,提取深层语义特征。每一个模块在继续降低特征数据维度的同时增大特征通道数,逐步提取边缘点的深层次语义特征。ShuffleNet采用逐点群卷积和通道混洗在保障精确率损失不大的同时能够有效降低网络的计算量,大大减少了计算成本。The dimensionally reduced feature data is passed through multiple ShuffleNet modules to extract deep semantic features. Each module continues to reduce the dimensionality of feature data while increasing the number of feature channels, and gradually extracts deep semantic features of edge points. ShuffleNet uses point-wise group convolution and channel shuffling to effectively reduce the computational complexity of the network while ensuring little loss in accuracy, greatly reducing computational costs.
具体地,为了增强网络的特征提取能力,每个所述ShuffleNet模块包括依次连接的ShuffleNet单元和通道注意力模块。Specifically, in order to enhance the feature extraction capability of the network, each ShuffleNet module includes a ShuffleNet unit and a channel attention module connected in sequence.
在每个ShuffleNet单元结构后增加通道注意力模块,从而进一步提取更准确的特征。通道注意力模块由全局平均池化、2个全连接层、一个ReLU层和一个Sigmoid激活层构成,为每个通道生成对应权重,使得网络能够根据每个特征通道的重要性自主进行选择。将ShuffleNet单元输出的特征与通道注意力模块计算的权重相乘得到增加注意力权重的特征。A channel attention module is added after each ShuffleNet unit structure to further extract more accurate features. The channel attention module consists of global average pooling, 2 fully connected layers, a ReLU layer and a Sigmoid activation layer. It generates corresponding weights for each channel, allowing the network to make independent selections based on the importance of each feature channel. The features output by the ShuffleNet unit are multiplied by the weights calculated by the channel attention module to obtain features that increase the attention weight.
本申请改进的ShuffleNet模型将现有的ShuffleNet模型尾部的全局平均池化及全连接层改为1个卷积层,即第二卷积层,该卷积层的卷积核大小为1×1,个数为2,步长为1。The improved ShuffleNet model of this application changes the global average pooling and fully connected layer at the end of the existing ShuffleNet model into one convolution layer, that is, the second convolution layer. The convolution kernel size of this convolution layer is 1×1 , the number is 2, and the step size is 1.
具体地,所述ShuffleNet单元包括依次连接的卷积层、通道混洗层(ChannelShuffle)、深度卷积层、卷积层、融合层。所述ShuffleNet单元中,两个卷积层均为1×1卷积层,深度卷积层为3×3深度卷积层。Specifically, the ShuffleNet unit includes a convolution layer, a channel shuffle layer (ChannelShuffle), a depth convolution layer, a convolution layer, and a fusion layer connected in sequence. In the ShuffleNet unit, the two convolutional layers are both 1×1 convolutional layers, and the depth convolutional layer is a 3×3 depth convolutional layer.
通过构建上述轻量化的神经网络结构,能够使得模型在保证预测准确率的同时,降低运算量,提高检测效率。By constructing the above lightweight neural network structure, the model can reduce the computational complexity and improve detection efficiency while ensuring prediction accuracy.
在搭建好轻量化卷积神经网络模型后,基于分类后的训练样本数据进行模型训练,网络训练过程中使用梯度下降法对参数进行反向传播更新,优化模型参数,从而得到八个子天气类型对应的训练好的子子光伏功率预测模型。After building a lightweight convolutional neural network model, the model is trained based on the classified training sample data. During the network training process, the gradient descent method is used to backpropagate the parameters to update and optimize the model parameters, thereby obtaining the corresponding eight sub-weather types. The trained sub-sub photovoltaic power prediction model.
具体地,采用方差代价函数和交叉熵代价函数构建模型的损失函数Loss。当模型达到要求的精度或者达到预定的迭代次数后,停止训练,得到训练好的子光伏功率预测模型。Specifically, the variance cost function and the cross-entropy cost function are used to construct the loss function Loss of the model. When the model reaches the required accuracy or reaches the predetermined number of iterations, the training is stopped and the trained sub-photovoltaic power prediction model is obtained.
方差代价函数为: The variance cost function is:
交叉熵代价函数为:loss_2=-[yln(y0)+(1-y0)ln(1-y0)];The cross entropy cost function is: loss_2=-[yln(y 0 )+(1-y 0 )ln(1-y 0 )];
所述损失函数为:Loss=q1loss_1+q2loss_2;The loss function is: Loss=q 1 loss_1+q 2 loss_2;
式中,y为光伏功率预测模型的输出值,y0为光伏功率的实测值(目标值);式中,q1和q2为权重系数,按照实际情况设置。In the formula, y is the output value of the photovoltaic power prediction model, y 0 is the actual measured value (target value) of photovoltaic power; in the formula, q 1 and q 2 are weight coefficients, which are set according to the actual situation.
本发明实施例的方法还包括:获取训练好的光伏功率预测模型后,采用均方根误差和绝对值误差对模型预测结果的准确度进行评价。The method of the embodiment of the present invention also includes: after obtaining the trained photovoltaic power prediction model, using the root mean square error and the absolute value error to evaluate the accuracy of the model prediction results.
具体地,均方根误差eRMSE的计算式为:Specifically, the calculation formula of the root mean square error e RMSE is:
绝对值误差eMAE的计算式为:The calculation formula of absolute value error e MAE is:
式中:Pt,pre为t时刻的光伏功率的预测值;Pt为t时刻的光伏功率的实测值;N为预测时段;Cap为电站光伏出力的额定功率。In the formula: P t, pre is the predicted value of photovoltaic power at time t; P t is the actual measured value of photovoltaic power at time t; N is the prediction period; C ap is the rated power of photovoltaic output of the power station.
训练好上述光伏功率预测模型后,可以利用该模型进行光伏功率的预测。光伏功率预测时,先确定预测日的天气类型是平稳天气还是转折天气,然后再进一步确定预测日的各预测时段的天气类型。After training the above photovoltaic power prediction model, the model can be used to predict photovoltaic power. When predicting photovoltaic power, first determine whether the weather type on the forecast day is stable weather or turning weather, and then further determine the weather type in each forecast period on the forecast day.
具体地,采用如下方法确定预测日的各预测时段对应的子天气类型:Specifically, the following method is used to determine the sub-weather type corresponding to each prediction period on the prediction day:
步骤501,建立第一天气识别模型,通过平稳天气日和转折天气日的历史天气数据对第一天气识别模型进行训练;Step 501: Establish a first weather identification model, and train the first weather identification model through historical weather data of stable weather days and turning weather days;
步骤502,建立第一子天气识别模型,通过平稳天气日的各子天气类型对应的历史时段的历史天气数据对第一子天气识别模型进行训练;Step 502: Establish a first sub-weather identification model, and train the first sub-weather identification model through historical weather data of historical periods corresponding to each sub-weather type on stable weather days;
步骤503,建立第二子天气识别模型,通过转折天气日的各子天气类型对应的历史时段的历史天气数据对第二子天气识别模型进行训练;Step 503: Establish a second sub-weather identification model, and train the second sub-weather identification model through the historical weather data of the historical period corresponding to each sub-weather type of the turning weather day;
步骤504,将预测日的天气预报数据输入训练好的第一天气识别模型,获取预测日的天气类型,然后基于预测日的天气类型选择相应的训练好的子天气识别模型,并将预测日的各预测时段的天气类型输入所选择的训练好的子天气识别模型中,获取该预测日的各预测时段的天气类型。Step 504: Enter the weather forecast data on the forecast day into the trained first weather identification model to obtain the weather type on the forecast day, and then select the corresponding trained sub-weather identification model based on the weather type on the forecast day, and add the weather forecast data on the forecast day. The weather type of each prediction period is input into the selected trained sub-weather identification model, and the weather type of each prediction period of the prediction day is obtained.
本发明实施例中,用于识别预测日的天气类型的第一天气识别模型以及用于识别预测日的各预测时段的第一子天气识别模型和第二子天气模型均是通过精确分类后的历史天气数据进行训练的,从而能够有效识别出预测日是否是会出现较大幅度的功率波动的转折天气日,以及更加精准地对预测日的各预测时段的天气类型进行识别,从而有利于提高光伏功率预测结果的精准度。In the embodiment of the present invention, the first weather identification model used to identify the weather type on the predicted day and the first sub-weather identification model and the second sub-weather model used to identify each prediction period of the predicted day are all accurately classified. It is trained with historical weather data, so that it can effectively identify whether the forecast day is a turning weather day with large power fluctuations, and more accurately identify the weather types in each forecast period of the forecast day, which is conducive to improving Accuracy of photovoltaic power prediction results.
具体而言,第一天气识别模型以某一日的天气数据为输入,以转折天气或平稳天气为输出。第一子天气识别模型,以平稳天气日中的某一时段的天气数据为输入,以平稳晴天天气、平稳阴天天气、平稳多云天气、平稳雨雪天气等四种子天气类型为输出;第二子天气识别模型,以转折天气日中的某一时段的天气数据为输入,以转折晴天天气、转折阴天天气、转折多云天气、转折雨雪天气等四种子天气类型为输出。Specifically, the first weather identification model takes the weather data of a certain day as input and uses turning weather or stable weather as output. The first sub-weather identification model takes weather data for a certain period of time in a stable weather day as input, and uses four sub-weather types as stable sunny weather, stable cloudy weather, stable cloudy weather, and stable rainy and snowy weather as output; the second The sub-weather identification model takes the weather data of a certain period of time in a turning weather day as input, and uses four sub-weather types as turning sunny weather, turning cloudy weather, turning cloudy weather, and turning rainy and snowy weather as output.
上述的第一天气识别模型、第一子天气识别模型以及第二子天气识别模型均为深度学习模型,例如kohonen模型、神经网络模型等。The above-mentioned first weather recognition model, first sub-weather recognition model and second sub-weather recognition model are all deep learning models, such as kohonen model, neural network model, etc.
本领域技术人员可以理解,实现上述实施例方法的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读存储介质中。其中,所述计算机可读存储介质为磁盘、光盘、只读存储记忆体或随机存储记忆体等。Those skilled in the art can understand that all or part of the process of implementing the method of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in 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 above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present invention. All substitutions are within the scope of the present invention.
Claims (10)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113837426A (en) * | 2020-11-29 | 2021-12-24 | 上海电力大学 | A photovoltaic power prediction method based on weather classification |
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 | 济南大学 | A Neural Network-Based Photovoltaic Output Power Prediction Method and System |
CN116227677A (en) * | 2022-12-29 | 2023-06-06 | 浙江工业大学 | Power prediction correction method considering photovoltaic power climbing characteristics |
-
2023
- 2023-09-06 CN CN202311147720.6A patent/CN117200200A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113837426A (en) * | 2020-11-29 | 2021-12-24 | 上海电力大学 | A photovoltaic power prediction method based on weather classification |
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 | 济南大学 | A Neural Network-Based Photovoltaic Output Power Prediction Method and System |
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)
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 |
---|---|---|
CN113496311A (en) | Photovoltaic power station generated power prediction method and system | |
CN115481791A (en) | Water-wind power generation and power generation combined prediction method, device and equipment | |
CN104573879A (en) | Photovoltaic power station output predicting method based on optimal similar day set | |
CN106650784A (en) | Feature clustering comparison-based power prediction method and device for photovoltaic power station | |
CN117374956A (en) | Short-term prediction method for photovoltaic power generation of comprehensive energy station | |
CN115204444A (en) | Photovoltaic power prediction method based on improved cluster analysis and fusion integration algorithm | |
CN110852492A (en) | An ultra-short-term forecasting method for photovoltaic power based on Mahalanobis distance | |
CN116502074A (en) | Model fusion-based photovoltaic power generation power prediction method and system | |
CN115021331B (en) | A water-wind-solar integrated compensation method for clean energy bases based on contribution coefficient method | |
CN110472770A (en) | A kind of photovoltaic power generation power prediction method | |
CN114897229A (en) | Ultra-short-term prediction method for irradiance of photovoltaic power station based on AP clustering and Markov chain | |
CN113780643A (en) | A short-term output prediction method of photovoltaic power station based on case reasoning | |
CN117175569B (en) | A photovoltaic forecasting method and system based on refined weather classification | |
CN117200199B (en) | A photovoltaic power prediction method and system based on weather classification | |
CN117200200A (en) | Training method of photovoltaic power prediction model | |
Xu et al. | One-day ahead forecast of PV output based on deep belief network and weather classification | |
CN117638864A (en) | A distributed power aggregation power prediction method based on hybrid prediction model | |
Aupke et al. | Impact of clustering methods on machine learning-based solar power prediction models | |
CN114997475B (en) | Kmeans-based fusion model photovoltaic power generation short-term prediction method | |
Zhang et al. | Multi‐Input Deep Convolutional Neural Network Model for Short‐Term Power Prediction of Photovoltaics | |
Fang et al. | A fcm-xgboost-gru model for short-term photovoltaic power forecasting based on weather classification | |
CN117874584A (en) | Neural network ultra-short term photovoltaic power prediction method based on meteorological clustering | |
CN116881743B (en) | Meteorological turning weather identification method and system for photovoltaic power prediction | |
CN116559975A (en) | Multi-step long weather prediction method based on multi-element time sequence diagram neural network | |
CN111797981B (en) | Single-solar photovoltaic power generation capacity prediction method based on two-way long-short-term memory neural network |
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 |