[go: up one dir, main page]

CN110929989B - N-1 safety checking method with uncertainty based on deep learning - Google Patents

N-1 safety checking method with uncertainty based on deep learning Download PDF

Info

Publication number
CN110929989B
CN110929989B CN201911040124.1A CN201911040124A CN110929989B CN 110929989 B CN110929989 B CN 110929989B CN 201911040124 A CN201911040124 A CN 201911040124A CN 110929989 B CN110929989 B CN 110929989B
Authority
CN
China
Prior art keywords
branch
power flow
neural network
deep neural
power
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911040124.1A
Other languages
Chinese (zh)
Other versions
CN110929989A (en
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.)
Chongqing University
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
Original Assignee
Chongqing University
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
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 Chongqing University, Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd, State Grid Corp of China SGCC filed Critical Chongqing University
Priority to CN201911040124.1A priority Critical patent/CN110929989B/en
Publication of CN110929989A publication Critical patent/CN110929989A/en
Application granted granted Critical
Publication of CN110929989B publication Critical patent/CN110929989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • 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

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Tourism & Hospitality (AREA)
  • Data Mining & Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Marketing (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Operations Research (AREA)
  • Public Health (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

本发明公开了基于深度学习的含不确定性N‑1安全校核方法,主要步骤为:1)获取电力网络数据,并建立输入特征向量集Xin;2)对特征向量进行预处理,并划分为训练集和验证集;3)建立的深度神经网络直流潮流模型;4)利用训练集和验证集对深度神经网络直流潮流模型进行训练;5)以电力网络实时数据建立测试集,并输入到训练后的深度神经网络直流潮流模型中,得到潮流输出特征向量Yout;6)对输出特征向量Yout=[θi,Pij]进行安全性验证。本发明可广泛应用于不确定性场景的N‑1安全校核在线分析,能够获得与传统直流潮流求解方法获得不相上下的校核精度,并提高近百倍的分析速度。

Figure 201911040124

The present invention discloses an uncertainty-containing N-1 security verification method based on deep learning, the main steps of which are: 1) acquiring power network data, and establishing an input feature vector set X in ; 2) preprocessing the feature vectors, and Divided into training set and verification set; 3) Established deep neural network DC power flow model; 4) Using the training set and verification set to train the deep neural network DC power flow model; 5) Establishing a test set with real-time data of the power network, and inputting Into the trained deep neural network DC power flow model, the power flow output feature vector Y out is obtained; 6) Safety verification is performed on the output feature vector Y out =[θ i ,P ij ]. The present invention can be widely applied to online analysis of N-1 security check in uncertain scene, can obtain check accuracy comparable to traditional DC power flow solution method, and improve analysis speed by nearly a hundred times.

Figure 201911040124

Description

基于深度学习的含不确定性N-1安全校核方法N-1 safety verification method with uncertainty based on deep learning

技术领域Technical Field

本发明涉及电力系统及其自动化领域,具体是基于深度学习的含不确定性N-1安全校核方法。The present invention relates to the field of power systems and automation thereof, and in particular to an N-1 safety verification method containing uncertainty based on deep learning.

背景技术Background Art

电力系统本质上运行在不确定的环境当中。N-1安全校核是保证系统安全的重要分析工具。近年来,由于光伏、风电等可再生能源渗透率越来越高,而风光等新能源具有随机性、间歇性,其大规模接入给电力系统带来了更多不确定性。为应对日益增长的不确定性对电力系统运行的影响,N-1安全校核除计及支路开断外还需考虑新能源波动等不确定性场景,这导致N-1安全校核面临新的计算挑战。The power system essentially operates in an uncertain environment. N-1 safety verification is an important analytical tool to ensure system safety. In recent years, due to the increasing penetration of renewable energy such as photovoltaics and wind power, and the randomness and intermittency of new energy such as wind and solar, their large-scale access has brought more uncertainty to the power system. In order to cope with the impact of growing uncertainty on the operation of the power system, in addition to taking into account branch circuit breaking, N-1 safety verification also needs to consider uncertain scenarios such as new energy fluctuations, which leads to new computational challenges for N-1 safety verification.

目前,N-1安全校核一般采用直流潮流模型计算。直流潮流模型很好避免了避免交流潮流模型带来的计算不收敛和增加经济调度、机组组合等模型的复杂度等问题,但对于需要考虑新能源不确定性场景的N-1安全校核,假设需要考虑M个风电场,且每个风电场拥有10个不确定性场景,那么N-1安全校核需要进行N×10M次潮流计算,其计算负担较传统N-1安全校核将呈指数增长。因此,学者一直在寻求改进方法以提高N-1安全校核的速度。At present, N-1 safety verification generally adopts DC power flow model calculation. The DC power flow model avoids the problems of non-convergence of calculations caused by AC power flow model and increases the complexity of economic dispatch, unit combination and other models. However, for N-1 safety verification that needs to consider the uncertainty of new energy scenarios, assuming that M wind farms need to be considered, and each wind farm has 10 uncertainty scenarios, then N-1 safety verification needs to perform N×10M power flow calculations, and its calculation burden will increase exponentially compared with traditional N-1 safety verification. Therefore, scholars have been seeking improved methods to increase the speed of N-1 safety verification.

目前针对加快N-1安全校核速度的研究主要通过模型推导的方式进行场景缩减。一些研究通过建立优化模型削减场景数目,主要包括建立混合整数线性规划与两级规划模型、通过三级过滤方法减少校核场景数、利用迭代边界与连续修剪的方法进行场景缩减以及利用GPU加速电网连通性判断等。在考虑新能源不确定性、电力系统多时段问题等情况下,虽然采用上述方法能有效缩减场景数、加快单个场景的校核速度,但N-1安全分析需要校核的场景数依然庞大,其计算效率仍需进一步提升。综上所述,亟需研究一种高效的N-1安全校核方法。At present, the research on accelerating the speed of N-1 safety verification mainly reduces the scenarios by model derivation. Some studies reduce the number of scenarios by establishing optimization models, mainly including establishing mixed integer linear programming and two-level programming models, reducing the number of verification scenarios by three-level filtering methods, using iterative boundaries and continuous pruning methods to reduce scenarios, and using GPU to accelerate grid connectivity judgment. Considering the uncertainty of new energy and multi-period problems of power systems, although the above methods can effectively reduce the number of scenarios and speed up the verification of a single scenario, the number of scenarios that need to be verified in N-1 safety analysis is still huge, and its computational efficiency still needs to be further improved. In summary, it is urgent to study an efficient N-1 safety verification method.

发明内容Summary of the invention

本发明的目的是解决现有技术中存在的问题。The purpose of the present invention is to solve the problems existing in the prior art.

为实现本发明目的而采用的技术方案是这样的,基于深度学习的含不确定性N-1安全校核方法,主要包括以下步骤:The technical solution adopted to achieve the purpose of the present invention is as follows: a deep learning-based N-1 safety verification method with uncertainty mainly includes the following steps:

1)获取电力网络数据,并建立输入特征向量集Xin1) Obtain power network data and establish an input feature vector set Xin .

进一步,所述电力网络数据包括电力网络拓扑结构和各节点源荷数据。Furthermore, the power network data includes the power network topology structure and source load data of each node.

进一步,输入特征向量集Xin=[Pi,△Pij]和输出特征向量Yout=[θi,Pij]。其中,Pi为连续特征向量,表示新能源节点注入有功功率总和。θi为节点相角,Pij为各支路的有功潮流。△Pij为离散特征向量,表示支路开断前后各支路的有功功率之差。Furthermore, the input feature vector set Xin = [P i , △P ij ] and the output feature vector Y out = [θ i ,P ij ]. Wherein, Pi is a continuous feature vector, which represents the total active power injected by the new energy node. θ i is the node phase angle, and Pij is the active power flow of each branch. △P ij is a discrete feature vector, which represents the difference in active power of each branch before and after the branch is disconnected.

支路开断前后各支路的有功功率之差△Pij如下所示:The difference in active power of each branch before and after the branch is disconnected △P ij is as follows:

Figure SMS_1
Figure SMS_1

式中,

