+

CN115688993A - Short-term power load prediction method suitable for power distribution station area - Google Patents

Short-term power load prediction method suitable for power distribution station area Download PDF

Info

Publication number
CN115688993A
CN115688993A CN202211288727.5A CN202211288727A CN115688993A CN 115688993 A CN115688993 A CN 115688993A CN 202211288727 A CN202211288727 A CN 202211288727A CN 115688993 A CN115688993 A CN 115688993A
Authority
CN
China
Prior art keywords
model
lstm
data
lstnet
term
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211288727.5A
Other languages
Chinese (zh)
Inventor
张有兵
刘主光
斯捷
周文委
陈植
王伟
顾吉鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Tusheng Transmission Engineering Co ltd
Zhejiang University of Technology ZJUT
Wenzhou Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
Zhejiang Tusheng Transmission Engineering Co ltd
Zhejiang University of Technology ZJUT
Wenzhou Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Tusheng Transmission Engineering Co ltd, Zhejiang University of Technology ZJUT, Wenzhou Power Supply Co of State Grid Zhejiang Electric Power Co Ltd filed Critical Zhejiang Tusheng Transmission Engineering Co ltd
Priority to CN202211288727.5A priority Critical patent/CN115688993A/en
Publication of CN115688993A publication Critical patent/CN115688993A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

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

Abstract

The invention discloses a short-term power load prediction method suitable for a distribution station area, which comprises the steps of constructing a one-dimensional Convolutional Neural Network (CNN) and a long-term memory neural network (LSTM) which are respectively used for extracting a local dependency relationship among load data and a long-term change trend of the load data; establishing an LSTNet load prediction model, fusing a traditional autoregressive model to solve the problem that a neural network is insensitive to the extreme value of load data, and using the power load data of a certain distribution area in the training and prediction process of the network; the short-term change trend of the power load is predicted through the established prediction model, and is compared and analyzed with the LSTM, the Bi-LSTM and CNN-LSTM models of the bidirectional long-and-short-term memory neural network, and the LSTNet model is verified to be more advantageous in the aspect of short-term load prediction and higher in prediction accuracy.

Description

一种适用于配电台区的短期电力负荷预测方法A Short-term Power Load Forecasting Method Applicable to Distribution Area

技术领域technical field

本发明涉及电力系统技术领域,提出一种适用于配电台区的短期电力负荷预测方法。The invention relates to the technical field of electric power systems, and proposes a short-term power load forecasting method suitable for distribution stations.

背景技术Background technique

随着电力需求日益增加,传统电网在集中配电、人工监控和恢复、双向通信等方面开始遇到挑战,智能电网的出现为解决上述困难提供技术可能,有助于监控电力生产、传输和消耗,并平衡三者关系。但由于气候、经济、环境等不确定因素的影响,电力负荷波动较大,难以简单对其进行预测。为了确保电力系统安全运行,减少电力消耗,满足市场需求,平衡电力负荷的供需关系,最大化经济效益,对电力负荷进行精准预测十分必要。With the increasing demand for electricity, traditional power grids have begun to encounter challenges in centralized power distribution, manual monitoring and restoration, and two-way communication. The emergence of smart grids provides technical possibilities to solve the above difficulties and helps to monitor power production, transmission, and consumption. , and balance the relationship among the three. However, due to the influence of uncertain factors such as climate, economy, and environment, the power load fluctuates greatly, and it is difficult to predict it simply. In order to ensure the safe operation of the power system, reduce power consumption, meet market demand, balance the supply and demand of power loads, and maximize economic benefits, it is necessary to accurately predict power loads.

电力负荷预测在现代电力系统研究中占有重要地位,不仅是保障电力系统安全经济运行的前提,也是合理安排电网调度计划的依据。根据预测时长,负荷预测可分为短期、中长期、长期等主要形式。短期负荷预测是对电力负荷进行未来几分钟到一星期的预测,精准的短期负荷预测将有助于制订合理的电力生产计划,避免电力资源的过渡浪费,提高电力系统的经济效益。Power load forecasting plays an important role in modern power system research. It is not only the prerequisite for ensuring the safe and economical operation of the power system, but also the basis for rationally arranging power grid dispatching plans. According to the forecast duration, load forecasting can be divided into short-term, medium- and long-term, and long-term. Short-term load forecasting is to predict the power load from a few minutes to a week in the future. Accurate short-term load forecasting will help to formulate a reasonable power production plan, avoid excessive waste of power resources, and improve the economic benefits of the power system.

根据时间跨度可将短期电力负荷预测分为日前负荷预测和周前负荷预测,可为电力负荷调度提供相关参考。随着电力系统监测技术和信息通讯技术的快速发展,越来越多的电力系统中安装了高精度的数据测量装置,收集的海量数据为精准的短期电力负荷预测奠定了数据基础。According to the time span, short-term power load forecasting can be divided into day-ahead load forecasting and week-ahead load forecasting, which can provide relevant references for power load scheduling. With the rapid development of power system monitoring technology and information communication technology, more and more power systems have installed high-precision data measurement devices, and the massive data collected has laid a data foundation for accurate short-term power load forecasting.

负荷预测方法主要分为两大类:统计学方法和机器学习方法。统计学方法主要有自回归模型、卡尔曼滤波法、多元线性回归法等。统计学方法具有原理简单、快速建模的优点,但当样本数据过大时其预测效果一般。机器学习方法主要有灰色理论、神经网络、支持向量回归等。机器学习方法具有处理海量数据、预测精度高的优点,但其十分依赖于采集数据的精确性。相较于单一的深度学习方法,经多种方法融合形成的组合深度学习方法更具预测的普适性,且预测精度更高。Load forecasting methods are mainly divided into two categories: statistical methods and machine learning methods. Statistical methods mainly include autoregressive model, Kalman filter method, multiple linear regression method and so on. Statistical methods have the advantages of simple principle and rapid modeling, but when the sample data is too large, its prediction effect is mediocre. Machine learning methods mainly include gray theory, neural network, support vector regression and so on. The machine learning method has the advantages of processing massive data and high prediction accuracy, but it is very dependent on the accuracy of the collected data. Compared with a single deep learning method, the combined deep learning method formed by the fusion of multiple methods is more predictive and universal, and the prediction accuracy is higher.

发明内容Contents of the invention

基于上述背景,本发明提出利用LSTNet模型进行短期负荷预测,该方法可有效利用负荷数据间的局部依赖关系和负荷数据长期变化的周期特性进行预测。在此基础上加入自回归模型解决神经网络对负荷数据极端值的不敏感问题,进一步改善预测效果。通过与LSTM,Bi-LSTM和CNN-LSTM算法的对比,LSTNet模型在配电台区短期负荷预测方面的效果更优。Based on the above background, the present invention proposes to use the LSTNet model for short-term load forecasting. This method can effectively use the local dependencies between load data and the periodic characteristics of long-term changes in load data for forecasting. On this basis, the autoregressive model is added to solve the insensitivity of the neural network to the extreme value of the load data, and further improve the prediction effect. Compared with LSTM, Bi-LSTM and CNN-LSTM algorithms, the LSTNet model has a better effect on short-term load forecasting in distribution stations.

为了实现上述目的,本发明的技术方案为:In order to achieve the above object, the technical solution of the present invention is:

一种适用于配电台区的短期电力负荷预测方法,包括以下步骤:A short-term power load forecasting method suitable for distribution stations, comprising the following steps:

S1:构建卷积神经网络CNN和长短时记忆神经网络LSTM,用来提取负荷数据间的局部依赖关系和负荷数据长期变化趋势;S1: Construct a convolutional neural network CNN and a long-short-term memory neural network LSTM to extract the local dependencies between load data and the long-term change trend of load data;

S2:基于步骤S1,建立LSTNet负荷预测模型,融合传统自回归模型解决神经网络对负荷数据极端值的不敏感问题,将某一配电台区的电力负荷数据用于网络的训练和预测过程;S2: Based on step S1, establish the LSTNet load forecasting model, integrate the traditional autoregressive model to solve the insensitivity of the neural network to the extreme value of the load data, and use the power load data of a certain distribution station area for the training and forecasting process of the network;

S3:通过步骤S2建立的预测模型对电力负荷的短期变化趋势进行预测,并与LSTM、双向长短时记忆神经网络(Bi-LSTM)和CNN-LSTM模型进行对比分析,验证LSTNet模型在短期负荷预测方面更具优势、预测精度更高。S3: Use the prediction model established in step S2 to predict the short-term change trend of electric load, and compare and analyze it with LSTM, bidirectional long-short-term memory neural network (Bi-LSTM) and CNN-LSTM models to verify the LSTNet model in short-term load forecasting It has more advantages and higher prediction accuracy.

进一步,所述步骤S1中,研究一维卷积神经网络CNN和长短时记忆神经网络LSTM,用来提取负荷数据间的局部依赖关系和负荷数据长期变化趋势包括以下步骤:Further, in the step S1, the study of the one-dimensional convolutional neural network CNN and the long-short-term memory neural network LSTM is used to extract the local dependencies between the load data and the long-term change trend of the load data, including the following steps:

