CN115330085A - Wind speed prediction method based on deep neural network without future information leakage - Google Patents
Wind speed prediction method based on deep neural network without future information leakage Download PDFInfo
- Publication number
- CN115330085A CN115330085A CN202211136465.0A CN202211136465A CN115330085A CN 115330085 A CN115330085 A CN 115330085A CN 202211136465 A CN202211136465 A CN 202211136465A CN 115330085 A CN115330085 A CN 115330085A
- Authority
- CN
- China
- Prior art keywords
- wind speed
- prediction
- data
- sequence data
- neural network
- 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 46
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 24
- 238000000354 decomposition reaction Methods 0.000 claims abstract description 25
- 238000012549 training Methods 0.000 claims abstract description 21
- 238000007781 pre-processing Methods 0.000 claims abstract description 17
- 238000012360 testing method Methods 0.000 claims abstract description 17
- 238000005096 rolling process Methods 0.000 claims abstract description 10
- 238000012216 screening Methods 0.000 claims abstract description 10
- 230000007246 mechanism Effects 0.000 claims abstract description 5
- 230000002457 bidirectional effect Effects 0.000 claims abstract description 4
- 230000015654 memory Effects 0.000 claims abstract description 3
- 238000004364 calculation method Methods 0.000 claims description 19
- 239000011159 matrix material Substances 0.000 claims description 12
- 238000012795 verification Methods 0.000 claims description 10
- 230000007774 longterm Effects 0.000 claims description 5
- 230000006870 function Effects 0.000 claims description 4
- 230000000750 progressive effect Effects 0.000 claims 1
- 238000001228 spectrum Methods 0.000 claims 1
- 101001095088 Homo sapiens Melanoma antigen preferentially expressed in tumors Proteins 0.000 description 6
- 102100037020 Melanoma antigen preferentially expressed in tumors Human genes 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000006872 improvement Effects 0.000 description 4
- 238000003062 neural network model Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000002688 persistence Effects 0.000 description 2
- 238000000053 physical method Methods 0.000 description 2
- 230000003595 spectral effect Effects 0.000 description 2
- 238000007619 statistical method Methods 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000013277 forecasting method Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Economics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Strategic Management (AREA)
- General Physics & Mathematics (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- General Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Operations Research (AREA)
- Game Theory and Decision Science (AREA)
- Development Economics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Evolutionary Computation (AREA)
- Entrepreneurship & Innovation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- Primary Health Care (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明属于风速预测技术领域,具体的为一种基于深度神经网络且无未来信息泄露的风速预测方法。The invention belongs to the technical field of wind speed prediction, in particular to a wind speed prediction method based on a deep neural network and without future information leakage.
背景技术Background technique
准确的风速预测在天气预报精度的提高、气象灾害的预警以及清洁风电的发展等方面至关重要。在风电领域,准确的短期风速预测可以让运营商对风电场的整体运行进行合理调控,维持稳定的供能并降低对电网的冲击。随着国内陆上风电场向低风速区逐步发展,越来越多的风电场选址在山地区域。由于地形变化等因素的影响,山地区域容易产生尾流效应并出现流动分离再附、剪切流等复杂的流动现象。因此,为了保障山区风电场的安全平稳运行,亟需发展准确预测短期风速的方法。Accurate wind speed prediction is crucial in the improvement of weather forecast accuracy, early warning of meteorological disasters, and the development of clean wind power. In the field of wind power, accurate short-term wind speed prediction can allow operators to reasonably regulate the overall operation of wind farms, maintain stable energy supply and reduce the impact on the grid. With the gradual development of domestic onshore wind farms to low wind speed areas, more and more wind farms are located in mountainous areas. Due to the influence of terrain changes and other factors, mountainous areas are prone to wake effects and complex flow phenomena such as flow separation and reattachment, and shear flow. Therefore, in order to ensure the safe and stable operation of wind farms in mountainous areas, it is urgent to develop methods for accurately predicting short-term wind speed.
目前常用的预测方法分为如下几类:物理方法、统计方法、人工智能方法以及混合方法。物理方法需消耗大量的计算资源与时间,在中、长期预测中表现良好,但却难以满足短期预测的时效性要求。统计方法由于其固有的线性假设,导致难以对非线性风速序列进行合理的建模及预测。人工智能方法仅使用了浅层神经网络,缺乏对风速序列深层次非线性特征的提取能力。Currently commonly used forecasting methods are divided into the following categories: physical methods, statistical methods, artificial intelligence methods and hybrid methods. Physical methods consume a lot of computing resources and time, and perform well in mid- and long-term forecasts, but it is difficult to meet the timeliness requirements of short-term forecasts. Statistical methods are difficult to model and predict nonlinear wind speed sequences reasonably due to their inherent linear assumptions. The artificial intelligence method only uses a shallow neural network, which lacks the ability to extract deep nonlinear features of the wind speed sequence.
随着计算机能力的飞速发展,采用深度神经网络进行风速预测也变得切实可行。虽然基于深度学习的短期风速预测模型取得了良好的预测结果,但不可否认的是,单一的神经网络模型可能难以适用于不同的风速序列。并且,实测风速序列中存在着大量的噪音信息,这严重影响了风速预测的精度。因此,结合数据预处理方法的混合预测模型得到了广泛的发展,其中模态分解方法应用地最为广泛。数据预处理操作确实能显著降低风速的随机性与高频噪声,提高风速的可预测性以及预测模型的性能,极大地提高了风速预测的精度。但是这类混合预测模型在数据预处理时对全部的风速序列数据进行了分解,在分解后的子模态上划分训练集和测试集并建立预测模型。这意味着本应未知的测试集数据被视为已知,不可避免的造成了未来信息的泄露。而当有新数据被添加进原始风速序列数据中时,需要重新进行分解,然后再代入子模态预测模型中进行预测。但即使只在原始数据的末端增加部分新数据,分解后的子模态在序列的末端也会产生明显的变化。这部分末端数据是时序预测中最为关键的信息。这意味着在原始数据的子模态上建立的预测模型可能难以应用于新的数据,导致此类混合预测模型缺少实用性。With the rapid development of computer capabilities, it has become feasible to use deep neural networks for wind speed prediction. Although the short-term wind speed prediction model based on deep learning has achieved good prediction results, it is undeniable that a single neural network model may be difficult to apply to different wind speed sequences. Moreover, there is a large amount of noise information in the measured wind speed sequence, which seriously affects the accuracy of wind speed prediction. Therefore, hybrid forecasting models combined with data preprocessing methods have been widely developed, among which the mode decomposition method is the most widely used. The data preprocessing operation can indeed significantly reduce the randomness and high-frequency noise of wind speed, improve the predictability of wind speed and the performance of the prediction model, and greatly improve the accuracy of wind speed prediction. However, this kind of hybrid forecasting model decomposes all the wind speed sequence data during data preprocessing, divides the training set and test set on the decomposed sub-modes and establishes the forecasting model. This means that the test set data that should be unknown is regarded as known, which inevitably leads to the leakage of future information. When new data is added to the original wind speed sequence data, it needs to be decomposed again, and then substituted into the sub-mode prediction model for prediction. But even if only part of the new data is added at the end of the original data, the decomposed submodality will produce obvious changes at the end of the sequence. This part of terminal data is the most critical information in time series prediction. This means that predictive models built on submodalities of the original data may be difficult to apply to new data, resulting in the lack of practicality of such hybrid predictive models.
发明内容Contents of the invention
有鉴于此,本发明的目的在于提供一种基于深度神经网络且无未来信息泄露的风速预测方法,采用事后评估的方式,此方法规避了数据泄露的风险,提高了实用性。In view of this, the purpose of the present invention is to provide a wind speed prediction method based on a deep neural network and without future information leakage, which adopts an after-the-fact evaluation method, which avoids the risk of data leakage and improves practicability.
为达到上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:
一种基于深度神经网络且无未来信息泄露的风速预测方法,包括如下步骤:A method for predicting wind speed based on a deep neural network without future information leakage, comprising the following steps:
步骤1:分别风速序列数据进行数据筛选和数据预处理;根据子模态能量占比大小筛选有效成分Tc并作为预测模型的输出值;采用实时滚动分解策略对风速序列数据进行预处理以得到无信息泄露的预测模型的输入值;以输入值和输出值构建数据集;Step 1: Perform data screening and data preprocessing on the wind speed series data respectively; screen the effective component Tc according to the proportion of sub-modal energy and take it as the output value of the prediction model; use the real-time rolling decomposition strategy to preprocess the wind speed series data to obtain infinite The input value of the prediction model of information leakage; construct the data set with the input value and output value;
步骤2:确定预测步长:按照实际的预测需求,确定需要预测的未来时间步数;Step 2: Determine the forecast step size: according to the actual forecast demand, determine the number of future time steps that need to be forecasted;
步骤3:构建预测模型:构建结合注意力机制的双向长短期记忆网络作为预测模型,利用数据集对预测模型进行训练和测试;Step 3: Build a prediction model: build a bidirectional long-short-term memory network combined with an attention mechanism as a prediction model, and use the data set to train and test the prediction model;
步骤4:风速预测:利用训练得到的预测模型预测风速,得到风速预测结果。Step 4: Wind speed prediction: use the prediction model obtained from training to predict the wind speed, and obtain the wind speed prediction result.
进一步,所述步骤一中,从风速序列数据中筛选出有效成分Tc的方法为:Further, in the
S1:将风速序列数据划分训练集、验证集和测试集,以划分后的数据组建三个数据组,第一个数据组包括训练集,第二个数据组包括验证集,第三个数据组包括测试集;S1: Divide the wind speed sequence data into training set, verification set and test set, and form three data groups with the divided data. The first data group includes the training set, the second data group includes the verification set, and the third data group Include the test set;
S2:对三个数据组中的风速序列数据分别进行模态分解;S2: Perform modal decomposition on the wind speed sequence data in the three data groups;
S3:基于能量原理判断指标,选择合适的子模块得到能代表风速序列数据绝大部分能量的有效分成Tci,i=1,2或3,分别表示从三个数据组的风速序列数据中筛选得到的有效分成;S3: Judging the index based on the energy principle, selecting the appropriate sub-module to obtain the effective division Tc i that can represent most of the energy of the wind speed sequence data, i=1, 2 or 3, respectively representing the selection from the wind speed sequence data of the three data groups the effective share obtained;
S4:按顺序将有效成分Tci进行拼接,得到预测模型的目标输出值Tc。S4: Splicing the effective components Tc i in order to obtain the target output value Tc of the prediction model.
进一步,所述步骤S3中,当前m个子模态能量之和大于等于原始风速序列99%的能量时,Tci为前m个子模态之和,子模态的ER计算方式为:Further, in the step S3, when the sum of the energy of the first m sub-modes is greater than or equal to 99% of the energy of the original wind speed sequence, Tci is the sum of the first m sub-modes, and the calculation method of the ER of the sub-modes is:
其中,ER(k)表示第k个子模态的能量占比;表示第k个子模态序列;X表示风速序列数据;N表示风速序列数据X的长度。Among them, ER(k) represents the energy ratio of the kth sub-mode; Represents the kth sub-mode sequence; X represents the wind speed sequence data; N represents the length of the wind speed sequence data X.
进一步,所述步骤一中,采用实时滚动分解策略对风速序列数据进行预处理的方法为:Further, in the first step, the method for preprocessing the wind speed sequence data by using the real-time rolling decomposition strategy is:
(1)确定窗口长度L:分析风速序列数据X的频谱特征,寻找频率峰值点,得到对应的周期,选择周期数作为RTRD所需的窗口长度;(1) Determine the window length L: analyze the spectral characteristics of the wind speed sequence data X, find the frequency peak point, obtain the corresponding cycle, and select the cycle number as the window length required by RTRD;
(2)确定滑动步幅s;(2) Determine the sliding stride s;
(3)重构风速信号:根据窗口长度L和滑动步幅s将风速序列数据X重构为二维矩阵XR,矩阵形状为(N-L+s,L),其中,N为风速序列数据X的长度;(3) Reconstruct the wind speed signal: according to the window length L and the sliding step s, the wind speed sequence data X is reconstructed into a two-dimensional matrix X R , the matrix shape is (N-L+s, L), where N is the wind speed sequence length of data X;
(4)执行RTRD:逐行分解XR,得到无信息泄露的分解结果 (4) Execute RTRD: decompose X R line by line, and get the decomposition result without information leakage
进一步,所述预测模型包括依次设置的一层输入层、两层Bi-LSTM网络、一层注意力层和一层全连接层。Further, the predictive model includes a layer of input layer, two layers of Bi-LSTM network, a layer of attention layer and a layer of fully connected layer arranged in sequence.
进一步,所述LSTM网络的原理为:Further, the principle of the LSTM network is:
ft=σ(Wxfxt+Whfht-1+bf)f t =σ(W xf x t +W hf h t-1 +b f )
gt=tanh(Wxgxt+Whght-1+bg)g t =tanh(W xg x t +W hg h t-1 +b g )
it=σ(Wxixt+Whiht-1+bi)i t = σ(W xi x t +W hi h t-1 +b i )
ct=ft⊙ct-1+it⊙gt c t =f t ⊙c t-1 +i t ⊙g t
ot=σ(Wxoxt+Whoht-1+bo)o t =σ(W xo x t +W ho h t-1 +b o )
yt=ht=ot⊙tanh(ct)y t =h t =o t ⊙tanh(c t )
其中,xt为输入向量,ct为长期状态,ht为短期状态,yt为输出向量;Wxf,Wxg,Wxi,Wxo分别为与xt连接的权重矩阵,Whf,Whg,Whi,Who分别为与ht-1连接的权重矩阵,bf,bg,bi,bo分别为四层偏置项;ft为遗忘门的控制器,由ft决定ct-1的哪些部分应被删除;gt为LSTM网络的中间输出,其作用为分析xt与ht-1;it为输入门的控制器,判断gt的哪些重要部分应被添加进ct;ot为输出门的控制器,判断应读取ct中的哪部分并应用到ht和yt中;σ表示激活函数。Among them, x t is the input vector, c t is the long-term state, h t is the short-term state, y t is the output vector; W xf , W xg , W xi , W xo are the weight matrices connected with x t respectively, W hf , W hg , W hi , W ho are the weight matrices connected to h t-1 respectively, b f , b g , bi , b o are the four-layer bias items respectively; f t is the controller of the forget gate, and f t determines which parts of c t-1 should be deleted; g t is the intermediate output of the LSTM network, which is used to analyze x t and h t-1 ; it is the controller of the input gate, which determines which important parts of g t should be added to c t ; o t is the controller of the output gate, which part of c t should be read and applied to h t and y t ; σ represents the activation function.
进一步,所述注意力层采用Luong-Attention模型,其计算方法为:Further, the attention layer adopts the Luong-Attention model, and its calculation method is:
score计算方法为:The calculation method of score is:
注意力权重αts计算方法为:The calculation method of attention weight α ts is:
其中,和ht分别为编码器输出的全部隐藏状态以及最后一个隐藏状态;W表示权重矩阵;in, and h t are all hidden states output by the encoder and the last hidden state; W represents the weight matrix;
上下文向量计算方法为:context vector The calculation method is:
其中,αts是注意力权重,是全部隐藏状态;where α ts is the attention weight, is all hidden state;
注意力向量at计算方法为:The calculation method of the attention vector a t is:
其中,为上下文向量;ht为最后一个隐藏状态;Wc表示将要学习的模型参数。in, is the context vector; h t is the last hidden state; W c represents the model parameters to be learned.
进一步,将注意力向量at输入到全连接层,得到风速预测结果。Further, the attention vector at is input to the fully connected layer to obtain the wind speed prediction result.
本发明的有益效果在于:The beneficial effects of the present invention are:
现有的单点风速组合预测模型普遍采用了全分解的数据预处理策略,这种数据预处理策略存在数据泄露的风险,可能导致此类组合预测模型缺少工程上的实用性,因此,准确预测风速的有效成分显得更为关键和可行。考虑到实测风速中存在大量的高频噪声,这部分高频噪声是风速随机性与波动性的重要来源,而风速的低频有效成分占据了风速的绝大部分能量,本发明通过无信息泄露的数据预处理方法提取风速序列的有效成分,建立未来信息无泄漏的表达方法,是得到可靠实用的风场预测结果的前提。Existing single-point wind speed combination forecasting models generally adopt a fully decomposed data preprocessing strategy. This data preprocessing strategy has the risk of data leakage, which may lead to the lack of engineering practicability of such combined forecasting models. Therefore, accurate prediction The effective components of wind speed appear to be more critical and feasible. Considering that there is a large amount of high-frequency noise in the measured wind speed, this part of high-frequency noise is an important source of wind speed randomness and volatility, and the low-frequency effective components of wind speed occupy most of the energy of the wind speed. The data preprocessing method extracts the effective components of the wind speed sequence and establishes an expression method without leakage of future information, which is the premise of obtaining reliable and practical wind field prediction results.
考虑到传统的组合预测模型普遍存在数据泄露问题,风速实测数据中也存在一定程度的噪音成分,本发明基于深度神经网络且无未来信息泄露的风速预测方法,采用无信息泄露的数据预处理策略的短期风速预测框架,旨在提供一种准确预测风速序列有效成分的方法。该预测方法包括数据筛选、基于实时滚动分解的数据预处理以及融合Attention机制的Bi-LSTM神经网络(Bi-LSTM-Attention)三部分内容,避免了数据泄露的风险,并对噪音成分进行了有效处理,且本发明方法采用事后评估,所以通过模态分解得到的真值是延迟获得的。Considering that the traditional combination prediction model generally has the problem of data leakage, and the measured wind speed data also has a certain degree of noise components, the present invention is based on a deep neural network and no future information leakage wind speed prediction method, and adopts a data preprocessing strategy without information leakage The short-term wind speed forecasting framework aims to provide a method for accurately predicting the effective components of wind speed series. The prediction method includes three parts: data screening, data preprocessing based on real-time rolling decomposition, and Bi-LSTM neural network (Bi-LSTM-Attention) integrated with the Attention mechanism, which avoids the risk of data leakage and effectively analyzes noise components. processing, and the method of the present invention uses post-assessment, so the truth value obtained through modal decomposition is obtained with a delay.
附图说明Description of drawings
为了使本发明的目的、技术方案和有益效果更加清楚,本发明提供如下附图进行说明:In order to make the purpose, technical scheme and beneficial effect of the present invention clearer, the present invention provides the following drawings for illustration:
图1为本发明基于深度神经网络且无未来信息泄露的风速预测方法的原理图;Fig. 1 is the schematic diagram of the wind speed prediction method based on deep neural network and no future information leakage in the present invention;
图2为模型训练阶段、验证阶段和测试阶段(即使用阶段)数据的流动情况说明;Figure 2 is an illustration of the flow of data in the model training phase, verification phase, and testing phase (i.e., the use phase);
图3为所有模型的单步预测曲线图。Figure 3 shows the single-step forecast curves for all models.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明作进一步说明,以使本领域的技术人员可以更好的理解本发明并能予以实施,但所举实施例不作为对本发明的限定。The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present invention and implement it, but the examples given are not intended to limit the present invention.
如图1所示,本发明基于深度神经网络且无未来信息泄露的风速预测方法,包括如下步骤。As shown in FIG. 1 , the method for predicting wind speed based on a deep neural network and without future information leakage in the present invention includes the following steps.
步骤1:分别风速序列数据进行数据筛选和数据预处理;根据子模态能量占比大小筛选有效成分Tc并作为预测模型的输出值;采用实时滚动分解(Real-Time RollingDecomposition,RTRD)策略对风速序列数据进行预处理以得到无信息泄露的预测模型的输入值;以输入值和输出值构建数据集。Step 1: Carry out data screening and data preprocessing for wind speed sequence data respectively; screen the effective component Tc according to the proportion of sub-modal energy and use it as the output value of the prediction model; adopt the real-time rolling decomposition (RTRD) strategy to analyze the wind speed The sequence data is preprocessed to obtain the input values of the predictive model without information leakage; the data set is constructed with the input values and output values.
具体的,从风速序列数据中筛选出有效成分Tc的方法为:Specifically, the method of screening out the effective component Tc from the wind speed sequence data is:
S1:将风速序列数据划分训练集、验证集和测试集,本实施例中,风速序列数据按照6:2:2划分训练集(1~0.6N)、验证集(0.6N~0.8N)和测试集(0.8N~N),以划分后的数据组建三个数据组,第一个数据组包括训练集,第二个数据组包括训练集,第三个数据组包括测试集。S1: Divide the wind speed sequence data into training set, verification set and test set. In this embodiment, the wind speed sequence data is divided into training set (1-0.6N), verification set (0.6N-0.8N) and For the test set (0.8N-N), three data groups are formed with the divided data, the first data group includes the training set, the second data group includes the training set, and the third data group includes the test set.
S2:对三个数据组中的风速序列数据分别进行模态分解。采用模态分解方法对第一个数据组(1~0.6N)、第二个数据组(0.6N~0.8N)和第三个数据组(0.8N~N)范围内的风速数据进行分解,其中VMD、SSA算法需指定分解层数,而EMD与ICEEMDAN算法能自适应确定分解层数。S2: Perform modal decomposition on the wind speed sequence data in the three data groups. The modal decomposition method is used to decompose the wind speed data within the range of the first data group (1-0.6N), the second data group (0.6N-0.8N) and the third data group (0.8N-N), Among them, VMD and SSA algorithms need to specify the number of decomposition layers, while EMD and ICEEMDAN algorithms can adaptively determine the number of decomposition layers.
S3:基于能量原理判断指标,选择合适的子模块得到能代表风速序列数据绝大部分能量的有效分成Tci,i=1,2或3,分别表示从三个数据组的风速序列数据中筛选得到的有效分成。具体的,根据子模态能量占比(Energy ratio,ER)大小筛选有效成分Tc需要的子模态数量(子模态按低频至高频的顺序排列)为:当前m个子模态能量之和大于等于原始风速序列99%的能量时,可认为Tci即为前m个子模态之和。子模态的ER计算方式为:S3: Judging the index based on the energy principle, selecting the appropriate sub-module to obtain the effective division Tc i that can represent most of the energy of the wind speed sequence data, i=1, 2 or 3, respectively representing the selection from the wind speed sequence data of the three data groups The effective share obtained. Specifically, the number of sub-modes required to screen the effective component Tc according to the energy ratio (Energy ratio, ER) of the sub-modes (the sub-modes are arranged in the order of low frequency to high frequency) is: the sum of the energy of the current m sub-modes When it is greater than or equal to 99% of the energy of the original wind speed sequence, it can be considered that Tc i is the sum of the first m sub-modes. The ER calculation method of the sub-mode is:
其中,ER(k)表示第k个子模态的能量占比;表示第k个子模态序列;X表示风速序列数据;N表示风速序列数据X的长度。Among them, ER(k) represents the energy ratio of the kth sub-mode; Represents the kth sub-mode sequence; X represents the wind speed sequence data; N represents the length of the wind speed sequence data X.
S4:按顺序将有效成分Tci进行拼接,得到预测模型的目标输出值Tc,Tc是后续构建模型目标输出的数据来源,即真值。S4: Splicing the effective components Tc i in order to obtain the target output value Tc of the prediction model, Tc is the data source of the subsequent model target output, that is, the true value.
具体的,采用实时滚动分解策略对风速序列数据进行预处理的方法为:Specifically, the method of preprocessing the wind speed sequence data using the real-time rolling decomposition strategy is as follows:
(1)确定窗口长度L:分析风速序列数据X的频谱特征,寻找频率峰值点,得到对应的周期,选择合适的周期数作为RTRD所需的窗口长度;(1) Determine the window length L: analyze the spectral characteristics of the wind speed sequence data X, find the frequency peak point, obtain the corresponding period, and select the appropriate period number as the window length required by RTRD;
(2)确定滑动步幅s,当采取逐步预测的方式进行短期风速预测时,滑动步幅应设为1;(2) Determine the sliding step s. When the short-term wind speed prediction is carried out in a step-by-step manner, the sliding step should be set to 1;
(3)重构风速信号:根据窗口长度L和滑动步幅s将风速序列数据X重构为二维矩阵XR,矩阵形状为(N-L+s,L),其中,N为风速序列数据X的长度;(3) Reconstruct the wind speed signal: according to the window length L and the sliding step s, the wind speed sequence data X is reconstructed into a two-dimensional matrix X R , the matrix shape is (N-L+s, L), where N is the wind speed sequence length of data X;
(4)执行RTRD:逐行分解XR,得到无信息泄露的分解结果将每一行数据的前m个子模态相加,可以构成输入矩阵计算与Tc的相关系数;利用相关系数准则判断不同分解算法下构成的最优子模态数量。(4) Execute RTRD: decompose X R line by line, and get the decomposition result without information leakage Will The first m sub-modalities of each row of data are added to form an input matrix calculate Correlation coefficient with Tc; use the correlation coefficient criterion to judge the composition under different decomposition algorithms The optimal number of submodals for .
步骤2:确定预测步长:按照实际的预测需求,确定需要预测的未来时间步数。Step 2: Determine the forecast step size: According to the actual forecast demand, determine the number of future time steps that need to be forecasted.
步骤3:构建预测模型:构建结合注意力机制的双向长短期记忆网络(Bi-LSTM-Attention)作为预测模型,利用数据集对预测模型进行训练和测试。具体的,本实施例中,预测模型包括依次设置的一层输入层、两层Bi-LSTM网络、一层注意力层和一层全连接层。Step 3: Build a prediction model: Build a bidirectional long-term short-term memory network (Bi-LSTM-Attention) combined with an attention mechanism as a prediction model, and use the data set to train and test the prediction model. Specifically, in this embodiment, the prediction model includes an input layer, two Bi-LSTM networks, an attention layer, and a fully connected layer arranged in sequence.
本实施例的LSTM网络采用如下方式进行t时刻隐藏状态的更新:The LSTM network of this embodiment uses the following method to update the hidden state at time t:
ft=σ(Wxfxt+Whfht-1+bf)f t =σ(W xf x t +W hf h t-1 +b f )
gt=tanh(Wxgxt+Whght-1+bg)g t =tanh(W xg x t +W hg h t-1 +b g )
it=σ(Wxixt+Whiht-1+bi)i t = σ(W xi x t +W hi h t-1 +b i )
ct=ft⊙ct-1+it⊙gt c t =f t ⊙c t-1 +i t ⊙g t
ot=σ(Wxoxt+Whoht-1+bo)o t =σ(W xo x t +W ho h t-1 +b o )
yt=ht=ot⊙tanh(ct)y t =h t =o t ⊙tanh(c t )
其中,xt为输入向量,ct为长期状态,ht为短期状态,yt为输出向量;Wxf,Wxg,Wxi,Wxo分别为与xt连接的权重矩阵,Whf,Whg,Whi,Who分别为与ht-1连接的权重矩阵,bf,bg,bi,bo分别为四层偏置项;ft为遗忘门的控制器,由ft决定ct-1的哪些部分应被删除;gt为LSTM网络的中间输出,其作用为分析xt与ht-1;it为输入门的控制器,判断gt的哪些重要部分应被添加进ct;ot为输出门的控制器,判断应读取ct中的哪部分并应用到ht和yt中;σ表示激活函数。Among them, x t is the input vector, c t is the long-term state, h t is the short-term state, y t is the output vector; W xf , W xg , W xi , W xo are the weight matrices connected with x t respectively, W hf , W hg , W hi , W ho are the weight matrices connected to h t-1 respectively, b f , b g , bi , b o are the four-layer bias items respectively; f t is the controller of the forget gate, and f t determines which parts of c t-1 should be deleted; g t is the intermediate output of the LSTM network, which is used to analyze x t and h t-1 ; it is the controller of the input gate, which determines which important parts of g t should be added to c t ; o t is the controller of the output gate, which part of c t should be read and applied to h t and y t ; σ represents the activation function.
本实施例的注意力层采用Luong-Attention模型,其计算方法为:The attention layer of this embodiment adopts the Luong-Attention model, and its calculation method is:
score计算方法为:The calculation method of score is:
注意力权重αts计算方法为:The calculation method of attention weight α ts is:
其中,和ht分别为编码器输出的全部隐藏状态以及最后一个隐藏状态;W表示权重矩阵;in, and h t are all hidden states output by the encoder and the last hidden state; W represents the weight matrix;
上下文向量计算方法为:context vector The calculation method is:
其中,αts是注意力权重,是全部隐藏状态;where α ts is the attention weight, is all hidden state;
注意力向量at计算方法为:The calculation method of the attention vector a t is:
其中,为上下文向量;ht为最后一个隐藏状态;Wc表示将要学习到的模型参数。in, is the context vector; h t is the last hidden state; W c represents the model parameters to be learned.
最后,将注意力向量at输入到全连接层,得到风速预测结果。Finally, the attention vector at is input to the fully connected layer to obtain the wind speed prediction result.
步骤4:风速预测:利用训练得到的预测模型预测风速,得到风速预测结果。Step 4: Wind speed prediction: use the prediction model obtained from training to predict the wind speed, and obtain the wind speed prediction result.
图2说明了数据在神经网络的训练阶段、验证和测试阶段是如何运行的。在图2(a)中,当构造模型的输入时,模态分解遵循实时滚动分解策略,该策略在蓝色数据窗格上进行。这种策略保证了模型的输入始终使用预测值之前的信息,即未来信息的保密性得到保证,这意味着没有信息泄露。而预测值主要是指预测风速的有效分量,用Tc表示,遵循“真值”的含义。在图2(b)中,在模型训练过程中,由于数据已在完整的时间轴上收集,因此真值Tc1可以在训练神经网络时通过模态分解获得。因此,可以直接计算误差并用于更新神经网络的参数。在图2(b)中,在验证和测试过程中,神经网络的参数已经确定,预测结果与真实值之间的误差Tc2或Tc3以延迟方式计算,而不是实时计算。这意味着误差可以在一段时间的操作后计算,并且它们仅用于证明预测的准确性。总之,无论是在训练过程中还是在验证和测试过程中,都始终坚持实时滚动分解策略,避免信息泄露是我们算法的首要原则。Figure 2 illustrates how the data is run through the training, validation, and testing phases of the neural network. In Figure 2(a), when constructing the input to the model, the modal decomposition follows a real-time rolling decomposition strategy, which is performed on the blue data pane. This strategy ensures that the input of the model always uses the information before the predicted value, that is, the confidentiality of future information is guaranteed, which means that there is no information leakage. The predicted value mainly refers to the effective component of the predicted wind speed, represented by Tc, which follows the meaning of "true value". In Fig. 2(b), during the model training process, since the data has been collected on the complete time axis, the true value Tc 1 can be obtained by modality decomposition when training the neural network. Therefore, the error can be directly calculated and used to update the parameters of the neural network. In Fig. 2(b), during the verification and testing process, the parameters of the neural network have been determined, and the error Tc 2 or Tc 3 between the predicted result and the real value is calculated in a delayed manner instead of real-time calculation. This means that errors can be calculated after a period of operation, and they are only used to prove the accuracy of the forecast. In conclusion, no matter in the training process or in the verification and testing process, the real-time rolling decomposition strategy is always adhered to, and avoiding information leakage is the first principle of our algorithm.
实验验证Experimental verification
下面结合具体实例验证本发明基于深度神经网络且无未来信息泄露的风速预测方法。The wind speed prediction method based on the deep neural network and without future information leakage of the present invention will be verified below in conjunction with specific examples.
选取中国云南某测风塔70m高度处连续91天的10min间隔风速数据X作为输入信号,选取日期为2010.4.1~2010.6.30,共有13104组。The 10-min interval wind speed data X of a wind measuring tower in Yunnan, China, at a height of 70m for 91 consecutive days was selected as the input signal, and the selected dates were from 2010.4.1 to 2010.6.30.
一、预测结果误差评估标准1. Evaluation standard of prediction result error
本实施例选取了三种常用的性能指标作为衡量预测模型误差的判断标准,包括MAPE、MAE和RMSE,其定义分别如下。In this embodiment, three commonly used performance indicators are selected as judgment standards for measuring prediction model errors, including MAPE, MAE and RMSE, and their definitions are as follows.
其中:xn代表目标输出值(又称真值),代表预测值。MAPE、MAE和RMSE的值越小,预测精度越高。Among them: x n represents the target output value (also known as the true value), represents the predicted value. The smaller the value of MAPE, MAE and RMSE, the higher the prediction accuracy.
此外,定义RMSE、MAPE、MAE三个误差指标的相对提升比Pmetric,以进一步定量评价不同模型的性能表现。Pmetric的定义如下In addition, the relative improvement ratio P metric of the three error indicators RMSE, MAPE, and MAE is defined to further quantitatively evaluate the performance of different models. P metric is defined as follows
其中,metric代表MAPE、MAE和RMSE三种指标,Ea,Eb代表模型a和模型b的预测误差。Among them, metric represents the three indicators of MAPE, MAE and RMSE, and E a and E b represent the prediction errors of model a and model b.
二、预测模型与不同模型的对比2. Comparison of prediction model with different models
本实施例选择的深度学习平台为基于GPU的TensorFlow 2.3,Python 3.7版本,构建Bi-LSTM-Attention模型。训练过程采用“Adam”优化器,学习率lr设为0.001,损失函数选为“Mean Squared Error”,迭代次数固定为100个epoch。模型的各层参数由人工选择与随机搜索共同确定。The deep learning platform selected in this embodiment is GPU-based TensorFlow 2.3, Python 3.7 version, and builds the Bi-LSTM-Attention model. The training process uses the "Adam" optimizer, the learning rate lr is set to 0.001, the loss function is selected as "Mean Squared Error", and the number of iterations is fixed at 100 epochs. The parameters of each layer of the model are jointly determined by manual selection and random search.
表1显示了持续模型(Persistence,PR)、BP模型、GRU、LSTM和本发明提出的Bi-LSTM-Attention进行了对比。表1和表2显示了不同预测模型单步预测和1-6步预测的RMSE、PMSE、MAPE、PMAPE、MAE和PMAE误差结果。Table 1 shows the comparison between the persistence model (Persistence, PR), BP model, GRU, LSTM and Bi-LSTM-Attention proposed by the present invention. Table 1 and Table 2 show the RMSE, P MSE , MAPE, P MAPE , MAE and P MAE error results of the single-step forecast and 1-6-step forecast of different forecasting models.
表1基于VMD方法的各模型预测性能—单步预测Table 1 Prediction performance of each model based on VMD method—one-step prediction
表2基于VMD方法的各模型预测性能—1-6步预测Table 2 Prediction performance of each model based on VMD method—1-6 step prediction
从以上所有神经网络模型的对比中可以看出,本发明方法能够准确的预测占有风速序列绝大部分能量的有效成分Tc,模型的单步和1-6步预测的精度均优于PR模型,且本发明所提出的Bi-LSTM-Attention预测模型取得了最佳的预测精度,这充分证明了本发明提出的RTRD-Bi-LSTM-Attention预测方法的有效性。具体来说,单步预测下,Bi-LSTM-Attention预测模块相对于PR模型的精度提升比Pmetric在23.79%~32.77%之间;1-6步预测下,Bi-LSTM-Attention预测模块相对于PR模型的精度提升比Pmetric在9.90%~18.09%之间。而当预测步长增大时,所有神经网络模型的Pmetric均有所下降,说明神经网络模型在多步风速预测时性能有所下降。As can be seen from the comparison of all the above neural network models, the method of the present invention can accurately predict the effective component Tc that occupies most of the energy of the wind speed sequence, and the accuracy of the single-step and 1-6-step prediction of the model is better than that of the PR model. And the Bi-LSTM-Attention prediction model proposed in the present invention has achieved the best prediction accuracy, which fully proves the effectiveness of the RTRD-Bi-LSTM-Attention prediction method proposed in the present invention. Specifically, under single-step prediction, the accuracy improvement ratio P metric of the Bi-LSTM-Attention prediction module relative to the PR model is between 23.79% and 32.77%; under 1-6 step prediction, the Bi-LSTM-Attention prediction module is relatively The accuracy improvement ratio P metric of the PR model is between 9.90% and 18.09%. When the prediction step size increases, the P metric of all neural network models decreases, indicating that the performance of neural network models in multi-step wind speed prediction decreases.
以上所述实施例仅是为充分说明本发明而所举的较佳的实施例,本发明的保护范围不限于此。本技术领域的技术人员在本发明基础上所作的等同替代或变换,均在本发明的保护范围之内。本发明的保护范围以权利要求书为准。The above-mentioned embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are all within the protection scope of the present invention. The protection scope of the present invention shall be determined by the claims.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211136465.0A CN115330085A (en) | 2022-09-19 | 2022-09-19 | Wind speed prediction method based on deep neural network without future information leakage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211136465.0A CN115330085A (en) | 2022-09-19 | 2022-09-19 | Wind speed prediction method based on deep neural network without future information leakage |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115330085A true CN115330085A (en) | 2022-11-11 |
Family
ID=83915084
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211136465.0A Pending CN115330085A (en) | 2022-09-19 | 2022-09-19 | Wind speed prediction method based on deep neural network without future information leakage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115330085A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116662766A (en) * | 2023-08-01 | 2023-08-29 | 浙江大学 | Wind speed prediction method, device, and electronic equipment based on two-dimensional reconstruction of data |
CN118313503A (en) * | 2024-03-25 | 2024-07-09 | 山东大学 | A method and system for ultra-short-term wind speed prediction |
-
2022
- 2022-09-19 CN CN202211136465.0A patent/CN115330085A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116662766A (en) * | 2023-08-01 | 2023-08-29 | 浙江大学 | Wind speed prediction method, device, and electronic equipment based on two-dimensional reconstruction of data |
CN116662766B (en) * | 2023-08-01 | 2023-10-03 | 浙江大学 | Wind speed prediction method and device based on data two-dimensional reconstruction and electronic equipment |
CN118313503A (en) * | 2024-03-25 | 2024-07-09 | 山东大学 | A method and system for ultra-short-term wind speed prediction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109272156B (en) | Ultra-short-term wind power probability prediction method | |
CN111582551B (en) | Wind power plant short-term wind speed prediction method and system and electronic equipment | |
CN112149887A (en) | A PM2.5 concentration prediction method based on data spatiotemporal characteristics | |
CN113411216B (en) | Network flow prediction method based on discrete wavelet transform and FA-ELM | |
CN113554466A (en) | Construction method, forecasting method and device for short-term electricity consumption forecasting model | |
CN111985719B (en) | Power load prediction method based on improved long-term and short-term memory network | |
CN115330085A (en) | Wind speed prediction method based on deep neural network without future information leakage | |
CN107609671A (en) | A kind of Short-Term Load Forecasting Method based on composite factor evaluation model | |
CN117154704A (en) | A photovoltaic power prediction method based on multi-scale spatiotemporal graph attention convolution network | |
CN112884236B (en) | A short-term load forecasting method and system based on VDM decomposition and LSTM improvement | |
CN107045785A (en) | A kind of method of the short-term traffic flow forecast based on grey ELM neutral nets | |
CN114694379A (en) | Traffic flow prediction method and system based on self-adaptive dynamic graph convolution | |
CN115860260A (en) | A Residential Air Conditioning Load Forecasting Model Considering Eigendecomposition of Frequency Domain Data | |
CN115659609A (en) | A Noise Prediction Method for Chemical Industry Park Based on DTW-DCRNN | |
Zhang et al. | Remaining useful life prediction of lithium-ion batteries based on TCN-DCN fusion model combined with IRRS filtering | |
CN113128666A (en) | Mo-S-LSTMs model-based time series multi-step prediction method | |
CN116050504A (en) | A short-term prediction model of wind power based on deep learning | |
CN115965177A (en) | Improved autoregressive error compensation wind power forecasting method based on attention mechanism | |
CN114740360A (en) | Lithium ion battery residual service life prediction method based on SAE-CEEMDAN-LSTM | |
CN114372615A (en) | Short-term photovoltaic power prediction method and system considering spatial correlation | |
CN106503793B (en) | A kind of neural network short-term wind speed forecasting method based on improvement difference algorithm | |
CN112132328A (en) | An ultra-short-term local emotion reconstruction neural network prediction method for photovoltaic output power | |
CN116170351B (en) | A Network Traffic Prediction Method Based on Spatio-Temporal Graph Attention Mechanism | |
CN112183814A (en) | Short-term wind speed prediction method | |
CN117354846A (en) | A 5G power network slicing traffic prediction method |
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 |