Figure SMS_2
为支路开断前各支路有功功率。
Figure SMS_3
为支路开断后各支路有功功率。支路开断前后各支路的有功功率之差△Pij的维度为nbranch。nbranch为系统支路数。In the formula,
Figure SMS_2
It is the active power of each branch before the branch is disconnected.
Figure SMS_3
is the active power of each branch after the branch is disconnected. The dimension of the difference △P ij between the active power of each branch before and after the branch is disconnected is n branch . n branch is the number of system branches.

2)对特征向量进行预处理,并划分为训练集和验证集。2) Preprocess the feature vector and divide it into training set and validation set.

数据预处理方法为化归一化。The data preprocessing method is normalization.

归一化公式如下:The normalization formula is as follows:

Figure SMS_4
Figure SMS_4

式中,xμ为样本均值,xδ为样本标准差。x为输入样本,即特征向量。x*为归一化后的数据。数据x*均值为0,方差为1。In the formula, x μ is the sample mean, x δ is the sample standard deviation. x is the input sample, i.e., the eigenvector. x* is the normalized data. The mean of data x* is 0 and the variance is 1.

3)建立的深度神经网络直流潮流模型。3) Established deep neural network DC power flow model.

深度神经网络直流潮流模型如下所示:The deep neural network DC power flow model is shown below:

Figure SMS_5
Figure SMS_5

式中,

Figure SMS_6
为第l层神经元的前馈传递函数。l=1,2,…,n,n为神经网络层数。θ={W,b}为深度神经网络待优化参数。In the formula,
Figure SMS_6
is the feedforward transfer function of the lth layer of neurons. l=1,2,…,n, n is the number of neural network layers. θ={W,b} is the parameter to be optimized for the deep neural network.

第l层神经元的前馈传递函数

Figure SMS_7
如下所示:The feedforward transfer function of the l-th layer of neurons
Figure SMS_7
As shown below:

Figure SMS_8
Figure SMS_8

式中,Xl-1为第l层神经元的输入。Wl和bl为第l层神经元与第l-1层神经元间的权重矩阵和偏移向量。s为激活函数。Where Xl -1 is the input of the lth layer of neurons. Wl and bl are the weight matrix and offset vector between the lth layer of neurons and the l-1th layer of neurons. s is the activation function.

激活函数s如下所示:The activation function s is as follows:

Figure SMS_9
Figure SMS_9

4)利用训练集和验证集对深度神经网络直流潮流模型进行训练。4) Use the training set and validation set to train the deep neural network DC power flow model.

对深度神经网络直流潮流模型进行训练的主要步骤如下:The main steps for training a deep neural network DC power flow model are as follows:

4.1)将训练集输入到深度神经网络直流潮流模型中。4.1) Input the training set into the deep neural network DC power flow model.

4.2)随机初始化深度神经网络直流潮流模型待优化参数θ。4.2) Randomly initialize the parameters θ to be optimized in the deep neural network DC power flow model.

4.3)利用RMSProp算法对深度神经网络参数进行第t次更新,即:4.3) Use the RMSProp algorithm to update the deep neural network parameters for the tth time, that is:

Figure SMS_10
Figure SMS_10

式中,η为学习率。ε为常数。r为累积平方梯度。▽θL为均方差损失函数对θ的偏导。ρ为衰减速率。t为迭代次数。t初始值为1。Where η is the learning rate. ε is a constant. r is the cumulative squared gradient. ▽θL is the partial derivative of the mean square error loss function with respect to θ. ρ is the decay rate. t is the number of iterations. The initial value of t is 1.

4.4)将验证集输入到深度神经网络直流潮流模型中,判断验证集的测试精度是否下降,若是,则停止迭代,若否,则判断迭代次数t>tmax是否成立,若是,则停止迭代,若否,则返回步骤2。tmax为最大迭代次数。4.4) Input the validation set into the deep neural network DC power flow model to determine whether the test accuracy of the validation set decreases. If so, stop the iteration. If not, determine whether the number of iterations t>t max is true. If so, stop the iteration. If not, return to step 2. t max is the maximum number of iterations.

5)以电力网络实时数据建立测试集,并输入到训练后的深度神经网络直流潮流模型中,得到潮流输出特征向量Yout5) A test set is established with real-time data of the power network and input into the trained deep neural network DC power flow model to obtain the power flow output feature vector Y out .

6)对输出特征向量Yout=[θi,Pij]进行安全性验证。6) Perform security verification on the output feature vector Y out =[θ i ,P ij ].

对输出特征向量Yout=[θi,Pij]进行安全性验证的方法为:判断支路的有功潮流Pij>Pmax是否成立,若成立,则判断支路ij过载,若不成立,则支路ij处于安全状态。The method for verifying the safety of the output characteristic vector Y out =[θ i ,P ij ] is: judging whether the active power flow P ij >P max of the branch holds, if so, judging that the branch ij is overloaded, if not, the branch ij is in a safe state.

本发明的技术效果是毋庸置疑的。本发明设计的特征向量能够有效涵盖N-1安全校核所具备的新能源、负荷连续型变化特征及拓扑结构变化特征。经样本训练后得到的直流潮流模型能够有效的来挖掘直流潮流方程输入输出间的复杂特征,可以直接对所有待校核的不确定场景进行潮流计算,为过载线路的确定以及运行方案的安全设计提供了技术支撑。The technical effect of the present invention is unquestionable. The characteristic vector designed by the present invention can effectively cover the new energy, continuous load change characteristics and topological structure change characteristics possessed by N-1 safety verification. The DC power flow model obtained after sample training can effectively mine the complex characteristics between the input and output of the DC power flow equation, and can directly perform power flow calculations on all uncertain scenarios to be verified, providing technical support for the determination of overloaded lines and the safe design of operation plans.

本发明设计的适用于N-1安全校核的深度学习策略,从数据预处理方法、激活函数出发,采用z-score标准化方法来对潮流样本进行归一化预处理,结合ReLU激活函数与线性函数作为深度神经网络的激活函数以有效提取潮流特征,选择RMSProp学习算法就可以对深度神经网络直流潮流模型进行训练,有效地实现了最优参数θ的获取。The deep learning strategy designed by the present invention is suitable for N-1 safety verification. Starting from the data preprocessing method and activation function, the z-score standardization method is used to normalize the power flow samples, and the ReLU activation function and the linear function are combined as the activation function of the deep neural network to effectively extract the power flow characteristics. The RMSProp learning algorithm is selected to train the deep neural network DC power flow model, which effectively realizes the acquisition of the optimal parameter θ.

本发明可广泛应用于不确定性场景的N-1安全校核在线分析,能够获得与传统直流潮流求解方法获得不相上下的校核精度,并提高近百倍的分析速度。The present invention can be widely used in online analysis of N-1 safety verification in uncertain scenarios, can obtain verification accuracy comparable to that of traditional DC power flow solution methods, and improve the analysis speed by nearly 100 times.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为基于深度神经网络的直流潮流模型;Figure 1 is a DC power flow model based on a deep neural network;

图2为M1、M2、M3在算例1中的收敛速度对比;Figure 2 is a comparison of the convergence speeds of M1, M2, and M3 in Example 1;

图3为M1与M3在算例2中的收敛速度对比;Figure 3 is a comparison of the convergence speeds of M1 and M3 in Example 2;

图4为M1与M5在算例1中的损失函数下降过程;Figure 4 shows the loss function descent process of M1 and M5 in Example 1;

图5为M1与M5在算例2中的损失函数下降过程。Figure 5 shows the loss function descent process of M1 and M5 in Example 2.

具体实施方式DETAILED DESCRIPTION

下面结合实施例对本发明作进一步说明,但不应该理解为本发明上述主题范围仅限于下述实施例。在不脱离本发明上述技术思想的情况下,根据本领域普通技术知识和惯用手段,做出各种替换和变更,均应包括在本发明的保护范围内。The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.

实施例1:Embodiment 1:

参见图1,基于深度学习的含不确定性N-1安全校核方法,主要包括以下步骤:Referring to FIG1 , the N-1 safety verification method with uncertainty based on deep learning mainly includes the following steps:

1)获取电力网络数据,并建立输入特征向量集Xin1) Obtain power network data and establish an input feature vector set Xin .

进一步,所述电力网络数据包括电力网络拓扑结构和各节点源荷数据。Furthermore, the power network data includes the power network topology structure and source load data of each node.