S1-1:卷积神经网络(CNN)作为深度学习的典型代表算法之一,是一种包含卷积运算和具有深度解析结构的前馈型神经网络。CNN是根据生物的视觉机制构建的,其隐含层的卷积核参数共享机制和层间连接的稀疏特性,使网络的复杂度和需要调节的参数大大减少,避免了网络过拟合的风险。S1-1: Convolutional neural network (CNN), as one of the typical representative algorithms of deep learning, is a feed-forward neural network including convolution operation and deep analytical structure. CNN is constructed according to the biological visual mechanism. The convolution kernel parameter sharing mechanism of the hidden layer and the sparse characteristics of the interlayer connection greatly reduce the complexity of the network and the parameters that need to be adjusted, avoiding the risk of network overfitting .

本发明所用的是一个不加池化层的全零填充的一维CNN,主要用于提取原始数据的抽象特征。假设输入的时间序列数据有a行b列,卷积核为m行n列。由于卷积核只在一个维度上滑动,且卷积核包含所有特征向量,所以卷积核宽度必须与输入时间序列数据的宽度一致,即n=b,则第i个卷积核ci作用在输入矩阵X上可表示为:What the present invention uses is a zero-filled one-dimensional CNN without a pooling layer, which is mainly used to extract the abstract features of the original data. Assume that the input time series data has a row and b column, and the convolution kernel is m row and n column. Since the convolution kernel only slides in one dimension, and the convolution kernel contains all eigenvectors, the width of the convolution kernel must be consistent with the width of the input time series data, that is, n=b, then the i-th convolution kernel c i acts On the input matrix X can be expressed as:

ai=ci*X+bi (1)a i =c i *X+b i (1)

式中,*表示卷积运算,bi为卷积偏置项。In the formula, * represents the convolution operation, and bi is the convolution bias item.

S1-2:长短时记忆网络(LSTM)是循环神经网络(RNN)的变体,在一定程度上缓解了RNN在处理相对长时间序列数据时梯度消失的问题,但在处理超长时间序列数据时,LSTM仍然存在梯度消失的问题,下面的步骤中将给出对应的解决方法。S1-2: Long short-term memory network (LSTM) is a variant of recurrent neural network (RNN), which alleviates the problem of gradient disappearance when RNN is dealing with relatively long-term series data to a certain extent, but when dealing with ultra-long-term series data When , LSTM still has the problem of gradient disappearance, and the corresponding solution will be given in the following steps.

LSTM的核心是门控单元,主要有三种:遗忘门、更新门和输出门。其中,遗忘门选择性的遗忘部分历史数据,更新门将当前保留信息与历史遗留数据进行信息融合,输出门衡量当前状态对隐含层的影响。LSTM的计算过程如下:The core of LSTM is the gating unit, there are three main types: forget gate, update gate and output gate. Among them, the forget gate selectively forgets part of the historical data, the update gate fuses the current retained information with the historical legacy data, and the output gate measures the influence of the current state on the hidden layer. The calculation process of LSTM is as follows:

Figure BDA0003900513900000031
Figure BDA0003900513900000031

Figure BDA0003900513900000032
Figure BDA0003900513900000032

Figure BDA0003900513900000033
Figure BDA0003900513900000033

Figure BDA0003900513900000034
Figure BDA0003900513900000034

Figure BDA0003900513900000035
Figure BDA0003900513900000035

Figure BDA0003900513900000036
Figure BDA0003900513900000036

式中,

Figure BDA0003900513900000037
ct分别为t时刻更新门、遗忘门、输出门和记忆细胞的状态,Wu、Wn、Wo、Wc和bu、bn、bo、bc分别为对应的权值矩阵和偏置项,σ、tanh代表激活函数。In the formula,
Figure BDA0003900513900000037
c t is the state of update gate, forget gate, output gate and memory cell at time t respectively, Wu u , W n , W o , W c and b u , b n , b o , b c are the corresponding weight matrix And the bias term, σ, tanh represent the activation function.

σ=1/(1+e-x) (8)σ=1/(1+e -x ) (8)

tanh=(ex-e-x)/(ex+e-x) (9)tanh=(e x -e -x )/(e x +e -x ) (9)

再进一步,所述步骤S2中,基于步骤S1,建立LSTNet负荷预测模型,融合传统自回归模型解决神经网络对负荷数据极端值的不敏感问题,将某一配电台区的电力负荷数据用于网络的训练和预测过程包括以下步骤:Further, in the step S2, based on the step S1, the LSTNet load forecasting model is established, and the traditional autoregressive model is integrated to solve the problem of the insensitivity of the neural network to the extreme value of the load data, and the power load data of a certain distribution station area is used for The training and prediction process of the network includes the following steps:

S2-1:现实生活中的数据大致都是不完整、缺失的,无法直接进行数据挖掘,或挖掘效果较差。为了提高数据挖掘的质量,产生了数据预处理技术。数据预处理是指对所收集的数据进行分析前所做的审核、筛选、排序等必要的处理方式。S2-1: The data in real life are generally incomplete and missing, and cannot be directly used for data mining, or the mining effect is poor. In order to improve the quality of data mining, data preprocessing technology is produced. Data preprocessing refers to the necessary processing methods such as review, screening, sorting, etc. before the collected data is analyzed.

数据预处理有很多方法:数据清理、数据集成、数据变换、数据规约等。数据归一化处理是常用的数据预处理方式,本发明采用最值归一化对数据进行预处理,其公式如下:There are many methods of data preprocessing: data cleaning, data integration, data transformation, data specification, etc. Data normalization processing is a commonly used data preprocessing method. The present invention uses the most value normalization to preprocess data, and its formula is as follows:

xscale=(x-xmin)/(xmax-xmin) (10)x scale =(xx min )/(x max -x min ) (10)

式中,x是实测数据,xmin、xmax为实测数据的最小值、最大值。In the formula, x is the measured data, and x min and x max are the minimum and maximum values of the measured data.

S2-2:LSTNet模型由线性部分和非线性部分组成,线性部分包含时间序列数据中的周期性分量,非线性部分关注时间序列数据的局部极端情况。S2-2: The LSTNet model consists of a linear part and a nonlinear part. The linear part contains the periodic components in the time series data, and the nonlinear part focuses on the local extreme cases of the time series data.

非线性部分的第一层是一个不加池化层的全零填充的一维CNN,并使用ReLU激活函数激活,则第i个卷积核ci作用在输入矩阵X上可表示为:The first layer of the nonlinear part is a zero-filled one-dimensional CNN without a pooling layer, and is activated using the ReLU activation function. Then the i-th convolution kernel ci acting on the input matrix X can be expressed as:

ai=ReLU(ci*X+bi) (11)a i =ReLU(c i *X+b i ) (11)

式中,ReLU(x)=max(0,x),*表示卷积运算,bi为卷积偏置项。In the formula, ReLU(x)=max(0,x), * indicates the convolution operation, and b i is the convolution bias item.

为解决LSTM在处理超长序列数据时出现的梯度消失问题,本发明在LSTNet模型中加入了时间跳跃连接的LSTM网络组件,该组件利用到了电力负荷的周期特性,比如:如果要预测某一天下午一点整的电力负荷,参考历史数据中下午一点整的电力负荷数据将会比参考这天上午、中午的负荷数据更具意义。然后将卷积的输出结果分别输入到LSTM组件与跳跃连接的LSTM组件中,具体的更新过程如下:In order to solve the problem of gradient disappearance that occurs when LSTM processes ultra-long sequence data, the present invention adds an LSTM network component connected by time jumps to the LSTNet model. This component utilizes the periodic characteristics of the power load. For the electricity load at one o'clock, it is more meaningful to refer to the electricity load data at one o'clock in the afternoon in the historical data than to refer to the load data at noon and morning of this day. Then the output results of the convolution are input to the LSTM component and the skip-connected LSTM component respectively. The specific update process is as follows:

Figure BDA0003900513900000041
Figure BDA0003900513900000041

Figure BDA0003900513900000042
Figure BDA0003900513900000042

Figure BDA0003900513900000043
Figure BDA0003900513900000043

Figure BDA0003900513900000044
Figure BDA0003900513900000044

Figure BDA0003900513900000045
Figure BDA0003900513900000045

Figure BDA0003900513900000046
Figure BDA0003900513900000046

在非线性部分的最后,使用一个全连接层来组合二者的输出。全连接层的输入是t时刻LSTM组件的隐态

Figure BDA0003900513900000047
和t-p+1时刻到t时刻跳过的隐态
Figure BDA0003900513900000048
的加权组合,全连接层的输出可表示为:At the end of the non-linear part, a fully connected layer is used to combine the outputs of both. The input of the fully connected layer is the hidden state of the LSTM component at time t
Figure BDA0003900513900000047
and the hidden state skipped from time t-p+1 to time t
Figure BDA0003900513900000048
The weighted combination of , the output of the fully connected layer can be expressed as:

Figure BDA0003900513900000049
Figure BDA0003900513900000049

式中,

Figure BDA00039005139000000410
为非线性部分的输出,WLSTM
Figure BDA00039005139000000411
为权重,bD为偏置项。In the formula,
Figure BDA00039005139000000410
is the output of the nonlinear part, W LSTM and
Figure BDA00039005139000000411
is the weight, and b D is the bias term.

除此之外,由于CNN和LSTM的非线性性质,导致神经网络对输入数据的极端值不敏感,这将对模型的预测精度产生较大影响。因此在LSTNet模型中加入了线性回归部分,线性回归部分由自回归模型组成,其过程如下:In addition, due to the nonlinear nature of CNN and LSTM, the neural network is not sensitive to extreme values of input data, which will have a great impact on the prediction accuracy of the model. Therefore, a linear regression part is added to the LSTNet model, and the linear regression part is composed of an autoregressive model. The process is as follows:

Figure BDA00039005139000000412
Figure BDA00039005139000000412

式中,

Figure BDA00039005139000000413
与xt-i表示线性部分的输出与输入,Wi与bL分别表示权重与偏置,n为输入窗口的大小。In the formula,
Figure BDA00039005139000000413
and x ti represent the output and input of the linear part, W i and b L represent the weight and bias, respectively, and n is the size of the input window.

LSTNet模型的输出为线性和非线性输出结果相加后再经过Sigmoid激活函数后得到的结果yt,可由下式表示。The output of the LSTNet model is the result y t obtained after adding the linear and nonlinear output results and then passing through the Sigmoid activation function, which can be expressed by the following formula.

Figure BDA0003900513900000051
Figure BDA0003900513900000051

S2-3:本发明采用均方根误差(RMSE)、平均绝对百分比误差(MAPE)和R2_score作为LSTNet预测模型的评价指标,计算公式如下:S2-3: the present invention adopts root mean square error (RMSE), average absolute percentage error (MAPE) and R2_score as the evaluation index of LSTNet prediction model, and the calculation formula is as follows:

Figure BDA0003900513900000052
Figure BDA0003900513900000052

Figure BDA0003900513900000053
Figure BDA0003900513900000053

Figure BDA0003900513900000054
Figure BDA0003900513900000054

其中,

Figure BDA0003900513900000055
表示模型的预测值,yi为真实值,
Figure BDA0003900513900000056
为真实值的平均值
Figure BDA0003900513900000057
当RMSE=0,MAPE=0,R2_score=1时,模型拟合效果最好。in,
Figure BDA0003900513900000055
Indicates the predicted value of the model, y i is the real value,
Figure BDA0003900513900000056
is the average of the true values
Figure BDA0003900513900000057
When RMSE=0, MAPE=0, R2_score=1, the model fitting effect is the best.

在所述步骤S3中,通过步骤S2建立的预测模型对电力负荷的短期变化趋势进行预测,并与LSTM、双向长短时记忆神经网络(Bi-LSTM)和CNN-LSTM模型进行对比分析,验证LSTNet模型在短期负荷预测方面更具优势、预测精度更高包括以下步骤:In said step S3, the short-term variation trend of electric load is predicted by the prediction model established in step S2, and comparative analysis is carried out with LSTM, bidirectional long-short-term memory neural network (Bi-LSTM) and CNN-LSTM model, verify LSTNet The model has more advantages and higher prediction accuracy in short-term load forecasting, including the following steps:

S3-1:采用一个公共变压器上记录的负荷数据,即配电台区的电力负荷数据;S3-1: Use the load data recorded on a public transformer, that is, the power load data in the distribution station area;

S3-2:为了突出LSTNet模型在短期负荷预测中的优势,搭建了LSTM、Bi-LSTM、CNN-LSTM预测模型与之对比。这三个模型与LSTNet模型均使用了上面所提的数据集,并进行训练;S3-2: In order to highlight the advantages of the LSTNet model in short-term load forecasting, LSTM, Bi-LSTM, and CNN-LSTM forecasting models were built for comparison. These three models and the LSTNet model all use the data set mentioned above and perform training;

S3-3:为了验证LSTNet模型中各个组件对预测结果带来的作用,在一天和一周的时间尺度上将LSTNet模型的预测结果与其消融模型的预测结果进行对比分析。以LSTNet模型为基础,去掉线性自回归组件后的模型为LSTNetW/OAR模型,去掉中间层跳跃连接的LSTM组件后的模型为LSTNetW/OSkip模型,去掉线性自回归组件与循环跳跃组件后的模型为基本的LSTM模型。S3-3: In order to verify the effect of each component in the LSTNet model on the prediction results, the prediction results of the LSTNet model and the prediction results of the ablation model were compared and analyzed on the time scale of one day and one week. Based on the LSTNet model, the model after removing the linear autoregressive component is the LSTNetW/OAR model, the model after removing the LSTM component of the intermediate layer skip connection is the LSTNetW/OSkip model, and the model after removing the linear autoregressive component and the loop skip component is Basic LSTM model.

本发明的有益效果是:The beneficial effects of the present invention are:

1)LSTNet模型的预测精度高于LSTM、Bi-LSTM、CNN-LSTM,更适用于配电台区的短期负荷预测;1) The prediction accuracy of the LSTNet model is higher than that of LSTM, Bi-LSTM, and CNN-LSTM, and it is more suitable for short-term load prediction in distribution stations;

2)考虑了循环跳跃组件和自回归模型作为LSTNet模型的组件时,在提高预测精度的同时可避免负荷数据极端值不敏感问题;2) Considering the cycle jumping component and the autoregressive model as the components of the LSTNet model, it can avoid the problem of insensitivity to the extreme value of the load data while improving the prediction accuracy;

3)组合的深度学习方法较单一的深度学习方法,更具预测问题的普适性,可用于光伏、风力、综合能源等其他领域的预测研究中。3) Compared with a single deep learning method, the combined deep learning method is more universal in forecasting problems, and can be used in forecasting research in other fields such as photovoltaics, wind power, and comprehensive energy.

附图说明Description of drawings

图1是本发明一维CNN计算过程;Fig. 1 is a one-dimensional CNN calculation process of the present invention;

图2是本发明LSTM的基本结构;Fig. 2 is the basic structure of LSTM of the present invention;

图3是本发明LSTNet模型的基本结构;Fig. 3 is the basic structure of the LSTNet model of the present invention;

图4是本发明LSTNet模型负荷预测流程;Fig. 4 is the LSTNet model load forecasting process of the present invention;

图5是本发明电力负荷年变化曲线;Fig. 5 is the electric load annual variation curve of the present invention;

图6是本发明电力负荷一天预测结果;Fig. 6 is the one-day prediction result of electric load of the present invention;

图7是本发明电力负荷一天预测误差;Fig. 7 is the electric load one day prediction error of the present invention;

图8是本发明电力负荷一周预测结果;Fig. 8 is the prediction result of electric load of the present invention for one week;

图9是本发明电力负荷一周预测误差;Fig. 9 is the electric load one week forecast error of the present invention;

图10是本发明消融实验一天预测结果;Figure 10 is the one-day prediction result of the ablation experiment of the present invention;

图11是本发明消融实验一天预测误差;Fig. 11 is the one-day prediction error of the ablation experiment of the present invention;

图12是本发明消融实验一周预测结果;Fig. 12 is the prediction result of one week of the ablation experiment of the present invention;

图13是本发明消融实验一周预测误差。Fig. 13 is the prediction error of one week of the ablation experiment of the present invention.

具体实施方式Detailed ways

下面结合附图对本发明做进一步说明。The present invention will be further described below in conjunction with the accompanying drawings.

参照图1~图13,一种适用于配电台区的短期电力负荷预测方法,包括以下步骤:Referring to Figures 1 to 13, a short-term power load forecasting method suitable for distribution stations includes the following steps:

S1:构建一维卷积神经网络CNN和长短时记忆神经网络LSTM,用来提取负荷数据间的局部依赖关系和负荷数据长期变化趋势;S1: Construct a one-dimensional convolutional neural network CNN and a long-short-term memory neural network LSTM to extract the local dependencies between load data and the long-term change trend of load data;

S2:基于步骤S1,建立LSTNet负荷预测模型,融合传统自回归模型解决神经网络对负荷数据极端值的不敏感问题,将某一配电台区的电力负荷数据用于网络的训练和预测过程;S2: Based on step S1, establish the LSTNet load forecasting model, integrate the traditional autoregressive model to solve the insensitivity of the neural network to the extreme value of the load data, and use the power load data of a certain distribution station area for the training and forecasting process of the network;