进一步,输入特征向量集Xin=[Pi,△Pij]和输出特征向量Yout=[θi,Pij]。其中,Pi为连续特征向量,表示新能源节点注入有功功率总和。θi为节点相角,Pij为各支路的有功潮流。△Pij为离散特征向量,表示支路开断前后各支路的有功功率之差。Furthermore, the input feature vector set Xin = [P i , △P ij ] and the output feature vector Y out = [θ i ,P ij ]. Wherein, Pi is a continuous feature vector, which represents the total active power injected by the new energy node. θ i is the node phase angle, and Pij is the active power flow of each branch. △P ij is a discrete feature vector, which represents the difference in active power of each branch before and after the branch is disconnected.

支路开断前后各支路的有功功率之差△Pij如下所示:The difference in active power of each branch before and after the branch is disconnected △P ij is as follows:

Figure SMS_11
Figure SMS_11

式中,

Figure SMS_12
为支路开断前各支路有功功率。
Figure SMS_13
为支路开断后各支路有功功率。支路开断前后各支路的有功功率之差△Pij的维度为nbranch。nbranch为系统支路数。在计算△Pij时,各节点负荷取为负荷均值,新能源出力取为额定值。该向量的维度为nbranch(其中,nbranch为系统支路数),随系统规模的增大仅线性增长,同时不同拓扑之间各支路的有功功率之差均发生变化,因而不存在拓扑信息被淹没的问题,其值的大小还有效刻画了支路开断对各支路的影响程度,使得该向量有效地涵盖了拓扑结构变化对电力系统潮流的重要影响。In the formula,
Figure SMS_12
It is the active power of each branch before the branch is disconnected.
Figure SMS_13
is the active power of each branch after the branch is disconnected. The dimension of the difference in active power of each branch before and after the branch is disconnected △P ij is n branch . n branch is the number of system branches. When calculating △P ij , the load of each node is taken as the load average, and the output of new energy is taken as the rated value. The dimension of this vector is n branch (where n branch is the number of system branches). It only grows linearly with the increase of system scale. At the same time, the difference in active power of each branch between different topologies changes, so there is no problem of topological information being submerged. The size of its value also effectively describes the degree of influence of branch disconnection on each branch, so that this vector effectively covers the important influence of topological structure changes on power system flow.

值得注意的是,特征向量是深度神经网络进行函数拟合的物质基础。为建立深度神经网络直流潮流模型,使其能够有效提取考虑新能源不确定性场景的N-1安全校核特征,样本的输入特征向量中应涵盖N-1安全校核所具备的新能源、负荷连续型变化性特征及拓扑结构变化特征。It is worth noting that the feature vector is the material basis for deep neural network function fitting. In order to establish a deep neural network DC power flow model that can effectively extract the N-1 safety verification features considering the uncertainty of new energy scenarios, the input feature vector of the sample should include the new energy, load continuous variability characteristics and topological structure change characteristics of the N-1 safety verification.

针对连续型变化特征,本发明选取各连续型变量(新能源、负荷等)的节点注入有功功率总和作为输入特征向量。节点注入功率能有效反应新能源与负荷的波动,并且其维度仅为系统节点数。In view of the continuous change characteristics, the present invention selects the sum of the node injected active power of each continuous variable (new energy, load, etc.) as the input feature vector. The node injected power can effectively reflect the fluctuation of new energy and load, and its dimension is only the number of system nodes.

针对离散型变化特征,表示拓扑结构的常规方法包括导纳矩阵以及表示支路状态的0-1向量(支路断开用0表示,支路闭合用1表示)。导纳矩阵能够反映支路开断情况及节点关联关系,然而,将导纳矩阵作为特征向量时,其维度将随系统规模的增大而平方增长。虽然表示支路状态的0-1向量的维度随系统规模的增大仅线性增长,但其只能反映各支路的开断情况。而且以上两种方法都存在拓扑信息被淹没的问题,因而深度神经网络也难以有效提取支路开断对电力系统潮流的重要影响。对此,本发明提出以支路开断前后各支路的有功功率之差△Pij作为表示拓扑结构的特征向量In view of the discrete change characteristics, conventional methods for representing topological structures include the admittance matrix and the 0-1 vector representing the branch state (0 represents a branch disconnection and 1 represents a branch closure). The admittance matrix can reflect the branch disconnection status and the node association relationship. However, when the admittance matrix is used as a feature vector, its dimension will grow quadratically with the increase in system scale. Although the dimension of the 0-1 vector representing the branch state only grows linearly with the increase in system scale, it can only reflect the disconnection status of each branch. Moreover, both of the above two methods have the problem of topological information being submerged, so it is difficult for deep neural networks to effectively extract the important impact of branch disconnection on the power system flow. In this regard, the present invention proposes to use the difference in active power of each branch before and after the branch is disconnected △P ij as the feature vector representing the topological structure.

2)对特征向量进行预处理,并划分为训练集和验证集。2) Preprocess the feature vector and divide it into training set and validation set.

数据预处理方法为化归一化。The data preprocessing method is normalization.

考虑了支路断线引起的拓扑结构变化,潮流样本中存在少量偏离样本均值的数据点。例如,当某一支路断开时,该支路有功为0MW,而其余大部分情况下,该支路的有功仍在均值附近。min-max方法是利用样本中的最小值和最大值来执行归一化的,而因为偏离的数据点会影响max或min值,导致min-max方法易受少量偏离的数据点的影响。z-score方法是利用样本整体信息,即样本均值和样本标准差,来执行归一化,受偏离的数据点的影响较小,在消除数值问题的同时能更好地保存数据分布特点,故本发明选用以下归一化方法:Taking into account the topological changes caused by branch disconnection, there are a small number of data points in the flow sample that deviate from the sample mean. For example, when a branch is disconnected, the active power of the branch is 0MW, while in most other cases, the active power of the branch is still near the mean. The min-max method uses the minimum and maximum values in the sample to perform normalization, and because the deviated data points will affect the max or min value, the min-max method is susceptible to the influence of a small number of deviated data points. The z-score method uses the overall information of the sample, that is, the sample mean and the sample standard deviation, to perform normalization, which is less affected by the deviated data points and can better preserve the data distribution characteristics while eliminating numerical problems. Therefore, the present invention uses the following normalization method:

Figure SMS_14
Figure SMS_14

式中,xμ为样本均值,xδ为样本标准差。x为输入样本,即特征向量。x*为归一化后的数据。数据x*均值为0,方差为1。In the formula, x μ is the sample mean, x δ is the sample standard deviation. x is the input sample, i.e., the eigenvector. x* is the normalized data. The mean of data x* is 0 and the variance is 1.

3)建立的深度神经网络直流潮流模型。3) Established deep neural network DC power flow model.

深度神经网络直流潮流模型如下所示:The deep neural network DC power flow model is shown below:

Figure SMS_15
Figure SMS_15

式中,

Figure SMS_16
为第l层神经元的前馈传递函数。l=1,2,…,n,n为神经网络层数。θ={W,b}为深度神经网络待优化参数。W表示权重,b表示偏移。In the formula,
Figure SMS_16
is the feedforward transfer function of the lth layer of neurons. l=1,2,…,n, n is the number of neural network layers. θ={W,b} is the parameter to be optimized for the deep neural network. W represents the weight and b represents the offset.

第l层神经元的前馈传递函数

Figure SMS_17
如下所示:The feedforward transfer function of the l-th layer of neurons
Figure SMS_17
As shown below:

Figure SMS_18
Figure SMS_18

式中,Xl-1为第l层神经元的输入。Wl和bl为第l层神经元与第l-1层神经元间的权重矩阵和偏移向量。s为激活函数。Where Xl -1 is the input of the lth layer of neurons. Wl and bl are the weight matrix and offset vector between the lth layer of neurons and the l-1th layer of neurons. s is the activation function.

激活函数s如下所示:The activation function s is as follows:

Figure SMS_19
Figure SMS_19

本实施例中,顶层前馈传递函数的激活函数设计为线性函数,其他层的激活函数为ReLU激活函数(线性整流函数,Rectified Linear Unit)。In this embodiment, the activation function of the top-level feedforward transfer function is designed to be a linear function, and the activation functions of other layers are ReLU activation functions (Rectified Linear Unit).