S3:通过步骤S2建立的预测模型对电力负荷的短期变化趋势进行预测,并与LSTM、双向长短时记忆神经网络(Bi-LSTM)和CNN-LSTM模型进行对比分析,验证LSTNet模型在短期负荷预测方面更具优势、预测精度更高。S3: Use the prediction model established in step S2 to predict the short-term change trend of electric load, and compare and analyze it with LSTM, bidirectional long-short-term memory neural network (Bi-LSTM) and CNN-LSTM models to verify the LSTNet model in short-term load forecasting It has more advantages and higher prediction accuracy.

进一步,所述步骤S1中,研究一维卷积神经网络CNN和长短时记忆神经网络LSTM,用来提取负荷数据间的局部依赖关系和负荷数据长期变化趋势包括以下步骤:Further, in the step S1, the study of the one-dimensional convolutional neural network CNN and the long-short-term memory neural network LSTM is used to extract the local dependencies between the load data and the long-term change trend of the load data, including the following steps:

S1-1:卷积神经网络(CNN)作为深度学习的典型代表算法之一,是一种包含卷积运算和具有深度解析结构的前馈型神经网络。CNN是根据生物的视觉机制构建的,其隐含层的卷积核参数共享机制和层间连接的稀疏特性,使网络的复杂度和需要调节的参数大大减少,避免了网络过拟合的风险。S1-1: Convolutional neural network (CNN), as one of the typical representative algorithms of deep learning, is a feed-forward neural network including convolution operation and deep analytical structure. CNN is constructed according to the biological visual mechanism. The convolution kernel parameter sharing mechanism of the hidden layer and the sparse characteristics of the interlayer connection greatly reduce the complexity of the network and the parameters that need to be adjusted, avoiding the risk of network overfitting .

本发明所用的是一个不加池化层的全零填充的一维CNN,主要用于提取原始数据的抽象特征,如图1所示。假设输入的时间序列数据有a行b列,卷积核为m行n列。由于卷积核只在一个维度上滑动,且卷积核包含所有特征向量,所以卷积核宽度必须与输入时间序列数据的宽度一致,即n=b,则第i个卷积核ci作用在输入矩阵X上可表示为:What the present invention uses is a zero-filled one-dimensional CNN without a pooling layer, which is mainly used to extract abstract features of raw data, as shown in FIG. 1 . Assume that the input time series data has a row and b column, and the convolution kernel is m row and n column. Since the convolution kernel only slides in one dimension, and the convolution kernel contains all eigenvectors, the width of the convolution kernel must be consistent with the width of the input time series data, that is, n=b, then the i-th convolution kernel c i acts On the input matrix X can be expressed as:

ai=ci*X+bi (1)a i =c i *X+b i (1)

式中,*表示卷积运算,bi为卷积偏置项。In the formula, * represents the convolution operation, and bi is the convolution bias item.

S1-2:长短时记忆网络(LSTM)是循环神经网络(RNN)的变体,在一定程度上缓解了RNN在处理相对长时间序列数据时梯度消失的问题,但在处理超长时间序列数据时,LSTM仍然存在梯度消失的问题,下文中将给出对应的解决方法。图2为LSTM的基本结构。S1-2: Long short-term memory network (LSTM) is a variant of recurrent neural network (RNN), which alleviates the problem of gradient disappearance when RNN is dealing with relatively long-term series data to a certain extent, but when dealing with ultra-long-term series data When , LSTM still has the problem of gradient disappearance, and the corresponding solution will be given below. Figure 2 shows the basic structure of LSTM.

LSTM的核心是门控单元,主要有三种:遗忘门、更新门和输出门。其中,遗忘门选择性的遗忘部分历史数据,更新门将当前保留信息与历史遗留数据进行信息融合,输出门衡量当前状态对隐含层的影响。LSTM的计算过程如下:The core of LSTM is the gating unit, there are three main types: forget gate, update gate and output gate. Among them, the forget gate selectively forgets part of the historical data, the update gate fuses the current retained information with the historical legacy data, and the output gate measures the influence of the current state on the hidden layer. The calculation process of LSTM is as follows:

Figure BDA0003900513900000071
Figure BDA0003900513900000071

Figure BDA0003900513900000072
Figure BDA0003900513900000072

Figure BDA0003900513900000073
Figure BDA0003900513900000073

Figure BDA0003900513900000074
Figure BDA0003900513900000074

Figure BDA0003900513900000075
Figure BDA0003900513900000075

Figure BDA0003900513900000076
Figure BDA0003900513900000076

式中,

Figure BDA0003900513900000077
ct分别为t时刻更新门、遗忘门、输出门和记忆细胞的状态,Wu、Wn、Wo、Wc和bu、bn、bo、bc分别为对应的权值矩阵和偏置项,σ、tanh代表激活函数。In the formula,
Figure BDA0003900513900000077
c t is the state of update gate, forget gate, output gate and memory cell at time t respectively, Wu u , W n , W o , W c and b u , b n , b o , b c are the corresponding weight matrix And the bias term, σ, tanh represent the activation function.

σ=1/(1+e-x) (8)σ=1/(1+e -x ) (8)

tanh=(ex-e-x)/(ex+e-x) (9)tanh=(e x -e -x )/(e x +e -x ) (9)

再进一步,所述步骤S2中,基于步骤S1,建立LSTNet负荷预测模型,融合传统自回归模型解决神经网络对负荷数据极端值的不敏感问题,将某一配电台区的电力负荷数据用于网络的训练和预测过程包括以下步骤:Further, in the step S2, based on the step S1, the LSTNet load forecasting model is established, and the traditional autoregressive model is integrated to solve the problem of the insensitivity of the neural network to the extreme value of the load data, and the power load data of a certain distribution station area is used for The training and prediction process of the network includes the following steps:

S2-1:现实生活中的数据大致都是不完整、缺失的,无法直接进行数据挖掘,或挖掘效果较差。为了提高数据挖掘的质量,产生了数据预处理技术。数据预处理是指对所收集的数据进行分析前所做的审核、筛选、排序等必要的处理方式。S2-1: The data in real life are generally incomplete and missing, and cannot be directly used for data mining, or the mining effect is poor. In order to improve the quality of data mining, data preprocessing technology is produced. Data preprocessing refers to the necessary processing methods such as review, screening, sorting, etc. before the collected data is analyzed.

数据预处理有很多方法:数据清理、数据集成、数据变换、数据规约等。数据归一化处理是常用的数据预处理方式,本发明采用最值归一化对数据进行预处理,其公式如下:There are many methods of data preprocessing: data cleaning, data integration, data transformation, data specification, etc. Data normalization processing is a commonly used data preprocessing method. The present invention uses the most value normalization to preprocess data, and its formula is as follows:

xscale=(x-xmin)/(xmax-xmin) (10)x scale =(xx min )/(x max -x min ) (10)

式中,x是实测数据,xmin、xmax为实测数据的最小值、最大值。In the formula, x is the measured data, and x min and x max are the minimum and maximum values of the measured data.

S2-2:LSTNet模型由线性部分和非线性部分组成,线性部分包含时间序列数据中的周期性分量,非线性部分关注时间序列数据的局部极端情况。LSTNet模型的基本结构如图3所示。S2-2: The LSTNet model consists of a linear part and a nonlinear part. The linear part contains the periodic components in the time series data, and the nonlinear part focuses on the local extreme cases of the time series data. The basic structure of the LSTNet model is shown in Figure 3.

非线性部分的第一层是一个不加池化层的全零填充的一维CNN,并使用ReLU激活函数激活,则第i个卷积核ci作用在输入矩阵X上可表示为:The first layer of the nonlinear part is a zero-filled one-dimensional CNN without a pooling layer, and is activated using the ReLU activation function. Then the i-th convolution kernel ci acting on the input matrix X can be expressed as:

ai=ReLU(ci*X+bi) (11)a i =ReLU(c i *X+b i ) (11)

式中,ReLU(x)=max(0,x),*表示卷积运算,bi为卷积偏置项。In the formula, ReLU(x)=max(0,x), * indicates the convolution operation, and b i is the convolution bias item.

为解决LSTM在处理超长序列数据时出现的梯度消失问题,本发明在LSTNet模型中加入了时间跳跃连接的LSTM网络组件,该组件利用到了电力负荷的周期特性,比如:如果要预测某一天下午一点整的电力负荷,参考历史数据中下午一点整的电力负荷数据将会比参考这天上午、中午的负荷数据更具意义。然后将卷积的输出结果分别输入到LSTM组件与跳跃连接的LSTM组件中,具体的更新过程如下:In order to solve the problem of gradient disappearance that occurs when LSTM processes ultra-long sequence data, the present invention adds an LSTM network component connected by time jumps to the LSTNet model. This component utilizes the periodic characteristics of the power load. For the electricity load at one o'clock, it is more meaningful to refer to the electricity load data at one o'clock in the afternoon in the historical data than to refer to the load data at noon and morning of this day. Then the output results of the convolution are input to the LSTM component and the skip-connected LSTM component respectively. The specific update process is as follows:

Figure BDA0003900513900000081
Figure BDA0003900513900000081

Figure BDA0003900513900000091
Figure BDA0003900513900000091

Figure BDA0003900513900000092
Figure BDA0003900513900000092

Figure BDA0003900513900000093
Figure BDA0003900513900000093

Figure BDA0003900513900000094
Figure BDA0003900513900000094

Figure BDA0003900513900000095
Figure BDA0003900513900000095

在非线性部分的最后,使用一个全连接层来组合二者的输出。全连接层的输入是t时刻LSTM组件的隐态

Figure BDA0003900513900000096
和t-p+1时刻到t时刻跳过的隐态
Figure BDA0003900513900000097
的加权组合,全连接层的输出可表示为:At the end of the non-linear part, a fully connected layer is used to combine the outputs of both. The input of the fully connected layer is the hidden state of the LSTM component at time t
Figure BDA0003900513900000096
and the hidden state skipped from time t-p+1 to time t
Figure BDA0003900513900000097
The weighted combination of , the output of the fully connected layer can be expressed as:

Figure BDA0003900513900000098
Figure BDA0003900513900000098

式中,

Figure BDA0003900513900000099
为非线性部分的输出,WLSTM
Figure BDA00039005139000000910
为权重,bD为偏置项。In the formula,
Figure BDA0003900513900000099
is the output of the nonlinear part, W LSTM and
Figure BDA00039005139000000910
is the weight, and b D is the bias item.

除此之外,由于CNN和LSTM的非线性性质,导致神经网络对输入数据的极端值不敏感,这将对模型的预测精度产生较大影响。因此在LSTNet模型中加入了线性回归部分,线性回归部分由自回归模型组成,其过程如下:In addition, due to the nonlinear nature of CNN and LSTM, the neural network is not sensitive to extreme values of input data, which will have a great impact on the prediction accuracy of the model. Therefore, a linear regression part is added to the LSTNet model, and the linear regression part is composed of an autoregressive model. The process is as follows:

Figure BDA00039005139000000911
Figure BDA00039005139000000911

式中,

Figure BDA00039005139000000912
与xt-i表示线性部分的输出与输入,Wi与bL分别表示权重与偏置,n为输入窗口的大小。In the formula,
Figure BDA00039005139000000912
and x ti represent the output and input of the linear part, W i and b L represent the weight and bias, respectively, and n is the size of the input window.

LSTNet模型的输出为线性和非线性输出结果相加后再经过Sigmoid激活函数后得到的结果yt,可由下式表示。The output of the LSTNet model is the result y t obtained after adding the linear and nonlinear output results and then passing through the Sigmoid activation function, which can be expressed by the following formula.

Figure BDA00039005139000000913
Figure BDA00039005139000000913

S2-3:本发明采用均方根误差(RMSE)、平均绝对百分比误差(MAPE)和R2_score作为LSTNet预测模型的评价指标,计算公式如下:S2-3: the present invention adopts root mean square error (RMSE), average absolute percentage error (MAPE) and R2_score as the evaluation index of LSTNet prediction model, and the calculation formula is as follows:

Figure BDA00039005139000000914
Figure BDA00039005139000000914

Figure BDA00039005139000000915
Figure BDA00039005139000000915

Figure BDA00039005139000000916
Figure BDA00039005139000000916

其中,

Figure BDA00039005139000000917
表示模型的预测值,yi为真实值,
Figure BDA00039005139000000918
为真实值的平均值
Figure BDA00039005139000000919
当RMSE=0,MAPE=0,R2_score=1时,模型拟合效果最好。in,
Figure BDA00039005139000000917
Indicates the predicted value of the model, y i is the real value,
Figure BDA00039005139000000918
is the average of the true values
Figure BDA00039005139000000919
When RMSE=0, MAPE=0, R2_score=1, the model fitting effect is the best.

将建立的LSTNet模型用于电力负荷的短期预测过程中,具体的算法流程如图4所示。The established LSTNet model is used in the short-term forecasting process of electric load, and the specific algorithm flow is shown in Figure 4.

在所述步骤S3中,通过步骤S2建立的预测模型对电力负荷的短期变化趋势进行预测,并与LSTM、双向长短时记忆神经网络(Bi-LSTM)和CNN-LSTM模型进行对比分析,验证LSTNet模型在短期负荷预测方面更具优势、预测精度更高包括以下步骤:In said step S3, the short-term variation trend of electric load is predicted by the prediction model established in step S2, and comparative analysis is carried out with LSTM, bidirectional long-short-term memory neural network (Bi-LSTM) and CNN-LSTM model, verify LSTNet The model has more advantages and higher prediction accuracy in short-term load forecasting, including the following steps:

S3-1:本发明采用国网温州电力公司在某小区一个公共变压器上记录的负荷数据,即配电台区的电力负荷数据,该数据采样频率为15min,总共12个月,共记录35133条数据。图5为一年的电力负荷变化曲线,小图中为本年第一周的负荷数据。S3-1: The present invention uses the load data recorded on a public transformer in a community by the State Grid Wenzhou Electric Power Company, that is, the power load data of the distribution station area. The data sampling frequency is 15 minutes, a total of 12 months, and a total of 35,133 records are recorded data. Figure 5 shows the power load change curve for one year, and the small picture shows the load data for the first week of this year.

由图5可以看出,配电台区电力负荷年变化曲线呈现出强烈的非线性和季节性,即夏季的用电负荷高于其它季节,此特征与我国南方地区的用电负荷习惯一致。此外,电力负荷周变化曲线呈现出明显的周期特性,利用此特性可进行短期负荷预测研究,以便制订合理的电网调度计划。It can be seen from Figure 5 that the annual change curve of power load in the distribution station area presents strong nonlinearity and seasonality, that is, the power load in summer is higher than that in other seasons, which is consistent with the power load habits in southern my country. In addition, the change curve of power load cycle presents an obvious periodic characteristic, which can be used for short-term load forecasting research in order to formulate a reasonable power grid dispatching plan.

S3-2:为了突出LSTNet模型在短期负荷预测中的优势,本发明还搭建了LSTM、Bi-LSTM、CNN-LSTM预测模型与之对比。这三个模型与LSTNet模型均使用了上面所提的数据集,训练次数均为100次。图6、图7、图8、图9分别为四种预测模型在一天与一周的时间尺度上的预测结果曲线与预测误差曲线。表1为四种预测模型在一天与一周的时间尺度上的模型精度的评价指标。S3-2: In order to highlight the advantages of the LSTNet model in short-term load forecasting, the present invention also builds LSTM, Bi-LSTM, and CNN-LSTM forecasting models for comparison. These three models and the LSTNet model all use the data set mentioned above, and the training times are 100 times. Figure 6, Figure 7, Figure 8, and Figure 9 are the prediction result curves and prediction error curves of the four prediction models on the time scales of one day and one week respectively. Table 1 shows the evaluation indicators of the model accuracy of the four forecasting models on the time scale of one day and one week.

S3-3:为了验证LSTNet模型中各个组件对预测结果带来的作用,本发明在一天和一周的时间尺度上将LSTNet模型的预测结果与其消融模型的预测结果进行对比分析。以LSTNet模型为基础,去掉线性自回归组件后的模型为LSTNetW/OAR模型,去掉中间层跳跃连接的LSTM组件后的模型为LSTNetW/OSkip模型,去掉线性自回归组件与循环跳跃组件后的模型为基本的LSTM模型。图10、图11、图12、图13分别为LSTNet模型及其消融模型在一天与一周的时间尺度上的预测结果曲线与预测误差曲线。表2为LSTNet模型及其消融模型在一天与一周的时间尺度上的模型精度评价指标。S3-3: In order to verify the effect of each component in the LSTNet model on the prediction results, the present invention compares and analyzes the prediction results of the LSTNet model and its ablation model on the time scale of one day and one week. Based on the LSTNet model, the model after removing the linear autoregressive component is the LSTNetW/OAR model, the model after removing the LSTM component of the intermediate layer skip connection is the LSTNetW/OSkip model, and the model after removing the linear autoregressive component and the loop skip component is Basic LSTM model. Figure 10, Figure 11, Figure 12, and Figure 13 are the prediction result curves and prediction error curves of the LSTNet model and its ablation model on the time scale of one day and one week, respectively. Table 2 shows the model accuracy evaluation indicators of the LSTNet model and its ablation model on the time scale of one day and one week.

为使本领域技术人员更好地理解本发明,算例分析包括以下构成:In order to make those skilled in the art better understand the present invention, the example analysis includes the following formations:

一、算例描述及仿真结果分析1. Calculation example description and simulation result analysis