4)利用训练集和验证集对深度神经网络直流潮流模型进行训练。4) Use the training set and validation set to train the deep neural network DC power flow model.

对深度神经网络直流潮流模型进行训练的主要步骤如下:The main steps for training a deep neural network DC power flow model are as follows:

4.1)将训练集输入到深度神经网络直流潮流模型中。4.1) Input the training set into the deep neural network DC power flow model.

4.2)随机初始化深度神经网络直流潮流模型待优化参数θ。4.2) Randomly initialize the parameters θ to be optimized in the deep neural network DC power flow model.

4.3)利用RMSProp算法(Root Mean Square Prop,深度学习优化算法)对深度神经网络参数进行第t次更新,即:4.3) Use the RMSProp algorithm (Root Mean Square Prop, deep learning optimization algorithm) to update the deep neural network parameters for the tth time, that is:

Figure SMS_20
Figure SMS_20

式中,η为学习率。ε为常数。r为累积平方梯度。▽θL为均方差损失函数对θ的偏导。ρ为衰减速率。t为迭代次数。t初始值为1。Where η is the learning rate. ε is a constant. r is the cumulative squared gradient. ▽θL is the partial derivative of the mean square error loss function with respect to θ. ρ is the decay rate. t is the number of iterations. The initial value of t is 1.

4.4)将验证集输入到深度神经网络直流潮流模型中,判断验证集的测试精度是否下降,若是,则停止迭代,若否,则判断迭代次数t>tmax是否成立,若是,则停止迭代,若否,则返回步骤2。tmax为最大迭代次数。4.4) Input the validation set into the deep neural network DC power flow model to determine whether the test accuracy of the validation set decreases. If so, stop the iteration. If not, determine whether the number of iterations t>t max is true. If so, stop the iteration. If not, return to step 2. t max is the maximum number of iterations.

5)以电力网络实时数据建立测试集,并输入到训练后的深度神经网络直流潮流模型中,得到潮流输出特征向量Yout5) A test set is established with real-time data of the power network and input into the trained deep neural network DC power flow model to obtain the power flow output feature vector Y out .

6)对输出特征向量Yout=[θi,Pij]进行安全性验证。6) Perform security verification on the output feature vector Y out =[θ i ,P ij ].

对输出特征向量Yout=[θi,Pij]进行安全性验证的方法为:判断支路的有功潮流Pij>Pmax是否成立,若成立,则判断支路ij过载,若不成立,则支路ij处于安全状态。The method for verifying the safety of the output characteristic vector Y out =[θ i ,P ij ] is: judging whether the active power flow P ij >P max of the branch holds, if so, judging that the branch ij is overloaded, if not, the branch ij is in a safe state.

实施例2:Embodiment 2:

基于深度学习的含不确定性N-1安全校核方法,主要包括以下步骤:The N-1 safety verification method with uncertainty based on deep learning mainly includes the following steps:

1)获取电力网络数据,并建立输入特征向量集Xin1) Obtain power network data and establish an input feature vector set Xin .

2)对特征向量进行预处理,并划分为训练集和验证集。2) Preprocess the feature vector and divide it into training set and validation set.

3)建立的深度神经网络直流潮流模型。3) Established deep neural network DC power flow model.

4)利用训练集和验证集对深度神经网络直流潮流模型进行训练。4) Use the training set and validation set to train the deep neural network DC power flow model.

5)以电力网络实时数据建立测试集,并输入到训练后的深度神经网络直流潮流模型中,得到潮流输出特征向量Yout5) A test set is established with real-time data of the power network and input into the trained deep neural network DC power flow model to obtain the power flow output feature vector Y out .

6)对输出特征向量Yout=[θi,Pij]进行安全性验证。6) Perform security verification on the output feature vector Y out =[θ i ,P ij ].

实施例3:Embodiment 3:

基于深度学习的含不确定性N-1安全校核方法,主要步骤见实施例2,其中,深度神经网络直流潮流模型如下所示:The main steps of the N-1 safety verification method with uncertainty based on deep learning are shown in Example 2, wherein the deep neural network DC power flow model is as follows:

Figure SMS_21
Figure SMS_21

式中,

Figure SMS_22
为第l层神经元的前馈传递函数。l=1,2,…,n,n为神经网络层数。θ={W,b}为深度神经网络待优化参数。In the formula,
Figure SMS_22
is the feedforward transfer function of the lth layer of neurons. l=1,2,…,n, n is the number of neural network layers. θ={W,b} is the parameter to be optimized for the deep neural network.

第l层神经元的前馈传递函数

Figure SMS_23
如下所示:The feedforward transfer function of the l-th layer of neurons
Figure SMS_23
As shown below:

Figure SMS_24
Figure SMS_24

式中,Xl-1为第l层神经元的输入。Wl和bl为第l层神经元与第l-1层神经元间的权重矩阵和偏移向量。s为激活函数。Where Xl -1 is the input of the lth layer of neurons. Wl and bl are the weight matrix and offset vector between the lth layer of neurons and the l-1th layer of neurons. s is the activation function.

激活函数s如下所示:The activation function s is as follows:

Figure SMS_25
Figure SMS_25

实施例4:Embodiment 4:

基于深度学习的含不确定性N-1安全校核方法,主要步骤见实施例2,其中,对深度神经网络直流潮流模型进行训练的主要步骤如下:The main steps of the N-1 safety verification method with uncertainty based on deep learning are shown in Example 2, wherein the main steps of training the deep neural network DC power flow model are as follows:

1)将训练集输入到深度神经网络直流潮流模型中。1) Input the training set into the deep neural network DC power flow model.

2)随机初始化深度神经网络直流潮流模型待优化参数θ。2) Randomly initialize the parameters θ to be optimized in the deep neural network DC power flow model.

3)利用RMSProp算法对深度神经网络参数进行第t次更新,即:3) Use the RMSProp algorithm to update the deep neural network parameters for the tth time, that is:

Figure SMS_26
Figure SMS_26

式中,η为学习率。ε为常数。r为累积平方梯度。▽θL为均方差损失函数对θ的偏导。ρ为衰减速率。t为迭代次数。t初始值为1。通常设置ρ=0.99,η=0.001,ε=1×10-8Where η is the learning rate. ε is a constant. r is the cumulative squared gradient. ▽ θ L is the partial derivative of the mean square error loss function with respect to θ. ρ is the decay rate. t is the number of iterations. The initial value of t is 1. Usually ρ=0.99, η=0.001, ε=1×10 -8 are set.

4)将验证集输入到深度神经网络直流潮流模型中,判断验证集的测试精度是否下降,若是,则停止迭代,若否,则判断迭代次数t>tmax是否成立,若是,则停止迭代,若否,则返回步骤2。tmax为最大迭代次数。4) Input the validation set into the deep neural network DC power flow model to determine whether the test accuracy of the validation set decreases. If so, stop the iteration. If not, determine whether the number of iterations t>t max is established. If so, stop the iteration. If not, return to step 2. t max is the maximum number of iterations.

实施例5:Embodiment 5:

验证基于深度学习的含不确定性N-1安全校核方法的实验,主要包括以下步骤:The experiment to verify the uncertainty-containing N-1 safety verification method based on deep learning mainly includes the following steps:

1)搭建系统:在IEEE 30节点系统中,本发明在节点5和12上引入了容量为10MW的光伏发电站,在节点10、15和27上引入了容量为16MW的风电场,新能源渗透率为20%。在IEEE 118节点系统中,本发明在节点13、14、16和23上引入了容量为250MW的光伏发电站,在母线59、80和90上引入了容量为330MW的风电场,新能源渗透率为20%。其中,风速服从两参数Weibull分布,尺度参数为2.016,形状参数为5.089,最大功率为16MW,切入风速、额定风速、切出风速分别3.5m/s、15m/s、25m/s。光照强度服从Beta分布,最大功率为20MW,Beta分布的α与β分别是2.06与2.5。负荷服从正态分布,均值为标准测试系统给定值,标准差为均值的10%。1) System construction: In the IEEE 30-node system, the present invention introduces a 10MW photovoltaic power station on nodes 5 and 12, and a 16MW wind farm on nodes 10, 15 and 27, with a new energy penetration rate of 20%. In the IEEE 118-node system, the present invention introduces a 250MW photovoltaic power station on nodes 13, 14, 16 and 23, and a 330MW wind farm on busbars 59, 80 and 90, with a new energy penetration rate of 20%. Among them, the wind speed obeys the two-parameter Weibull distribution, the scale parameter is 2.016, the shape parameter is 5.089, the maximum power is 16MW, the cut-in wind speed, rated wind speed, and cut-out wind speed are 3.5m/s, 15m/s, and 25m/s respectively. The light intensity obeys the Beta distribution, the maximum power is 20MW, and the α and β of the Beta distribution are 2.06 and 2.5 respectively. The load follows a normal distribution with a mean value given by the standard test system and a standard deviation of 10% of the mean value.