为突出LSTNet模型在短期负荷预测中的优势,本发明搭建了LSTM、Bi-LSTM、CNN-LSTM预测模型与之对比。这三个模型与LSTNet模型均使用了上面所提的数据集,训练次数均为100次。图6、图7、图8、图9分别为四种预测模型在一天与一周的时间尺度上的预测结果曲线与预测误差曲线。表1为四种预测模型在一天与一周的时间尺度上的模型精度的评价指标。In order to highlight the advantages of the LSTNet model in short-term load forecasting, the present invention builds LSTM, Bi-LSTM, and CNN-LSTM forecasting models for comparison. These three models and the LSTNet model all use the data set mentioned above, and the training times are 100 times. Figure 6, Figure 7, Figure 8, and Figure 9 are the prediction result curves and prediction error curves of the four prediction models on the time scales of one day and one week respectively. Table 1 shows the evaluation indicators of the model accuracy of the four forecasting models on the time scale of one day and one week.

由图6到图9可以看出,不论是一天还是一周的时间尺度,这四种预测方法都能较好地预测配电台区电力负荷的变化,但本发明预测方法的结果曲线最贴合真实的配电台区电力负荷变化曲线,其他三者在负荷变动较大时的预测结果存在较大的偏差。同时,本发明所提的电力负荷预测方法在一天与一周的时间尺度上均具有最小的误差,且误差曲线变动幅度也小于其他三种方法。It can be seen from Fig. 6 to Fig. 9 that these four prediction methods can better predict the change of power load in the distribution station area regardless of the time scale of one day or one week, but the result curve of the prediction method of the present invention fits best For the real power load change curve of the distribution station, the prediction results of the other three have large deviations when the load changes greatly. At the same time, the power load forecasting method proposed by the present invention has the smallest error on the time scale of one day and one week, and the variation range of the error curve is also smaller than the other three methods.

表1不同预测模型精度的评价指标Table 1 Evaluation indicators of accuracy of different prediction models

Table 1 Accuracy evaluation index of different forecast modelsTable 1 Accuracy evaluation index of different forecast models

Figure BDA0003900513900000111
Figure BDA0003900513900000111

由表1可以看出,LSTNet模型在一天时间尺度上的MSE、MAPE、R2_score值分别为12.41、6.46、96.72,MSE和MAPE值小于CNN-LSTM、Bi-LSTM、LSTM模型的对应值,而R2_score值大于CNN-LSTM、Bi-LSTM、LSTM模型的对应值,说明在四种模型中LSTNet模型在一天时间尺度上的预测精度最高、预测效果是最好的。此外,LSTNet模型在一周时间尺度上的MSE、MAPE、R2_score值分别为19.01、9.49、92.08,MSE和MAPE值在四种模型中最小,R2_score值在四种模型中最大,一周时间尺度的模型精度评价指标与一天时间尺度的模型评价指标具有相似的数值关系,说明在四种模型中LSTNet模型在一周时间尺度上同样取得最好的负荷预测效果。It can be seen from Table 1 that the MSE, MAPE, and R2_score values of the LSTNet model on a one-day time scale are 12.41, 6.46, and 96.72, respectively. The MSE and MAPE values are smaller than the corresponding values of the CNN-LSTM, Bi-LSTM, and LSTM models, while R2_score The value is greater than the corresponding value of the CNN-LSTM, Bi-LSTM, and LSTM models, indicating that among the four models, the LSTNet model has the highest prediction accuracy and the best prediction effect on the one-day time scale. In addition, the MSE, MAPE, and R2_score values of the LSTNet model on the one-week time scale are 19.01, 9.49, and 92.08, respectively. The MSE and MAPE values are the smallest among the four models, and the R2_score value is the largest among the four models. The model accuracy of the one-week time scale The evaluation index has a similar numerical relationship with the model evaluation index on the one-day time scale, indicating that among the four models, the LSTNet model also achieves the best load forecasting effect on the one-week time scale.

为验证LSTNet模型中各个组件对预测结果带来的作用,本发明在一天和一周的时间尺度上将LSTNet模型的预测结果与其消融模型的预测结果进行对比分析。以LSTNet模型为基础,去掉线性自回归组件后的模型为LSTNetW/OAR模型,去掉中间层跳跃连接的LSTM组件后的模型为LSTNetW/OSkip模型,去掉线性自回归组件与循环跳跃组件后的模型为基本的LSTM模型。图10、图11、图12、图13分别为LSTNet模型及其消融模型在一天与一周的时间尺度上的预测结果曲线与预测误差曲线。表2为LSTNet模型及其消融模型在一天与一周的时间尺度上的模型精度评价指标。In order to verify the effect of each component in the LSTNet model on the prediction results, the present invention compares and analyzes the prediction results of the LSTNet model and its ablation model on the time scale of one day and one week. Based on the LSTNet model, the model after removing the linear autoregressive component is the LSTNetW/OAR model, the model after removing the LSTM component of the intermediate layer skip connection is the LSTNetW/OSkip model, and the model after removing the linear autoregressive component and the loop skip component is Basic LSTM model. Figure 10, Figure 11, Figure 12, and Figure 13 are the prediction result curves and prediction error curves of the LSTNet model and its ablation model on the time scale of one day and one week, respectively. Table 2 shows the model accuracy evaluation indicators of the LSTNet model and its ablation model on the time scale of one day and one week.

由图10、图11可以看出,LSTNet模型在一天的时间尺度上得到了最好的预测效果,其次是LSTNetW/OAR与LSTNetW/OSkip消融模型,最后是LSTM模型,体现了自回归组件与循环跳跃组件对提高预测精度的重要作用。此外,融合有线性自回归组件的LSTNet与LSTNetW/OSkip模型在数据变化极端时,具有较好的表现,体现了线性自回归组件具有缓解神经网络对数据的极端值不敏感问题的作用。It can be seen from Figure 10 and Figure 11 that the LSTNet model has the best prediction effect on the time scale of one day, followed by the LSTNetW/OAR and LSTNetW/OSkip ablation models, and finally the LSTM model, which embodies the autoregressive component and loop The important role of skipping components in improving prediction accuracy. In addition, the LSTNet and LSTNetW/OSkip models integrated with linear autoregressive components have better performance when the data changes are extreme, which reflects the role of linear autoregressive components in alleviating the insensitivity of neural networks to extreme values of data.

由图12、图13可以看出,在一周的时间尺度上LSTNet模型仍然获得了最佳预测效果,相较于LSTNetW/OSkip消融模型与LSTM模型,LSTNet模型与LSTNetW/OAR模型的预测精度有较大的提高,体现了在较大时间尺度上,循环跳跃组件对提高预测精度具有可观的效果。It can be seen from Figure 12 and Figure 13 that the LSTNet model still obtains the best prediction effect on the one-week time scale. Compared with the LSTNetW/OSkip ablation model and the LSTM model, the prediction accuracy of the LSTNet model and the LSTNetW/OAR model is higher. The large improvement reflects that on a large time scale, the loop jumping component has a considerable effect on improving the prediction accuracy.

表2 LSTNet及其消融模型精度的评价指标Table 2 Evaluation indicators of LSTNet and its ablation model accuracy

Table 2 Accuracy evaluation index of LSTNet ablation experimentTable 2 Accuracy evaluation index of LSTNet ablation experiment

Figure BDA0003900513900000121
Figure BDA0003900513900000121

由表2可以看出,LSTNetW/OAR模型在一天时间尺度上的MSE、MAPE、R2_score值分别为19.92、9.95、91.55,LSTNetW/OSkip模型在一天时间尺度上的MSE、MAPE、R2_score值分别为21.27、11.31、90.37。LSTNetW/OAR和LSTNetW/OSkip模型的MSE、MAPE值均大于LSTNet模型的对应值,却都小于LSTM模型的对应值,同时LSTNetW/OAR和LSTNetW/OSkip模型的R2_score值均小于LSTNet模型的对应值,却都大于LSTM模型的对应值,说明循环跳跃组件和线性自回归组件在提高模型预测精度上的显著效果。It can be seen from Table 2 that the MSE, MAPE, and R2_score values of the LSTNetW/OAR model on the one-day time scale are 19.92, 9.95, and 91.55, respectively, and the MSE, MAPE, and R2_score values of the LSTNetW/OSkip model on the one-day time scale are 21.27, respectively. , 11.31, 90.37. The MSE and MAPE values of the LSTNetW/OAR and LSTNetW/OSkip models are larger than the corresponding values of the LSTNet model, but smaller than the corresponding values of the LSTM model. At the same time, the R2_score values of the LSTNetW/OAR and LSTNetW/OSkip models are smaller than the corresponding values of the LSTNet model. However, they are all greater than the corresponding values of the LSTM model, indicating that the loop jump component and the linear autoregressive component have a significant effect on improving the prediction accuracy of the model.

综上所述,相较于以往LSTM、双向长短时记忆神经网络Bi-LSTM和CNN-LSTM的预测模型,LSTNet模型在短期负荷预测方面更具优势、预测精度更高。In summary, compared with the previous prediction models of LSTM, Bi-LSTM and CNN-LSTM, the LSTNet model has more advantages and higher prediction accuracy in short-term load forecasting.

在本说明书中,对本发明的示意性表述不是必须针对的是相同的实施例或示例,本领域的技术人员可以将本说明书中描述的不同实施例或示例进行结合和组合。此外,本说明书实施例所述的内容仅仅是对发明构思的实现形式的列举,本发明的保护范围不应当被视为仅限于实施案例所陈述的具体形式,本发明的保护范围也包括本领域技术人员根据本发明构思所能够想到的等同技术手段。In this specification, the schematic representations of the present invention are not necessarily aimed at the same embodiment or example, and those skilled in the art can combine and combine different embodiments or examples described in this specification. In addition, the content described in the embodiments of this specification is only an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms stated in the implementation cases. The protection scope of the present invention also includes Equivalent technical means that the skilled person can think of based on the concept of the present invention.

Claims (4)

1.一种适用于配电台区的短期电力负荷预测方法,其特征在于,所述方法包括以下步骤:1. A short-term electric load forecasting method applicable to power distribution station area, is characterized in that, described method comprises the following steps: S1:构建卷积神经网络CNN和长短时记忆神经网络LSTM,用来提取负荷数据间的局部依赖关系和负荷数据长期变化趋势;S1: Construct a convolutional neural network CNN and a long-short-term memory neural network LSTM to extract the local dependencies between load data and the long-term change trend of load data; S2:基于步骤S1,建立LSTNet负荷预测模型,融合传统自回归模型解决神经网络对负荷数据极端值的不敏感问题,将配电台区的电力负荷数据用于网络的训练和预测过程;S2: Based on step S1, establish the LSTNet load forecasting model, integrate the traditional autoregressive model to solve the insensitivity of the neural network to the extreme value of the load data, and use the power load data of the distribution station area for the training and forecasting process of the network; S3:通过步骤S2建立的预测模型对电力负荷的短期变化趋势进行预测,并与LSTM、双向长短时记忆神经网Bi-LSTM和CNN-LSTM模型进行对比分析,验证LSTNet模型在短期负荷预测方面更具优势、预测精度更高。S3: Use the forecasting model established in step S2 to predict the short-term change trend of electric load, and compare and analyze it with LSTM, bidirectional long-short-term memory neural network Bi-LSTM and CNN-LSTM models to verify that the LSTNet model is better in short-term load forecasting It has advantages and higher prediction accuracy. 2.如权利要求1所述的一种适用于配电台区的短期电力负荷预测方法,其特征在于,所述步骤S1中,具体步骤以下:2. A kind of short-term power load forecasting method suitable for distribution station areas as claimed in claim 1, characterized in that, in the step S1, the specific steps are as follows: S1-1:卷积神经网络CNN采用一个不加池化层的全零填充的一维CNN,用于提取原始数据的抽象特征;假设输入的时间序列数据有a行b列,卷积核为m行n列;由于卷积核只在一个维度上滑动,且卷积核包含所有特征向量,所以卷积核宽度必须与输入时间序列数据的宽度一致,即n=b,则第i个卷积核ci作用在输入矩阵X上可表示为:S1-1: Convolutional neural network CNN uses a zero-filled one-dimensional CNN without pooling layer to extract the abstract features of the original data; suppose the input time series data has a row and b column, and the convolution kernel is m rows and n columns; since the convolution kernel only slides in one dimension, and the convolution kernel contains all feature vectors, the width of the convolution kernel must be consistent with the width of the input time series data, that is, n=b, then the i-th volume The product kernel ci acting on the input matrix X can be expressed as: ai=ci*X+bi (1)a i =c i *X+b i (1) 式中,*表示卷积运算,bi为卷积偏置项;In the formula, * represents the convolution operation, and bi is the convolution bias item; S1-2:LSTM的核心是门控单元,包括:遗忘门、更新门和输出门;其中,遗忘门选择性的遗忘部分历史数据,更新门将当前保留信息与历史遗留数据进行信息融合,输出门衡量当前状态对隐含层的影响;LSTM的计算过程如下:S1-2: The core of LSTM is the gating unit, including: forget gate, update gate and output gate; among them, the forget gate selectively forgets part of the historical data, the update gate fuses the current retained information with the historical legacy data, and the output gate Measure the impact of the current state on the hidden layer; the calculation process of LSTM is as follows:
Figure FDA0003900513890000011
Figure FDA0003900513890000011
Figure FDA0003900513890000012
Figure FDA0003900513890000012
Figure FDA0003900513890000013
Figure FDA0003900513890000013
Figure FDA0003900513890000014
Figure FDA0003900513890000014
Figure FDA0003900513890000015
Figure FDA0003900513890000015
Figure FDA0003900513890000016
Figure FDA0003900513890000016
式中,
Figure FDA0003900513890000021
ct分别为t时刻更新门、遗忘门、输出门和记忆细胞的状态,Wu、Wn、Wo、Wc和bu、bn、bo、bc分别为对应的权值矩阵和偏置项,σ、tanh代表激活函数;
In the formula,
Figure FDA0003900513890000021
c t is the state of update gate, forget gate, output gate and memory cell at time t respectively, Wu u , W n , W o , W c and b u , b n , b o , b c are the corresponding weight matrix And the bias term, σ, tanh represent the activation function;
σ=1/(1+e-x) (8)σ=1/(1+e -x ) (8) tanh=(ex-e-x)/(ex+e-x) (9)。tanh=(e x -e -x )/(e x +e -x ) (9).
3.如权利要求2所述的一种适用于配电台区的短期电力负荷预测方法,其特征在于,所述步骤S2,具体步骤如下:3. A kind of short-term power load forecasting method suitable for distribution station area as claimed in claim 2, it is characterized in that, described step S2, concrete steps are as follows: S2-1:采用最值归一化对数据进行预处理,其公式如下:S2-1: Use the most value normalization to preprocess the data, the formula is as follows: xscale=(x-xmin)/(xmax-xmin) (10)x scale =(xx min )/(x max -x min ) (10) 式中,x是实测数据,xmin、xmax为实测数据的最小值、最大值;In the formula, x is the measured data, and x min and x max are the minimum and maximum values of the measured data; S2-2:LSTNet模型由线性部分和非线性部分组成,线性部分包含时间序列数据中的周期性分量,非线性部分关注时间序列数据的局部极端情况;S2-2: The LSTNet model consists of a linear part and a nonlinear part. The linear part contains the periodic components in the time series data, and the nonlinear part focuses on the local extreme cases of the time series data; 非线性部分的第一层是一个不加池化层的全零填充的一维CNN,并使用ReLU激活函数激活,则第i个卷积核ci作用在输入矩阵X上表示为:The first layer of the nonlinear part is an all-zero-filled one-dimensional CNN without a pooling layer, and is activated using the ReLU activation function. Then the i-th convolution kernel c i acts on the input matrix X and is expressed as: ai=ReLU(ci*X+bi) (11)a i =ReLU(c i *X+b i ) (11) 式中,ReLU(x)=max(0,x),*表示卷积运算,bi为卷积偏置项;In the formula, ReLU(x)=max(0,x), * indicates the convolution operation, and b i is the convolution bias item; 为解决LSTM在处理超长序列数据时出现的梯度消失问题,在LSTNet模型中加入了时间跳跃连接的LSTM网络组件,该组件利用到了电力负荷的周期特性,然后将卷积的输出结果分别输入到LSTM组件与跳跃连接的LSTM组件中,具体的更新过程如下:In order to solve the gradient disappearance problem of LSTM when processing ultra-long sequence data, the LSTM network component of time skip connection is added to the LSTNet model. In the LSTM component connected to the LSTM component and the jump, the specific update process is as follows:
Figure FDA0003900513890000022
Figure FDA0003900513890000022
Figure FDA0003900513890000023
Figure FDA0003900513890000023
Figure FDA0003900513890000024
Figure FDA0003900513890000024
Figure FDA0003900513890000025
Figure FDA0003900513890000025
Figure FDA0003900513890000026
Figure FDA0003900513890000026
Figure FDA0003900513890000027
Figure FDA0003900513890000027
在非线性部分的最后,使用一个全连接层来组合二者的输出;全连接层的输入是t时刻LSTM组件的隐态
Figure FDA0003900513890000028
和t-p+1时刻到t时刻跳过的隐态
Figure FDA0003900513890000029
的加权组合,全连接层的输出可表示为:
At the end of the nonlinear part, a fully connected layer is used to combine the outputs of the two; the input of the fully connected layer is the hidden state of the LSTM component at time t
Figure FDA0003900513890000028
and the hidden state skipped from time t-p+1 to time t
Figure FDA0003900513890000029
The weighted combination of , the output of the fully connected layer can be expressed as:
Figure FDA0003900513890000031
Figure FDA0003900513890000031
式中,
Figure FDA0003900513890000032
为非线性部分的输出,WLSTM
Figure FDA0003900513890000033
为权重,bD为偏置项;
In the formula,
Figure FDA0003900513890000032
is the output of the nonlinear part, W LSTM and
Figure FDA0003900513890000033
is the weight, b D is the bias term;
由于CNN和LSTM的非线性性质,导致神经网络对输入数据的极端值不敏感,这将对模型的预测精度产生较大影响;因此在LSTNet模型中加入了线性回归部分,线性回归部分由自回归模型组成,其过程如下:Due to the nonlinear nature of CNN and LSTM, the neural network is not sensitive to the extreme value of the input data, which will have a great impact on the prediction accuracy of the model; therefore, a linear regression part is added to the LSTNet model, and the linear regression part is composed of autoregressive The model is composed, and its process is as follows:
Figure FDA0003900513890000034
Figure FDA0003900513890000034
式中,
Figure FDA0003900513890000035
与xt-i表示线性部分的输出与输入,Wi与bL分别表示权重与偏置,n为输入窗口的大小;
In the formula,
Figure FDA0003900513890000035
and x ti represent the output and input of the linear part, W i and b L represent the weight and bias respectively, and n is the size of the input window;
LSTNet模型的输出为线性和非线性输出结果相加后再经过Sigmoid激活函数后得到的结果yt,由下式表示:The output of the LSTNet model is the result y t obtained after adding the linear and nonlinear output results and then passing through the Sigmoid activation function, which is expressed by the following formula:
Figure FDA0003900513890000036
Figure FDA0003900513890000036
S2-3:采用均方根误差RMSE、平均绝对百分比误差MAPE和R2_score作为LSTNet预测模型的评价指标,计算公式如下:S2-3: Root mean square error RMSE, mean absolute percentage error MAPE and R2_score are used as the evaluation indicators of the LSTNet prediction model, and the calculation formula is as follows:
Figure FDA0003900513890000037
Figure FDA0003900513890000037
Figure FDA0003900513890000038
Figure FDA0003900513890000038
Figure FDA0003900513890000039
Figure FDA0003900513890000039
其中,
Figure FDA00039005138900000310
表示模型的预测值,yi为真实值,
Figure FDA00039005138900000311
为真实值的平均值
Figure FDA00039005138900000312
in,
Figure FDA00039005138900000310
Indicates the predicted value of the model, y i is the real value,
Figure FDA00039005138900000311
is the average of the true values
Figure FDA00039005138900000312
4.如权利要求3所述的一种适用于配电台区的短期电力负荷预测方法,其特征在于,所述步骤S3具体步骤如下:4. A kind of short-term power load forecasting method suitable for distribution station area as claimed in claim 3, it is characterized in that, the specific steps of described step S3 are as follows: S3-1:采用一个公共变压器上记录的负荷数据,即配电台区的电力负荷数据;S3-1: Use the load data recorded on a public transformer, that is, the power load data in the distribution station area; S3-2:搭建LSTM、Bi-LSTM、CNN-LSTM预测模型,与LSTNet模型对比,并使用了S3-1中的数据集,进行训练;S3-2: Build LSTM, Bi-LSTM, CNN-LSTM prediction models, compare with the LSTNet model, and use the data set in S3-1 for training; S3-3:在一天和一周的时间尺度上将LSTNet模型的预测结果与其消融模型的预测结果进行对比分析;以LSTNet模型为基础,去掉线性自回归组件后的模型为LSTNetW/OAR模型,去掉中间层跳跃连接的LSTM组件后的模型为LSTNetW/OSkip模型,去掉线性自回归组件与循环跳跃组件后的模型为基本的LSTM模型。S3-3: Compare and analyze the prediction results of the LSTNet model and the prediction results of the ablation model on the time scale of one day and one week; based on the LSTNet model, the model after removing the linear autoregressive component is the LSTNetW/OAR model, removing the middle The model after the LSTM component of the layer skip connection is the LSTNetW/OSkip model, and the model after removing the linear autoregressive component and the loop skip component is the basic LSTM model.
CN202211288727.5A 2022-10-20 2022-10-20 Short-term power load prediction method suitable for power distribution station area Pending CN115688993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211288727.5A CN115688993A (en) 2022-10-20 2022-10-20 Short-term power load prediction method suitable for power distribution station area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211288727.5A CN115688993A (en) 2022-10-20 2022-10-20 Short-term power load prediction method suitable for power distribution station area