2)构建不同对比算例,分别如下:2) Construct different comparative examples, as follows:

算例1:IEEE 30节点系统,新能源渗透率20%,负荷标准差为均值的10%。Example 1: IEEE 30-bus system, renewable energy penetration rate 20%, load standard deviation 10% of the mean.

算例2:IEEE 118节点系统,新能源渗透率20%,负荷标准差为均值的10%。Example 2: IEEE 118-node system, renewable energy penetration rate of 20%, and load standard deviation of 10% of the mean.

仿真中的对比方法包括M0-M5。本发明采用的FDNN直流潮流模型共有3层隐藏层,对于算例1和算例2每层神经元数分别为100和500。The comparison methods in the simulation include M0-M5. The FDNN DC power flow model used in the present invention has 3 hidden layers, and the number of neurons in each layer is 100 and 500 for Example 1 and Example 2, respectively.

M0:直流潮流,作为验证标准。M0: DC power flow, used as verification standard.

M1:以本发明所提各节点电压之差作为拓扑结构特征向量的FDNN潮流模型。M1: FDNN power flow model using the voltage difference of each node proposed in the present invention as the topological structure feature vector.

M2:以导纳矩阵作为拓扑结构特征向量的SDAE潮流模型。M2: SDAE power flow model with the admittance matrix as the topological structure eigenvector.

M3:以表示支路状态的0-1向量作为拓扑结构特征向量的FDNN潮流模型。M3: FDNN power flow model with 0-1 vector representing branch status as topological structure feature vector.

M4:采用min-max归一化方法的M1。M4: M1 with min-max normalization method.

M5:激活函数仅采用ReLU的M1。M5: M1 with only ReLU as activation function.

3)本发明按源荷分布、线路依次故障进行抽样产生样本并进行测试,针对不同算例,本发明采用的深度神经网络直流潮流模型参数具体如表1所示。本发明所有算例均在Intel(R)Core(TM)i7-9700K CPU@3.70GHz 32GB RAM的硬件环境下测试。3) The present invention generates samples and performs tests according to source-load distribution and line faults. For different examples, the parameters of the deep neural network DC power flow model used in the present invention are specifically shown in Table 1. All examples of the present invention are tested in the hardware environment of Intel(R) Core(TM) i7-9700K CPU@3.70GHz 32GB RAM.

为了对比不同方法的性能,本发明设计了如下指标:Pva电压相角绝对误差超过0.01rad的概率、Ppf支路有功绝对误差超过1MW的概率。In order to compare the performance of different methods, the present invention designs the following indicators: the probability that the absolute error of the Pva voltage phase angle exceeds 0.01rad, and the probability that the absolute error of the Ppf branch active power exceeds 1MW.

表1不同算例下M1的参数设置Table 1 Parameter settings of M1 under different examples

算例Example 隐含层结构Hidden layer structure 训练样本数Number of training samples 验证样本数Number of validation samples 测试样本数Number of test samples 算例1Example 1 [100 100 100][100 100 100] 2000020000 1000010000 1000010000 算例2Example 2 [500 500 500][500 500 500] 5000050000 1000010000 1000010000

4)拓扑结构特征向量对结果的影响4) The influence of topological structure eigenvector on the results

本节拟验证采用本发明所提特征向量的M1在相同的迭代次数(200次)下,较采用导纳矩阵的M2和采用0-1向量的M3计算潮流精度更高且训练收敛速度更快。This section intends to verify that M1 using the eigenvector proposed in the present invention has higher calculation accuracy and faster training convergence speed than M2 using the admittance matrix and M3 using the 0-1 vector under the same number of iterations (200 times).

在精度方面,三种方法M1-M3求得的绝对误差大于设定值的概率对比于表2。由表2可知,所提方法M1在算例1和算例2中计算结果绝对误差大于设定值的概率均小于5%。M2方法(将导纳矩阵作为表征拓扑结构的特征向量)虽能在算例1中获得较好的计算精度,而随着系统规模的增加,的输入特征向量呈指数级增长,其在算例2中表征拓扑结构的向量维度达到27848,超出了所用硬件环境的计算成本,无法进行训练。M3方法采用0-1向量作为表征拓扑结构的特征向量,其变化量少易被其他大量变化信息淹没,从而导致深度神经网络不能有效地挖掘算例2的潮流特征,在算例2的计算结果中,支路有功超过1MW的概率超过了16%。由此可见,采用所提特征向量的M1具有比M2、M3更高的模型精度。In terms of accuracy, the probability that the absolute error obtained by the three methods M1-M3 is greater than the set value is compared in Table 2. As can be seen from Table 2, the probability that the absolute error of the calculation results of the proposed method M1 is greater than the set value in Example 1 and Example 2 is less than 5%. Although the M2 method (using the admittance matrix as the eigenvector representing the topological structure) can obtain good calculation accuracy in Example 1, as the system scale increases, the input eigenvector grows exponentially. The vector dimension representing the topological structure in Example 2 reaches 27848, which exceeds the calculation cost of the hardware environment used and cannot be trained. The M3 method uses 0-1 vectors as eigenvectors representing the topological structure. Its small change amount is easily submerged by other large amounts of change information, resulting in the deep neural network being unable to effectively mine the power flow characteristics of Example 2. In the calculation results of Example 2, the probability that the branch active power exceeds 1MW exceeds 16%. It can be seen that M1 using the proposed eigenvector has higher model accuracy than M2 and M3.

表2 M1、M2、M3的潮流计算精度比较Table 2 Comparison of power flow calculation accuracy of M1, M2, and M3

Figure SMS_27
Figure SMS_27

在收敛速度方面,算例1、算例2中M1、M2、M3在训练时的损失函数下降曲线分别如图2、图3所示。由图2可见,对于算例1,由于系统规模较小,M1、M2、M3三种方法皆能很好地挖掘算例1的潮流特征,三者的收敛速度相当。由图3可见,对于算例2,M1的收敛速度较M3有较大提高,训练结束时,M1、M3的损失函数分别为0.122和0.359,M1较M3的损失函数降低了66.0%。因此,综合而言,M1较M2、M3具有更快的收敛速度。In terms of convergence speed, the loss function decline curves of M1, M2, and M3 during training in Example 1 and Example 2 are shown in Figure 2 and Figure 3 respectively. As shown in Figure 2, for Example 1, due to the small scale of the system, the three methods M1, M2, and M3 can all well mine the flow characteristics of Example 1, and the convergence speeds of the three are comparable. As shown in Figure 3, for Example 2, the convergence speed of M1 is much higher than that of M3. At the end of training, the loss functions of M1 and M3 are 0.122 and 0.359 respectively, and the loss function of M1 is reduced by 66.0% compared with that of M3. Therefore, in general, M1 has a faster convergence speed than M2 and M3.

5)归一化方法对结果的影响5) The impact of normalization methods on the results

在收敛条件下(满足早停法或迭代次数不超过迭代阈值1000),采用本发明所设计的z-score标准化方法M1与采用min-max标准化方法的M4计算直流潮流的精度结果如表3所示。由表1可知,对于算例1、算例2,M1计算结果中绝对误差大于设定值的概率均小于M4。其中,对于算例1,M1的计算结果中,绝对误差大于设定值的概率均在0.3%以下。而M4的计算结果中,电压相角的绝对误差大于设定值的概率为3.5%,而支路有功的绝对误差大于设定值的概率均超过了14%。对于算例2,M1的计算结果中,绝对误差大于设定值的概率均在1.9%以下。而M2的计算结果中,电压相角以及支路有功的绝对误差大于设定值的概率均超过了69%。由此可见,M1所采用的z-score标准化方法更适合处理考虑了拓扑结构变化的潮流样本。Under the convergence condition (satisfying the early stopping method or the number of iterations does not exceed the iteration threshold of 1000), the accuracy results of the DC power flow calculated by the z-score standardization method M1 designed by the present invention and the min-max standardization method M4 are shown in Table 3. It can be seen from Table 1 that for Example 1 and Example 2, the probability that the absolute error in the calculation results of M1 is greater than the set value is less than that of M4. Among them, for Example 1, in the calculation results of M1, the probability that the absolute error is greater than the set value is less than 0.3%. In the calculation results of M4, the probability that the absolute error of the voltage phase angle is greater than the set value is 3.5%, and the probability that the absolute error of the branch active power is greater than the set value exceeds 14%. For Example 2, in the calculation results of M1, the probability that the absolute error is greater than the set value is less than 1.9%. In the calculation results of M2, the probability that the absolute error of the voltage phase angle and the branch active power is greater than the set value exceeds 69%. It can be seen that the z-score standardization method adopted by M1 is more suitable for processing power flow samples that take into account topological changes.

表3 M1和M4的潮流计算精度比较Table 3 Comparison of power flow calculation accuracy between M1 and M4

Figure SMS_28
Figure SMS_28

6)激活函数对结果的影响6) The impact of activation function on the results

图4、图5分别展示了算例1、算例2中采用M1与M5训练时的损失函数下降曲线。从图中可以看出,无论在算例1还是算例2中采用所设计的激活函数M1较仅采用ReLU激活函数的M5都能收敛到更低的损失函数。在算例1中,采用M1与M5方法进行训练都在达到迭代阈值后收敛,损失函数值分别降到0.747和11.694。可见,本发明所提方法M1较M5能有效降低损失函数值93.6%。在算例2中,M1在达到迭代阈值1000后收敛,M5在迭代到425次时满足早停法收敛条件停止训练。训练收敛后的M1与M5分将算例2的损失函数降到0.033和27.575,本发明所提方法同样体现出了明显的优势,较M5能有效降低损失函数值99.9%。由此可知,本发明将最后一层损失函数设计为线性函数能使深度神经网络捕捉更宽泛的输出,从而更好地匹配数据预处理方法有效挖掘潮流特征。Figures 4 and 5 show the loss function descent curves when using M1 and M5 for training in Example 1 and Example 2, respectively. It can be seen from the figure that whether in Example 1 or Example 2, the designed activation function M1 can converge to a lower loss function than M5 which only uses the ReLU activation function. In Example 1, the training using the M1 and M5 methods converged after reaching the iteration threshold, and the loss function values dropped to 0.747 and 11.694, respectively. It can be seen that the method M1 proposed in the present invention can effectively reduce the loss function value by 93.6% compared with M5. In Example 2, M1 converged after reaching the iteration threshold of 1000, and M5 stopped training when it met the early stopping method convergence condition when it iterated to 425 times. After the training converged, M1 and M5 reduced the loss function of Example 2 to 0.033 and 27.575 respectively. The method proposed in the present invention also showed obvious advantages and could effectively reduce the loss function value by 99.9% compared with M5. It can be seen that the present invention designs the last layer loss function as a linear function, which enables the deep neural network to capture a wider range of outputs, thereby better matching the data preprocessing method to effectively mine the trend characteristics.

7)基于深度学习技术的N-1安全校核性能分析7) N-1 safety verification performance analysis based on deep learning technology

本节从计算精度与计算速度两方面分析基于深度学习技术的N-1安全校核性能。其中,深度神经网络的训练收敛条件是满足早停法或迭代次数不超过迭代阈值1000。假设算例1每个新能源场站有4个待校验场景,算例2中每个新能源场站有3个待校验场景。则算例1与算例2分别需校验41986和406782个场景。This section analyzes the N-1 safety verification performance based on deep learning technology from the aspects of calculation accuracy and calculation speed. Among them, the training convergence condition of the deep neural network is to meet the early stopping method or the number of iterations does not exceed the iteration threshold of 1000. Assume that each new energy station in Example 1 has 4 scenes to be verified, and each new energy station in Example 2 has 3 scenes to be verified. Then Example 1 and Example 2 need to verify 41986 and 406782 scenes respectively.

采用训练完毕的深度神经网络直流潮流模型直接映射所有待校验场景的潮流并根据结果进行支路越限判断。本发明以待校验场景的所有节点相角平均计算误差、支路功率平均计算误差以及支路越限判断准确率(校核准确率)来评判本发明所提方法的计算精度。另外,指的注意的是,由于IEEE 118节点系统没有支路功率阈值,因此本发明采用波士顿118节点系统的支路功率阈值代替。采用所提方法M1计算N-1安全校核的统计结果如表4所示。从表4中,可以看到,M1在算例1和算例2中的节点相角平均计算误差分别为-1.0×10-5rad和3.9×10-5rad,M1在算例1和算例2中的支路功率平均计算误差分别为-1.7×10-3MW和2.1×10-3MW。由本发明所提方法进行N-1安全校核的准确率在两个算例中都能达到99.9%以上。由此可见,本发明所提方法对潮流计算的拟合精度高,N-1安全校核准确率能有效满足工业应用需求。The trained deep neural network DC power flow model is used to directly map the power flow of all scenes to be verified and make branch over-limit judgments based on the results. The present invention uses the average calculation error of the phase angle of all nodes in the scene to be verified, the average calculation error of the branch power, and the accuracy of the branch over-limit judgment (verification accuracy) to judge the calculation accuracy of the method proposed in the present invention. In addition, it should be noted that since the IEEE 118 node system does not have a branch power threshold, the present invention uses the branch power threshold of the Boston 118 node system instead. The statistical results of the N-1 safety check calculated by the proposed method M1 are shown in Table 4. From Table 4, it can be seen that the average calculation error of the node phase angle of M1 in Example 1 and Example 2 is -1.0×10-5rad and 3.9×10-5rad respectively, and the average calculation error of the branch power of M1 in Example 1 and Example 2 is -1.7×10-3MW and 2.1×10-3MW respectively. The accuracy of the N-1 safety check performed by the method proposed in the present invention can reach more than 99.9% in both examples. It can be seen that the method proposed in the present invention has high fitting accuracy for power flow calculation, and the N-1 safety verification accuracy can effectively meet the needs of industrial applications.

表4 M1安全校核精度分析Table 4 M1 safety check accuracy analysis

算例Example Mean_Pij(MW)Mean_Pij(MW) Mean_θ(rad)Mean_θ(rad) 校核准确率Calibration accuracy 算例1Example 1 -1.7×10-3 -1.7×10 -3 -1.0×10-5 -1.0×10 -5 99.96%99.96% 算例2Example 2 2.1×10-3 2.1×10 -3 3.9×10-5 3.9×10 -5 99.99%99.99%

表5为本发明所提方法M1与工业界目前采用的方法M0计算安全校核的时间对比。从表中可以看到,本发明所提方法在两个算例中都能极大地缩短计算时间。其中,在算例1中,本发明所提方法仅需要0.12秒,而采用工业界方法M0需要64.16秒,本发明所提方法能将计算速度提高535倍。在算例2中,本发明所提方法也在计算速度方面显示了明显的优势。采用M1和M0计算N-1安全校核的计算时间分别为8.50秒与820.09秒,采用本发明所提方法的N-1校核速度教工业界方法提高96倍。因此,本发明所提方法在保证高校核准确率下,能近百倍地提高N-1安全校核速度。值得注意的是,随着新能源场站的增加、考虑多时段等问题,工业界求解方法的计算时间将成倍增长,本发明所提方法的优势将愈加明显。Table 5 is a comparison of the time for calculating the safety check by the method M1 proposed in the present invention and the method M0 currently used in the industry. It can be seen from the table that the method proposed in the present invention can greatly shorten the calculation time in both examples. Among them, in Example 1, the method proposed in the present invention only takes 0.12 seconds, while the industrial method M0 takes 64.16 seconds. The method proposed in the present invention can increase the calculation speed by 535 times. In Example 2, the method proposed in the present invention also shows obvious advantages in terms of calculation speed. The calculation time for calculating the N-1 safety check using M1 and M0 is 8.50 seconds and 820.09 seconds respectively. The N-1 check speed of the method proposed in the present invention is 96 times higher than that of the industrial method. Therefore, the method proposed in the present invention can increase the N-1 safety check speed by nearly 100 times while ensuring the accuracy of the high-quality nuclear. It is worth noting that with the increase of new energy stations and the consideration of multiple time periods, the calculation time of the industrial solution method will increase exponentially, and the advantages of the method proposed in the present invention will become more and more obvious.