Publications (1)

Publication Number Publication Date
CN115688993A true CN115688993A (en) 2023-02-03

Family

ID=85066220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211288727.5A Pending CN115688993A (en) 2022-10-20 2022-10-20 Short-term power load prediction method suitable for power distribution station area

Country Status (1)

Country Link
CN (1) CN115688993A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115860270A (en) * 2023-02-21 2023-03-28 保定博堃元信息科技有限公司 Network supply load prediction system and method based on LSTM neural network
CN116544931A (en) * 2023-06-27 2023-08-04 北京理工大学 Electric Load Distribution Prediction Method Based on Integrated Fragment Transform and Temporal Convolutional Network
CN117439101A (en) * 2023-12-21 2024-01-23 武汉市豪迈电力自动化技术有限责任公司 An intelligent network for the interaction between new energy sources and flexible loads in the power grid
CN117952283A (en) * 2024-03-27 2024-04-30 国网山东省电力公司滨州市滨城区供电公司 Short-term load prediction method, system, terminal and medium based on membership degree
CN119582208A (en) * 2025-02-06 2025-03-07 国网浙江省电力有限公司温州供电公司 A method and system for predicting power load

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114595874A (en) * 2022-02-24 2022-06-07 武汉大学 Ultra-short-term power load prediction method based on dynamic neural network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114595874A (en) * 2022-02-24 2022-06-07 武汉大学 Ultra-short-term power load prediction method based on dynamic neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
顾吉鹏 等: "基于LSTNet模型的配电台区短期电力负荷预测研究", 《电气传动》, 29 September 2022 (2022-09-29), pages 1 - 9 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115860270A (en) * 2023-02-21 2023-03-28 保定博堃元信息科技有限公司 Network supply load prediction system and method based on LSTM neural network
CN116544931A (en) * 2023-06-27 2023-08-04 北京理工大学 Electric Load Distribution Prediction Method Based on Integrated Fragment Transform and Temporal Convolutional Network
CN116544931B (en) * 2023-06-27 2023-12-01 北京理工大学 Electric power load distribution prediction method based on integrated segment transformation and temporal convolutional network
CN117439101A (en) * 2023-12-21 2024-01-23 武汉市豪迈电力自动化技术有限责任公司 An intelligent network for the interaction between new energy sources and flexible loads in the power grid
CN117439101B (en) * 2023-12-21 2024-06-04 武汉市豪迈电力自动化技术有限责任公司 An intelligent network for interaction between new energy and flexible loads in power grid
CN117952283A (en) * 2024-03-27 2024-04-30 国网山东省电力公司滨州市滨城区供电公司 Short-term load prediction method, system, terminal and medium based on membership degree
CN119582208A (en) * 2025-02-06 2025-03-07 国网浙江省电力有限公司温州供电公司 A method and system for predicting power load

Similar Documents

Publication Publication Date Title
CN115688993A (en) Short-term power load prediction method suitable for power distribution station area
CN111695731B (en) Load forecasting method, system and equipment based on multi-source data and hybrid neural network
CN113554466B (en) Short-term electricity consumption prediction model construction method, prediction method and device
CN111680841B (en) Short-term load prediction method, system and terminal equipment based on principal component analysis
CN108280551A (en) A kind of photovoltaic power generation power prediction method using shot and long term memory network
CN115660161A (en) Medium-term and small-term load probability prediction method based on time sequence fusion Transformer model
CN107292098A (en) Medium-and Long-Term Runoff Forecasting method based on early stage meteorological factor and data mining technology
CN116167527B (en) Pure data-driven power system static safety operation risk online assessment method
CN108761377A (en) A kind of electric energy metering device method for detecting abnormality based on long memory models in short-term
Ullah et al. Deep Learning‐Assisted Short‐Term Power Load Forecasting Using Deep Convolutional LSTM and Stacked GRU
CN114638425B (en) Historical data-based large-user monthly electricity consumption prediction method and system
CN116703644A (en) A short-term power load forecasting method based on Attention-RNN
CN113837434A (en) Solar photovoltaic power generation prediction method and device, electronic equipment and storage medium
CN114519471A (en) Electric load prediction method based on time sequence data periodicity
Wang et al. Load forecasting method based on CNN and extended LSTM
CN116011312A (en) A Method for Predicting Bridge Strain and Stress Data Based on Multiple Models
CN118137492A (en) Short-term power load prediction method and system
CN115238854A (en) Short-term load prediction method based on TCN-LSTM-AM
CN116885699A (en) Electric power load forecasting method based on dual attention mechanism
CN119134298A (en) Power load forecasting method based on improved Transformer algorithm
Chen et al. A spatial transfer-based hybrid model for wind speed forecasting
CN112529268A (en) Medium-short term load prediction method and device based on manifold learning
CN117575337A (en) Prophet model and LSTM model-based power distribution network line peak load prediction method
Wang et al. The unemployment rate forecast model basing on bp neural network
Chen et al. Short-Term Load Forecasting Model Based on ICCEEMDAN-MRMR and CNN-SVM

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载