表5 M0与M1计算N-1安全校核速度对比Table 5 Comparison of N-1 safety check speed between M0 and M1

Figure SMS_29
Figure SMS_29

本发明从特征向量构造及学习策略设计两方面入手,提出了基于深度学习技术的N-1快速校核方法。将节点注入功率与支路开断前后的支路功率差构造为表征源荷、拓扑结构变化的输入特征向量,使得深度神经网络能有效提取源荷、拓扑结构变化对潮流的重要影响。此外,在分析常规数据预处理方法和激活函数的数学特性后,采用z-score标准化方法来对潮流样本进行归一化预处理;进而结合ReLU激活函数与线性函数作为深度神经网络的激活函数以有效提取潮流特征,从而形成一套适用于N-1校核的深度神经网络学习策略。The present invention starts from the two aspects of feature vector construction and learning strategy design, and proposes an N-1 fast verification method based on deep learning technology. The node injection power and the branch power difference before and after the branch is disconnected are constructed as input feature vectors to characterize the source load and topological structure changes, so that the deep neural network can effectively extract the important influence of source load and topological structure changes on the tidal current. In addition, after analyzing the mathematical characteristics of conventional data preprocessing methods and activation functions, the z-score normalization method is used to normalize and preprocess the tidal current samples; and then the ReLU activation function and the linear function are combined as the activation function of the deep neural network to effectively extract the tidal current characteristics, thereby forming a set of deep neural network learning strategies suitable for N-1 verification.

Claims (4)

1.基于深度学习的含不确定性N-1安全校核方法,其特征在于,包括以下步骤:1. A deep learning-based N-1 safety verification method with uncertainty, characterized by comprising the following steps: 1)获取电力网络数据,并建立输入特征向量集Xin1) Obtain power network data and establish an input feature vector set Xin ; 所述电力网络数据包括电力网络拓扑结构和各节点源荷数据;The power network data includes the power network topology and source load data of each node; 2)对特征向量进行预处理,并划分为训练集和验证集;2) Preprocess the feature vector and divide it into training set and validation set; 3)建立深度神经网络直流潮流模型;3) Establish a deep neural network DC power flow model; 4)利用训练集和验证集对深度神经网络直流潮流模型进行训练;4) Use the training set and validation set to train the deep neural network DC power flow model; 5)以电力网络实时数据建立测试集,并输入到训练后的深度神经网络直流潮流模型中,得到潮流输出特征向量Yout5) Establish a test set with real-time data of the power network and input it into the trained deep neural network DC power flow model to obtain the power flow output feature vector Y out ; 6)对输出特征向量Yout=[θi,Pij]进行安全性验证;6) Perform security verification on the output feature vector Y out =[θ i ,P ij ]; 输入特征向量集Xin=[Pi,△Pij]和输出特征向量Yout=[θi,Pij];其中,Pi为连续特征向量,表示新能源节点注入有功功率总和;θi为节点相角,Pij为各支路的有功潮流;△Pij为离散特征向量,表示支路开断前后各支路的有功功率之差;Input feature vector set Xin = [P i , △P ij ] and output feature vector Y out = [θ i ,P ij ]; where Pi is a continuous feature vector, representing the total active power injected by the new energy node; θ i is the node phase angle, Pij is the active power flow of each branch; △P ij is a discrete feature vector, representing the difference in active power of each branch before and after the branch is disconnected; 支路开断前后各支路的有功功率之差△Pij如下所示:The difference in active power of each branch before and after the branch is disconnected △P ij is as follows:
Figure FDA0004097869000000011
Figure FDA0004097869000000011
式中,
Figure FDA0004097869000000012
为支路开断前各支路有功功率;
Figure FDA0004097869000000013
为支路开断后各支路有功功率;支路开断前后各支路的有功功率之差△Pij的维度为nbranch;nbranch为系统支路数;
In the formula,
Figure FDA0004097869000000012
It is the active power of each branch before the branch is disconnected;
Figure FDA0004097869000000013
is the active power of each branch after the branch is disconnected; the dimension of the difference in active power of each branch before and after the branch is disconnected △P ij is n branch ; n branch is the number of system branches;
对输出特征向量Yout=[θi,Pij]进行安全性验证的方法为:判断支路的有功潮流Pij>Pmax是否成立,若成立,则判断支路ij过载,若不成立,则支路ij处于安全状态;The method for verifying the safety of the output characteristic vector Y out =[θ i ,P ij ] is as follows: determining whether the active power flow of the branch P ij >P max is established, if established, determining that the branch ij is overloaded, if not established, the branch ij is in a safe state; 深度神经网络直流潮流模型如下所示:The deep neural network DC power flow model is shown below:
Figure FDA0004097869000000014
Figure FDA0004097869000000014
式中,
Figure FDA0004097869000000015
为第l层神经元的前馈传递函数;l=1,2,…,n,n为神经网络层数;θ={W,b}为深度神经网络待优化参数;
In the formula,
Figure FDA0004097869000000015
is the feedforward transfer function of the lth layer of neurons; l = 1, 2, ..., n, n is the number of neural network layers; θ = {W, b} is the parameter to be optimized for the deep neural network;
第l层神经元的前馈传递函数
Figure FDA0004097869000000016
如下所示:
The feedforward transfer function of the l-th layer of neurons
Figure FDA0004097869000000016
As shown below:
Figure FDA0004097869000000017
Figure FDA0004097869000000017
式中,Xl-1为第l层神经元的输入;Wl和bl为第l层神经元与第l-1层神经元间的权重矩阵和偏移向量;s为激活函数。Where Xl -1 is the input of the lth layer of neurons; Wl and bl are the weight matrix and offset vector between the lth layer of neurons and the l-1th layer of neurons; s is the activation function.
2.根据权利要求1所述的基于深度学习的含不确定性N-1安全校核方法,其特征在于:数据预处理方法为化归一化;2. The N-1 safety verification method with uncertainty based on deep learning according to claim 1 is characterized in that: the data preprocessing method is normalization; 归一化公式如下:The normalization formula is as follows:
Figure FDA0004097869000000021
Figure FDA0004097869000000021
式中,xμ为样本均值,xδ为样本标准差;x为输入样本,即特征向量;x*为归一化后的数据;数据x*均值为0,方差为1。In the formula, x μ is the sample mean, x δ is the sample standard deviation; x is the input sample, that is, the eigenvector; x* is the normalized data; the mean of the data x* is 0 and the variance is 1.
3.根据权利要求1所述的基于深度学习的含不确定性N-1安全校核方法,其特征在于,激活函数s如下所示:3. The N-1 security verification method with uncertainty based on deep learning according to claim 1, characterized in that the activation function s is as follows:
Figure FDA0004097869000000022
Figure FDA0004097869000000022
4.根据权利要求1所述的基于深度学习的含不确定性N-1安全校核方法,其特征在于,对深度神经网络直流潮流模型进行训练的步骤如下:4. The N-1 safety verification method with uncertainty based on deep learning according to claim 1 is characterized in that the steps of training the deep neural network DC power flow model are as follows: 1)将训练集输入到深度神经网络直流潮流模型中;1) Input the training set into the deep neural network DC power flow model; 2)随机初始化深度神经网络直流潮流模型待优化参数θ;2) Randomly initialize the parameters θ to be optimized in the deep neural network DC power flow model; 3)利用RMSProp算法对深度神经网络参数进行第t次更新,即:3) Use the RMSProp algorithm to update the deep neural network parameters for the tth time, that is:
Figure FDA0004097869000000023
Figure FDA0004097869000000023
式中,
Figure FDA0004097869000000024
为均方差损失函数对θ的偏导;⊙为哈密顿乘子;η为学习率;ε为常数;r为累积平方梯度;ρ为衰减速率;t为迭代次数;t初始值为1;
In the formula,
Figure FDA0004097869000000024
is the partial derivative of the mean square error loss function with respect to θ; ⊙ is the Hamiltonian multiplier; η is the learning rate; ε is a constant; r is the cumulative square gradient; ρ is the decay rate; t is the number of iterations; the initial value of t is 1;
4)将验证集输入到深度神经网络直流潮流模型中,判断验证集的测试精度是否下降,若是,则停止迭代,若否,则判断迭代次数t>tmax是否成立,若是,则停止迭代,若否,则返回步骤2);tmax为最大迭代次数。4) Input the verification set into the deep neural network DC power flow model to determine whether the test accuracy of the verification set decreases. If so, stop the iteration. If not, determine whether the number of iterations t>t max is established. If so, stop the iteration. If not, return to step 2); t max is the maximum number of iterations.
CN201911040124.1A 2019-10-29 2019-10-29 N-1 safety checking method with uncertainty based on deep learning Active CN110929989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911040124.1A CN110929989B (en) 2019-10-29 2019-10-29 N-1 safety checking method with uncertainty based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911040124.1A CN110929989B (en) 2019-10-29 2019-10-29 N-1 safety checking method with uncertainty based on deep learning

Publications (2)

Publication Number Publication Date
CN110929989A CN110929989A (en) 2020-03-27
CN110929989B true CN110929989B (en) 2023-04-18

Family

ID=69849780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911040124.1A Active CN110929989B (en) 2019-10-29 2019-10-29 N-1 safety checking method with uncertainty based on deep learning

Country Status (1)

Country Link
CN (1) CN110929989B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112488550B (en) * 2020-12-09 2023-10-20 中国电力科学研究院有限公司 Uncertainty power grid static safety analysis method and system based on deep learning
CN113487010B (en) * 2021-05-21 2024-01-05 国网浙江省电力有限公司杭州供电公司 Power grid network security event analysis method based on machine learning
CN113904786B (en) * 2021-06-29 2023-05-30 重庆大学 False data injection attack identification method based on line topology analysis and tide characteristics
CN114297914B (en) * 2021-12-14 2025-03-25 重庆邮电大学 A method for ensuring the credibility of deep neural network results for large power grid reliability assessment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5659667A (en) * 1995-01-17 1997-08-19 The Regents Of The University Of California Office Of Technology Transfer Adaptive model predictive process control using neural networks
KR101706245B1 (en) * 2015-09-14 2017-02-14 동아대학교 산학협력단 Method for controlling production rate using artificial neural network in digital oil field
CN108054757A (en) * 2017-12-22 2018-05-18 清华大学 A kind of embedded idle and voltage N-1 Close loop security check methods
RU2680201C1 (en) * 2018-01-09 2019-02-18 федеральное государственное автономное образовательное учреждение высшего образования "Национальный исследовательский ядерный университет "МИФИ" (НИЯУ МИФИ) Architecture for intellectual computing and information-measuring systems with fuzzy media computations
CN109560554A (en) * 2019-01-21 2019-04-02 深圳供电局有限公司 Direct current power flow analysis method considering frequency change
CN109902854A (en) * 2019-01-11 2019-06-18 重庆大学 Fully linear model of optimal power flow for electrical-gas interconnection system based on deep learning method

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100217550A1 (en) * 2009-02-26 2010-08-26 Jason Crabtree System and method for electric grid utilization and optimization
CN105703368B (en) * 2016-02-04 2020-05-08 马瑞 Multi-uncertainty energy flow modeling integrated with active power distribution network and transmission network
CN109314390B (en) * 2017-05-15 2021-08-31 深圳大学 An Equal Conductance Compensation Global Linear Symmetry Method for Obtaining Power Flow in DC Power Networks
CN108075476A (en) * 2017-11-21 2018-05-25 国网福建省电力有限公司 A kind of security constraint optimal load flow method based on power flow transfer relation
CN109117951B (en) * 2018-01-15 2021-11-16 重庆大学 BP neural network-based probability load flow online calculation method
CN109301816A (en) * 2018-09-20 2019-02-01 中国电力科学研究院有限公司 Static Safety Analysis Method of Power System
CN109412161B (en) * 2018-12-18 2022-09-09 国网重庆市电力公司电力科学研究院 A power system probabilistic power flow calculation method and system
CN109599872B (en) * 2018-12-29 2022-11-08 重庆大学 Probabilistic power flow calculation method for power system based on stack noise reduction autoencoder
CN109784692B (en) * 2018-12-29 2020-11-24 重庆大学 A fast and safe constrained economic scheduling method based on deep learning
CN110110434B (en) * 2019-05-05 2020-10-16 重庆大学 An Initialization Method for Probabilistic Power Flow Deep Neural Network Computation
CN109995031B (en) * 2019-05-05 2020-07-17 重庆大学 Probability power flow deep learning calculation method based on physical model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5659667A (en) * 1995-01-17 1997-08-19 The Regents Of The University Of California Office Of Technology Transfer Adaptive model predictive process control using neural networks
KR101706245B1 (en) * 2015-09-14 2017-02-14 동아대학교 산학협력단 Method for controlling production rate using artificial neural network in digital oil field
CN108054757A (en) * 2017-12-22 2018-05-18 清华大学 A kind of embedded idle and voltage N-1 Close loop security check methods
RU2680201C1 (en) * 2018-01-09 2019-02-18 федеральное государственное автономное образовательное учреждение высшего образования "Национальный исследовательский ядерный университет "МИФИ" (НИЯУ МИФИ) Architecture for intellectual computing and information-measuring systems with fuzzy media computations
CN109902854A (en) * 2019-01-11 2019-06-18 重庆大学 Fully linear model of optimal power flow for electrical-gas interconnection system based on deep learning method
CN109560554A (en) * 2019-01-21 2019-04-02 深圳供电局有限公司 Direct current power flow analysis method considering frequency change

Also Published As

Publication number Publication date
CN110929989A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN110929989B (en) N-1 safety checking method with uncertainty based on deep learning
CN112132427B (en) A multi-level planning method of power grid considering the access of multiple resources on the user side
CN104156892B (en) A kind of active power distribution network Voltage Drop emulation and appraisal procedure
CN109063276B (en) Wind power plant dynamic equivalent modeling method suitable for long-time domain wind speed fluctuation
CN108306303A (en) Voltage stability evaluation method considering load increase and new energy output randomness
CN108205717A (en) A kind of photovoltaic generation power Multiple Time Scales Forecasting Methodology
CN107301472A (en) Distributed photovoltaic planing method based on scene analysis method and voltage-regulation strategy
CN107437824A (en) A kind of computational methods of the Area distribution formula power supply allowed capacity based on genetic algorithm
CN102623993B (en) Distributed power system state estimation method
CN105022885B (en) The grid-connected receiving capacity calculation method of distributed photovoltaic based on improved Big Bang-Big Crunch
CN108304623A (en) A kind of Probabilistic Load Flow on-line calculation method based on storehouse noise reduction autocoder
CN108336739A (en) A kind of Probabilistic Load Flow on-line calculation method based on RBF neural
CN109598377B (en) A robust planning method for AC/DC hybrid distribution network based on fault constraints
CN109713716B (en) Opportunity constraint economic dispatching method of wind power grid-connected system based on security domain
CN112163700A (en) A planning method for electrochemical energy storage power station considering cycle life of energy storage battery
CN109412161B (en) A power system probabilistic power flow calculation method and system
CN104200032A (en) Transverse time axis clustering method in generalized load modeling on basis of time periods
Yang et al. Short-term PV generation system direct power prediction model on wavelet neural network and weather type clustering
CN108647415A (en) The reliability estimation method of electric system for high proportion wind-electricity integration
Peng et al. A very short term wind power prediction approach based on Multilayer Restricted Boltzmann Machine
CN106611243A (en) Residual correction method for wind speed prediction based on GARCH (Generalized ARCH) model
Xu et al. Short-term wind power forecasting based on Elman neural network with particle swarm optimization
CN111371088A (en) Method and system for correcting SVG control strategy based on BP neural network
CN113609699B (en) Calculation method and system for AC power flow model of radial distribution network
CN106203743A (en) A kind of photovoltaic power generation power prediction method based on the IHCMAC neutral net improved

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
GR01 Patent grant
GR01 Patent grant