[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115733730A - Power grid fault detection method and device based on graph neural network - Google Patents

Power grid fault detection method and device based on graph neural network Download PDF

Info

Publication number
CN115733730A
CN115733730A CN202211423487.5A CN202211423487A CN115733730A CN 115733730 A CN115733730 A CN 115733730A CN 202211423487 A CN202211423487 A CN 202211423487A CN 115733730 A CN115733730 A CN 115733730A
Authority
CN
China
Prior art keywords
data
graph
neural network
grid
fault detection
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
CN202211423487.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.)
Tsinghua University
Electric Power Research Institute of State Grid Xinjiang Electric Power Co Ltd
Original Assignee
Tsinghua University
Electric Power Research Institute of State Grid Xinjiang 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 Tsinghua University, Electric Power Research Institute of State Grid Xinjiang Electric Power Co Ltd filed Critical Tsinghua University
Priority to CN202211423487.5A priority Critical patent/CN115733730A/en
Publication of CN115733730A publication Critical patent/CN115733730A/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

  • Supply And Distribution Of Alternating Current (AREA)

Abstract

本发明公开了一种基于图神经网络的电网故障检测方法及装置,该方法包括:构建电力系统中基于节点系统的图结构数据,并将图结构数据划分为训练集和测试集;构建邻接矩阵;基于邻接矩阵和图结构数据构建图神经网络模型,利用训练集训练图神经网络模型得到电网故障检测模型,并利用所述测试集测试电网故障检测模型得到训练好的电网故障检测模型;将电力系统中电网的待检测节点数据输入训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。本发明将所提出图神经网络应用于电网故障定位,电网节点相关性分析,电网故障关键性特征抽取等问题,经过仿真故障场景验证,可以极大提高故障节点的定位效率,提高定位精度。

Figure 202211423487

The invention discloses a grid fault detection method and device based on a graph neural network. The method includes: constructing graph structure data based on a node system in a power system, and dividing the graph structure data into a training set and a test set; constructing an adjacency matrix Construct a graph neural network model based on the adjacency matrix and graph structure data, use the training set to train the graph neural network model to obtain a grid fault detection model, and use the test set to test the grid fault detection model to obtain a trained grid fault detection model; The data of the nodes to be detected in the power grid in the system is input into the trained grid fault detection model to detect the faults of the grid nodes, and the detection results of the grid node faults are obtained. The invention applies the proposed graph neural network to problems such as power grid fault location, power grid node correlation analysis, power grid fault key feature extraction, etc. After verification of simulated fault scenarios, it can greatly improve the positioning efficiency of fault nodes and improve positioning accuracy.

Figure 202211423487

Description

一种基于图神经网络的电网故障检测方法及装置A grid fault detection method and device based on graph neural network

技术领域technical field

本发明涉及电网故障诊断技术领域,尤其涉及一种基于图神经网络的电网故障检测方法及装置。The invention relates to the technical field of grid fault diagnosis, in particular to a grid fault detection method and device based on a graph neural network.

背景技术Background technique

随着电力物联网的不断发展,电力大数据迎来新机遇。同时,智能配电网建设的蓬勃发展,投资不断增加,对智能配电网建设质量进行评估已成为一项紧迫的任务。近年来,数据驱动的建模和人工智能算法迅速发展,基于样本学习的配电网评估方式也成为研究热点。调控机构利用人工智能技术模拟人类思维,通过学习海量电网运行数据和运行经验,发现规律。With the continuous development of the power Internet of Things, power big data ushers in new opportunities. At the same time, with the vigorous development of smart distribution network construction and increasing investment, it has become an urgent task to evaluate the quality of smart distribution network construction. In recent years, data-driven modeling and artificial intelligence algorithms have developed rapidly, and distribution network evaluation methods based on sample learning have also become research hotspots. Regulatory institutions use artificial intelligence technology to simulate human thinking, and discover laws by learning massive power grid operating data and operating experience.

目前,电网故障后的处置调度工作主要依赖于调度人员的主观性决策,由调度人员实时分析故障后电网的状态、参数变化情况,查明故障发生的原因并制定相应的故障处置措施。At present, the disposal and dispatching work after a power grid failure mainly depends on the subjective decision-making of the dispatcher. The dispatcher analyzes the status and parameter changes of the power grid after the fault in real time, finds out the cause of the fault, and formulates corresponding fault handling measures.

随着电力系统的快速发展,电网结构和运行模式愈加复杂,故障后的处置难度不断提高,依赖于人工经验的传统调度决策机制越来越难以应对复杂大电网的快速故障分析和故障处置。近几十年来,国内外学者提出了一系列故障诊断的方法和思路,主要有Petri网、人工神经网络、遗传算法、粗糙集决策、专家系统、数据挖掘等智能方法。With the rapid development of the power system, the structure and operation mode of the power grid are becoming more and more complex, and the difficulty of handling after a fault is increasing. The traditional dispatching decision-making mechanism relying on manual experience is becoming more and more difficult to deal with the rapid fault analysis and fault handling of complex large power grids. In recent decades, domestic and foreign scholars have proposed a series of methods and ideas for fault diagnosis, mainly including Petri nets, artificial neural networks, genetic algorithms, rough set decision-making, expert systems, data mining and other intelligent methods.

电力系统需要借助数据处理将非结构化的故障数据抽取关键性特征,由于电网结构的电气连接属性,可以将电网结构抽象为图结构,借助图神经网络进行辅助判断,在电网故障发生时,帮助调度员快速分析事故原因,全面地掌握故障处理的关键信息,并进行辅助决策,以提高电网的应急处置能力,目前仍缺少以一种利用图结构进行电网故障检测的手段。The power system needs to use data processing to extract key features from unstructured fault data. Due to the electrical connection properties of the grid structure, the grid structure can be abstracted into a graph structure, and the graph neural network can be used to assist judgment. When a grid fault occurs, help The dispatcher quickly analyzes the cause of the accident, comprehensively grasps the key information of fault handling, and makes auxiliary decisions to improve the emergency response capability of the power grid. At present, there is still a lack of a means of using the graph structure to detect faults in the power grid.

发明内容Contents of the invention

本发明旨在至少在一定程度上解决相关技术中的技术问题之一。The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

为此,本发明的目的在于提出一种基于图神经网络的电网故障检测方法,通过构建电网特征抽取模型以及知识图谱,将电网领域零散的故障案例知识和庞杂的故障数据有效关联,并应用基于图卷积的神经网络进行网络故障智能诊断,辅助解决网络运维领域的故障问题。将所提出图神经网络应用于电网故障定位,电网节点相关性分析,电网故障关键性特征抽取等问题,经过仿真故障场景验证,可以极大提高故障节点的定位效率,提高定位精度。Therefore, the purpose of the present invention is to propose a grid fault detection method based on graph neural network. By constructing a grid feature extraction model and a knowledge graph, the scattered fault case knowledge in the grid field is effectively associated with complex fault data, and the application based on The neural network of graph convolution performs intelligent diagnosis of network faults and assists in solving fault problems in the field of network operation and maintenance. Applying the proposed graph neural network to power grid fault location, power grid node correlation analysis, power grid fault key feature extraction and other issues, after simulation fault scene verification, can greatly improve the positioning efficiency of fault nodes and improve positioning accuracy.

本发明的另一个目的在于提出一种基于图神经网络的电网故障检测装置。Another object of the present invention is to propose a grid fault detection device based on a graph neural network.

为达上述目的,本发明一方面提出了一种基于图神经网络的电网故障检测方法,包括:In order to achieve the above object, the present invention proposes a grid fault detection method based on a graph neural network on the one hand, including:

构建电力系统中基于节点系统的图结构数据,并将所述图结构数据划分为训练集和测试集;Constructing graph structure data based on the node system in the power system, and dividing the graph structure data into a training set and a test set;

基于图结构数据拓扑图和拓扑图节点之间的电气连接关系构建邻接矩阵;Construct an adjacency matrix based on the graph structure data topology graph and the electrical connection relationship between the topology graph nodes;

基于所述邻接矩阵和所述图结构数据构建图神经网络模型,利用所述训练集训练图神经网络模型得到电网故障检测模型,并利用所述测试集测试所述电网故障检测模型得到训练好的电网故障检测模型;Constructing a graph neural network model based on the adjacency matrix and the graph structure data, using the training set to train the graph neural network model to obtain a power grid fault detection model, and using the test set to test the power grid fault detection model to obtain a trained model Grid fault detection model;

将电力系统中电网的待检测节点数据输入所述训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。Inputting the data of nodes to be detected in the grid in the power system into the trained grid fault detection model to detect grid node faults and obtain grid node fault detection results.

根据本发明实施例的基于图神经网络的电网故障检测方法还可以具有以下附加技术特征:The grid fault detection method based on the graph neural network according to the embodiment of the present invention may also have the following additional technical features:

进一步地,在本发明的一个实施例中,所述基于邻接矩阵和所述图结构数据构建图神经网络模型,包括:基于图神经网络和邻接矩阵度对图结构数据进行特征维度处理,输出第一维度数据;基于所述第一维度数据和预设处理方式得到第二维度数据,利用所述第二维度数据和预设函数得到最终预测值,利用所述最终预测值和标签计算损失函数以建图神经网络模型。Further, in one embodiment of the present invention, the constructing the graph neural network model based on the adjacency matrix and the graph structure data includes: performing feature dimension processing on the graph structure data based on the graph neural network and the degree of the adjacency matrix, and outputting the first One-dimensional data; obtain second-dimensional data based on the first-dimensional data and a preset processing method, use the second-dimensional data and a preset function to obtain a final predicted value, and use the final predicted value and label to calculate a loss function to Build a neural network model.

进一步地,在本发明的一个实施例中,所述构建电力系统中基于节点系统的图结构数据,包括:基于电力系统中电网故障发生时刻,过滤预设时刻的故障数据得到仿真数据;基于所述仿真数据获取故障态数据标签和非故障态数据标签,并到数据集样本。Further, in one embodiment of the present invention, the construction of the graph structure data based on the node system in the power system includes: based on the time when the grid fault occurs in the power system, filtering the fault data at the preset time to obtain the simulation data; based on the Obtain fault state data labels and non-fault state data labels from the above simulation data, and add them to the data set samples.

进一步地,在本发明的一个实施例中,所述将图结构数据划分为训练集和测试集,包括:根据所述数据集样本的时序关系和预设比例,以每三个时间节点为一组,将前两个时间节点划分为训练集,后一个时间节点划分为测试集。Further, in an embodiment of the present invention, the dividing the graph structure data into a training set and a test set includes: according to the timing relationship and preset ratio of the samples in the data set, taking every three time nodes as a Group, the first two time nodes are divided into training sets, and the latter time nodes are divided into test sets.

进一步地,在本发明的一个实施例中,所述损失函数采用二分类交叉熵损失,表达式为:Further, in one embodiment of the present invention, the loss function adopts binary cross-entropy loss, and the expression is:

Figure BDA0003943818090000021
Figure BDA0003943818090000021

式中,N为数据集样本的样本总量,yn为真实值概率,取0或1,xn为预测值概率。In the formula, N is the total number of samples in the data set, y n is the probability of the real value, which is 0 or 1, and x n is the probability of the predicted value.

为达到上述目的,本发明另一方面提出了一种基于图神经网络的电网故障检测装置,包括:In order to achieve the above object, another aspect of the present invention proposes a network fault detection device based on a graph neural network, including:

数据获取模块,用于构建电力系统中基于节点系统的图结构数据,并将所述图结构数据划分为训练集和测试集;The data acquisition module is used to construct the graph structure data based on the node system in the power system, and divide the graph structure data into a training set and a test set;

矩阵构建模块,用于基于图结构数据拓扑图和拓扑图节点之间的电气连接关系构建邻接矩阵;A matrix building block for constructing an adjacency matrix based on the graph structure data topology graph and the electrical connection relationship between the nodes of the graph structure;

模型训练模块,用于基于所述邻接矩阵和所述图结构数据构建图神经网络模型,利用所述训练集训练图神经网络模型得到电网故障检测模型,并利用所述测试集测试所述电网故障检测模型得到训练好的电网故障检测模型;A model training module, configured to construct a graph neural network model based on the adjacency matrix and the graph structure data, use the training set to train the graph neural network model to obtain a grid fault detection model, and use the test set to test the grid fault The detection model obtains the trained grid fault detection model;

故障检测模块,用于将电力系统中电网的待检测节点数据输入所述训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。The fault detection module is used to input the data of nodes to be detected in the grid in the power system into the trained grid fault detection model to detect grid node faults and obtain grid node fault detection results.

本发明实施例的基于图神经网络的电网故障检测方法和装置,能将所提出图神经网络应用于电网故障定位,电网节点相关性分析,电网故障关键性特征抽取等问题,经过仿真故障场景验证,可以极大提高故障节点的定位效率,提高定位精度。The grid fault detection method and device based on the graph neural network in the embodiment of the present invention can apply the proposed graph neural network to grid fault location, grid node correlation analysis, grid fault key feature extraction and other issues, and is verified by simulated fault scenarios , which can greatly improve the location efficiency of the fault node and improve the location accuracy.

本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1为根据本发明实施例的基于图神经网络的电网故障检测方法流程图;Fig. 1 is a flow chart of a grid fault detection method based on a graph neural network according to an embodiment of the present invention;

图2为根据本发明实施例的IEEE10机39节点拓扑结构示意图;Fig. 2 is a schematic diagram of IEEE10 machine 39 node topology according to an embodiment of the present invention;

图3为根据本发明实施例的图神经网络的基本流程图;FIG. 3 is a basic flowchart of a graph neural network according to an embodiment of the present invention;

图4为根据本发明实施例的图神经网络的架构图Fig. 4 is the architectural diagram of graph neural network according to the embodiment of the present invention

图5为根据本发明实施例的基于图神经网络的电网故障检测装置的结构示意图。Fig. 5 is a schematic structural diagram of a grid fault detection device based on a graph neural network according to an embodiment of the present invention.

具体实施方式Detailed ways

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and examples.

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

下面参照附图描述根据本发明实施例提出的基于图神经网络的电网故障检测方法和装置。The graph neural network-based power grid fault detection method and device proposed according to the embodiments of the present invention are described below with reference to the accompanying drawings.

图1是本发明一个实施例的基于图神经网络的电网故障检测方法的流程图。Fig. 1 is a flowchart of a grid fault detection method based on a graph neural network according to an embodiment of the present invention.

如图1所示,该方法包括但不限于以下步骤:As shown in Figure 1, the method includes but is not limited to the following steps:

S1,构建电力系统中基于节点系统的图结构数据,并将图结构数据划分为训练集和测试集;S1, construct the graph structure data based on the node system in the power system, and divide the graph structure data into a training set and a test set;

S2,基于图结构数据拓扑图和拓扑图节点之间的电气连接关系构建邻接矩阵;S2, constructing an adjacency matrix based on the graph structure data topology graph and the electrical connection relationship between nodes in the graph structure;

S3,基于邻接矩阵和图结构数据构建图神经网络模型,利用训练集训练图神经网络模型得到电网故障检测模型,并利用测试集测试电网故障检测模型得到训练好的电网故障检测模型;S3, build a graph neural network model based on the adjacency matrix and graph structure data, use the training set to train the graph neural network model to obtain a power grid fault detection model, and use the test set to test the power grid fault detection model to obtain a trained power grid fault detection model;

S4,将电力系统中电网的待检测节点数据输入训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。S4. Input the data of nodes to be detected in the grid in the power system into the trained grid fault detection model to detect grid node faults, and obtain grid node fault detection results.

下面结合附图对本发明实施例的基于图神经网络的电网故障检测方法进行详细阐述。The graph neural network-based power grid fault detection method of the embodiment of the present invention will be described in detail below in conjunction with the accompanying drawings.

首选是,构建图结构数据,图2为根据本发明实施例的IEEE10机39节点拓扑结构示意图,如图2所示:The first choice is to construct graph structure data, and Fig. 2 is a schematic diagram of IEEE10 machine 39 node topology according to an embodiment of the present invention, as shown in Fig. 2:

IEEE10机39节点系统是一个在电力系统领域较为有名的区域性输电系统网络,又称新英格兰39节点系统(New England 39Bus System,NE39BS),该基准网络配置于美国新英格兰地区,由39个母线组成,其中包括10个发电机母线和19个负荷母线,广泛应用于小信号稳定性研究、动态稳定分析、电能质量分析与控制等领域。本研究基于39节点系统,数据主要来源于39节点系统仿真。The IEEE10 39-bus system is a well-known regional power transmission system network in the field of power systems, also known as the New England 39-bus system (NE39BS). This benchmark network is configured in New England, the United States, and consists of 39 bus Composition, including 10 generator buses and 19 load buses, is widely used in small signal stability research, dynamic stability analysis, power quality analysis and control and other fields. This research is based on a 39-node system, and the data mainly comes from the 39-node system simulation.

IEEE10机39节点系统中,节点属性包括母线幅值、相角,发电机励磁电压、功角、有功功率、无功功率。为了引入时间维度的特征,利用相邻时刻的信息辅助对中间时刻状态的预测,设置时间维度的滑窗大小为5个时刻,计算当前时刻与前后各两个时刻的母线幅值、相角的均值和方差,也作为节点的属性。因此,该39节点电网系统的图结构数据可表示为

Figure BDA0003943818090000041
In the IEEE10 machine 39-node system, the node attributes include bus amplitude, phase angle, generator excitation voltage, power angle, active power, and reactive power. In order to introduce the characteristics of the time dimension, use the information of adjacent moments to assist in the prediction of the state of the intermediate moment, set the sliding window size of the time dimension to 5 moments, and calculate the bus amplitude and phase angle between the current moment and the two moments before and after. Mean and variance, also as properties of the node. Therefore, the graph structure data of the 39-node grid system can be expressed as
Figure BDA0003943818090000041

数据构建。故障发生时刻设置为0.1s,分别在0.70s、0.72s、0.74s、0.76s、0.78s切除故障以得到仿真数据。将在0.70s、0.72s、0.74s、0.76s、0.78s切除故障生成的故障态数据标签设置为1,共320个样本。将0.74s切除故障至最终的时间节点的非故障态数据标签设置为0,共927个样本。该数据集共1247个样本。将得到的数据集划分为训练集和测试集,具体划分方式为:根据时序关系,每三个时间节点为一组,前两个设置为训练集,后一个设置为测试集。其中,训练集共832个样本,测试集共415个样本,比例约为2:1。该数据集中所有样本的拓扑结构是相同的。Data construction. The fault occurrence time is set to 0.1s, and the faults are removed at 0.70s, 0.72s, 0.74s, 0.76s, and 0.78s respectively to obtain simulation data. Set the label of the fault state data generated by removing the fault at 0.70s, 0.72s, 0.74s, 0.76s, and 0.78s to 1, a total of 320 samples. The non-fault state data label of the time node from 0.74s removal of the fault to the final time node is set to 0, a total of 927 samples. The data set has a total of 1247 samples. Divide the obtained data set into a training set and a test set. The specific division method is: according to the time series relationship, every three time nodes are grouped, the first two are set as the training set, and the latter is set as the test set. Among them, the training set has a total of 832 samples, and the test set has a total of 415 samples, with a ratio of about 2:1. The topology of all samples in this dataset is the same.

进一步地,构建邻接矩阵:Further, build an adjacency matrix:

可以理解的是,不考虑潮流方向,将IEEE 10机39节点系统抽象生成的拓扑图视为无向图。根据节点之间的连接关系,构建邻接矩阵

Figure BDA0003943818090000051
It is understandable that the topological graph abstracted from the IEEE 10-machine 39-node system is regarded as an undirected graph regardless of the power flow direction. According to the connection relationship between nodes, build an adjacency matrix
Figure BDA0003943818090000051

进一步地,图神经网络的结构,图3为图神经网络的基本流程图,图4为图神经网络的架构图,如图3和图4所示,Further, the structure of the graph neural network, Figure 3 is the basic flowchart of the graph neural network, and Figure 4 is the architecture diagram of the graph neural network, as shown in Figure 3 and Figure 4,

图神经网络总体架构采用了U型结构,对输入的图结构数据先升维后降维,最终得到的输出特征维度为39×1,其中每个图神经网络层后都通过激活函数进行非线性变换。The overall architecture of the graph neural network adopts a U-shaped structure. The input graph structure data is first increased in dimension and then reduced in dimension. The final output feature dimension is 39×1, and each graph neural network layer is nonlinearly activated by an activation function. transform.

损失函数设置。对网络的输出应用掩码,屏蔽除15节点外的其他维度数据,并通过Sigmoid函数得到最终预测值。利用最终预测值和标签计算损失函数,损失函数采用二分类交叉熵损失(BCEloss),表达式为:Loss function settings. Apply a mask to the output of the network, shield the data of other dimensions except 15 nodes, and get the final predicted value through the Sigmoid function. Use the final predicted value and label to calculate the loss function. The loss function adopts the binary cross entropy loss (BCEloss), and the expression is:

Figure BDA0003943818090000052
Figure BDA0003943818090000052

式中,N为样本总量,yn为真实值概率,取0或1,xn为预测值概率。In the formula, N is the total number of samples, y n is the probability of the real value, which is 0 or 1, and x n is the probability of the predicted value.

进一步地,设置好网络的学习率和各部分损失函数的权重,作为一种示例,利用深度pytorch训练上述卷积神经网络,直到损失收敛,生成训练模型。Furthermore, set the learning rate of the network and the weight of each part of the loss function. As an example, use the deep pytorch to train the above convolutional neural network until the loss converges to generate a training model.

确定网络结构之后,将训练数据输入到网络;After determining the network structure, input the training data to the network;

在网络训练阶段,学习率设置为0.0001,每经过50个epoch,优化方法采Adam方法,其中学习率设置为0.001,权值衰减设置为5e-4In the network training phase, the learning rate is set to 0.0001, and after every 50 epochs, the optimization method adopts the Adam method, in which the learning rate is set to 0.001, and the weight decay is set to 5e-4

进行训练,直至网络收敛,生成训练模型。Perform training until the network converges to generate a training model.

在利用测试集测试上述训练模型得到训练好的电网故障检测模型;在将电力系统中电网的待检测节点数据输入训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。Using the test set to test the above training model to obtain a trained grid fault detection model; input the data of the nodes to be detected in the power system into the trained grid fault detection model for grid node fault detection, and obtain the grid node fault detection results.

根据本发明实施例的基于图神经网络的电网故障检测方法,基于电网拓扑结构构建基于图的数据结构,高效进行数据特征提取。基于图神经网络的故障检测相较于传统方法速度更快,准确度更高。According to the grid fault detection method based on the graph neural network in the embodiment of the present invention, a graph-based data structure is constructed based on the grid topology, and data features are extracted efficiently. Fault detection based on graph neural network is faster and more accurate than traditional methods.

为了实现上述实施例,如图5所示,本实施例中还提供了基于图神经网络的电网故障检测装置10,该装置10包括:数据获取模块100、矩阵构建模块200、模型训练模块300和故障检测模块400。In order to realize the above embodiment, as shown in FIG. 5 , a grid fault detection device 10 based on a graph neural network is also provided in this embodiment, and the device 10 includes: a data acquisition module 100, a matrix construction module 200, a model training module 300 and Fault detection module 400.

数据获取模块100,用于构建电力系统中基于节点系统的图结构数据,并将图结构数据划分为训练集和测试集;The data acquisition module 100 is used to construct the graph structure data based on the node system in the power system, and divide the graph structure data into a training set and a test set;

矩阵构建模块200,用于基于图结构数据拓扑图和拓扑图节点之间的电气连接关系构建邻接矩阵;A matrix construction module 200, configured to construct an adjacency matrix based on the graph structure data topology graph and the electrical connection relationship between the topology graph nodes;

模型训练模块300,用于基于邻接矩阵和所述图结构数据构建图神经网络模型,利用训练集训练图神经网络模型得到电网故障检测模型,并利用测试集测试电网故障检测模型得到训练好的电网故障检测模型;The model training module 300 is used to construct a graph neural network model based on the adjacency matrix and the graph structure data, use the training set to train the graph neural network model to obtain a grid fault detection model, and use the test set to test the grid fault detection model to obtain a trained grid Fault detection model;

故障检测模块400,用于将电力系统中电网的待检测节点数据输入训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。The fault detection module 400 is used to input the data of the nodes to be detected in the power grid in the power system into the trained grid fault detection model to detect the faults of the grid nodes and obtain the detection results of the grid node faults.

进一步地,上述模型训练模块300,还用于:Further, the above-mentioned model training module 300 is also used for:

基于图神经网络和邻接矩阵度对图结构数据进行特征维度处理,输出第一维度数据;Based on the graph neural network and adjacency matrix degree, the feature dimension processing of the graph structure data is performed, and the first dimension data is output;

基于第一维度数据和预设处理方式得到第二维度数据,利用第二维度数据和预设函数得到最终预测值,利用最终预测值和标签计算损失函数以建图神经网络模型。The second-dimensional data is obtained based on the first-dimensional data and the preset processing method, the final predicted value is obtained by using the second-dimensional data and the preset function, and the loss function is calculated by using the final predicted value and labels to build a neural network model.

进一步地,数据获取模块100,还用于:Further, the data acquisition module 100 is also used for:

基于电力系统中电网故障发生时刻,过滤预设时刻的故障数据得到仿真数据;Based on the time when the power grid fault occurs in the power system, the fault data at the preset time is filtered to obtain the simulation data;

基于仿真数据获取故障态数据标签和非故障态数据标签,并到数据集样本。Based on the simulation data, the fault state data labels and non-fault state data labels are obtained, and the data set samples are obtained.

进一步地,数据获取模块100,还用于:Further, the data acquisition module 100 is also used for:

根据数据集样本的时序关系和预设比例,以每三个时间节点为一组,将前两个时间节点划分为训练集,后一个时间节点划分为测试集。According to the timing relationship and preset ratio of the data set samples, every three time nodes are divided into a group, and the first two time nodes are divided into training sets, and the latter time nodes are divided into test sets.

进一步地,损失函数采用二分类交叉熵损失,表达式为:Further, the loss function adopts the binary classification cross entropy loss, and the expression is:

Figure BDA0003943818090000061
Figure BDA0003943818090000061

式中,N为数据集样本的样本总量,yn为真实值概率,取0或1,xn为预测值概率。In the formula, N is the total number of samples in the data set, y n is the probability of the real value, which is 0 or 1, and x n is the probability of the predicted value.

根据本发明实施例的基于图神经网络的电网故障检测装置,基于电网拓扑结构构建基于图的数据结构,高效进行数据特征提取。基于图神经网络的故障检测相较于传统方法速度更快,准确度更高。According to the graph neural network-based power grid fault detection device of the embodiment of the present invention, a graph-based data structure is constructed based on the power grid topology, and data feature extraction is performed efficiently. Fault detection based on graph neural network is faster and more accurate than traditional methods.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.

尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention, those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.

Claims (10)

1.一种基于图神经网络的电网故障检测方法,其特征在于,包括以下步骤:1. A grid fault detection method based on graph neural network, is characterized in that, comprises the following steps: 构建电力系统中基于节点系统的图结构数据,并将所述图结构数据划分为训练集和测试集;Constructing graph structure data based on the node system in the power system, and dividing the graph structure data into a training set and a test set; 基于图结构数据拓扑图和拓扑图节点之间的电气连接关系构建邻接矩阵;Construct an adjacency matrix based on the graph structure data topology graph and the electrical connection relationship between the topology graph nodes; 基于所述邻接矩阵和所述图结构数据构建图神经网络模型,利用所述训练集训练图神经网络模型得到电网故障检测模型,并利用所述测试集测试所述电网故障检测模型得到训练好的电网故障检测模型;Constructing a graph neural network model based on the adjacency matrix and the graph structure data, using the training set to train the graph neural network model to obtain a power grid fault detection model, and using the test set to test the power grid fault detection model to obtain a trained model Grid fault detection model; 将电力系统中电网的待检测节点数据输入所述训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。Inputting the data of nodes to be detected in the grid in the power system into the trained grid fault detection model to detect grid node faults and obtain grid node fault detection results. 2.根据权利要求1所述的方法,其特征在于,所述基于邻接矩阵和所述图结构数据构建图神经网络模型,包括:2. The method according to claim 1, wherein said building a graph neural network model based on adjacency matrix and said graph structure data comprises: 基于图神经网络和邻接矩阵度对图结构数据进行特征维度处理,输出第一维度数据;Based on the graph neural network and adjacency matrix degree, the feature dimension processing of the graph structure data is performed, and the first dimension data is output; 基于所述第一维度数据和预设处理方式得到第二维度数据,利用所述第二维度数据和预设函数得到最终预测值,利用所述最终预测值和标签计算损失函数以建图神经网络模型。Obtain second-dimensional data based on the first-dimensional data and a preset processing method, use the second-dimensional data and preset functions to obtain a final predicted value, and use the final predicted value and labels to calculate a loss function to build a neural network Model. 3.根据权利要求2所述的方法,其特征在于,所述构建电力系统中基于节点系统的图结构数据,包括:3. The method according to claim 2, wherein the graph structure data based on the node system in the construction of the power system comprises: 基于电力系统中电网故障发生时刻,过滤预设时刻的故障数据得到仿真数据;Based on the time when the power grid fault occurs in the power system, the fault data at the preset time is filtered to obtain the simulation data; 基于所述仿真数据获取故障态数据标签和非故障态数据标签,并到数据集样本。Based on the simulation data, the fault state data label and the non-fault state data label are obtained, and the data set samples are obtained. 4.根据权利要求3所述的方法,其特征在于,所述将图结构数据划分为训练集和测试集,包括:4. The method according to claim 3, wherein said graph structure data is divided into a training set and a test set, comprising: 根据所述数据集样本的时序关系和预设比例,以每三个时间节点为一组,将前两个时间节点划分为训练集,后一个时间节点划分为测试集。According to the timing relationship and preset ratio of the data set samples, every three time nodes are used as a group, and the first two time nodes are divided into training sets, and the latter time nodes are divided into test sets. 5.根据权利要求4所述的方法,其特征在于,所述损失函数采用二分类交叉熵损失,表达式为:5. method according to claim 4, is characterized in that, described loss function adopts binary classification cross-entropy loss, and expression is:
Figure FDA0003943818080000021
Figure FDA0003943818080000021
式中,N为数据集样本的样本总量,yn为真实值概率,取0或1,xn为预测值概率。In the formula, N is the total number of samples in the data set, y n is the probability of the real value, which is 0 or 1, and x n is the probability of the predicted value.
6.一种基于图神经网络的电网故障检测装置,其特征在于,包括:6. A power grid fault detection device based on graph neural network, characterized in that, comprising: 数据获取模块,用于构建电力系统中基于节点系统的图结构数据,并将所述图结构数据划分为训练集和测试集;The data acquisition module is used to construct the graph structure data based on the node system in the power system, and divide the graph structure data into a training set and a test set; 矩阵构建模块,用于基于图结构数据拓扑图和拓扑图节点之间的电气连接关系构建邻接矩阵;A matrix building block for constructing an adjacency matrix based on the graph structure data topology graph and the electrical connection relationship between the nodes of the graph structure; 模型训练模块,用于基于所述邻接矩阵和所述图结构数据构建图神经网络模型,利用所述训练集训练图神经网络模型得到电网故障检测模型,并利用所述测试集测试所述电网故障检测模型得到训练好的电网故障检测模型;A model training module, configured to construct a graph neural network model based on the adjacency matrix and the graph structure data, use the training set to train the graph neural network model to obtain a grid fault detection model, and use the test set to test the grid fault The detection model obtains the trained grid fault detection model; 故障检测模块,用于将电力系统中电网的待检测节点数据输入所述训练好的电网故障检测模型进行电网节点故障检测,得到电网节点故障检测结果。The fault detection module is used to input the data of nodes to be detected in the grid in the power system into the trained grid fault detection model to detect grid node faults and obtain grid node fault detection results. 7.根据权利要求6所述的装置,其特征在于,所述模型训练模块,还用于:7. The device according to claim 6, wherein the model training module is also used for: 基于图神经网络和邻接矩阵度对图结构数据进行特征维度处理,输出第一维度数据;Based on the graph neural network and adjacency matrix degree, the feature dimension processing of the graph structure data is performed, and the first dimension data is output; 基于所述第一维度数据和预设处理方式得到第二维度数据,利用所述第二维度数据和预设函数得到最终预测值,利用所述最终预测值和标签计算损失函数以建图神经网络模型。Obtain second-dimensional data based on the first-dimensional data and a preset processing method, use the second-dimensional data and preset functions to obtain a final predicted value, and use the final predicted value and labels to calculate a loss function to build a neural network Model. 8.根据权利要求7所述的装置,其特征在于,所述数据获取模块,还用于:8. The device according to claim 7, wherein the data acquisition module is also used for: 基于电力系统中电网故障发生时刻,过滤预设时刻的故障数据得到仿真数据;Based on the time when the power grid fault occurs in the power system, the fault data at the preset time is filtered to obtain the simulation data; 基于所述仿真数据获取故障态数据标签和非故障态数据标签,并到数据集样本。Based on the simulation data, the fault state data label and the non-fault state data label are obtained, and the data set samples are obtained. 9.根据权利要求8所述的装置,其特征在于,所述数据获取模块,还用于:9. The device according to claim 8, wherein the data acquisition module is also used for: 根据所述数据集样本的时序关系和预设比例,以每三个时间节点为一组,将前两个时间节点划分为训练集,后一个时间节点划分为测试集。According to the timing relationship and preset ratio of the data set samples, every three time nodes are used as a group, and the first two time nodes are divided into training sets, and the latter time nodes are divided into test sets. 10.根据权利要求9所述的装置,其特征在于,所述损失函数采用二分类交叉熵损失,表达式为:10. The device according to claim 9, wherein the loss function adopts binary cross-entropy loss, and the expression is:
Figure FDA0003943818080000031
Figure FDA0003943818080000031
式中,N为数据集样本的样本总量,yn为真实值概率,取0或1,xn为预测值概率。In the formula, N is the total number of samples in the data set, y n is the probability of the real value, which is 0 or 1, and x n is the probability of the predicted value.
CN202211423487.5A 2022-11-15 2022-11-15 Power grid fault detection method and device based on graph neural network Pending CN115733730A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211423487.5A CN115733730A (en) 2022-11-15 2022-11-15 Power grid fault detection method and device based on graph neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211423487.5A CN115733730A (en) 2022-11-15 2022-11-15 Power grid fault detection method and device based on graph neural network

Publications (1)

Publication Number Publication Date
CN115733730A true CN115733730A (en) 2023-03-03

Family

ID=85296398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211423487.5A Pending CN115733730A (en) 2022-11-15 2022-11-15 Power grid fault detection method and device based on graph neural network

Country Status (1)

Country Link
CN (1) CN115733730A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116880451A (en) * 2023-07-20 2023-10-13 中国船舶集团有限公司综合技术经济研究院 Fault detection method, system and equipment for closed-loop control system of water jet propulsion device
CN116937758A (en) * 2023-09-19 2023-10-24 广州德姆达光电科技有限公司 Household energy storage power supply system and operation method thereof
CN117347781A (en) * 2023-10-07 2024-01-05 国网江苏省电力有限公司泰州供电分公司 Power distribution network fault detection method and system based on feature fusion
CN117872038A (en) * 2024-03-11 2024-04-12 浙江大学 A method and device for locating the source of instability fault in DC microgrid based on graph theory
CN117950906A (en) * 2024-03-27 2024-04-30 西南石油大学 A server failure cause inference method based on tabular graph neural network
CN118504066A (en) * 2024-03-07 2024-08-16 山东大学 Grouting intelligent simulation method and system based on topology relation mining
CN118584242A (en) * 2024-05-17 2024-09-03 西南大学 Power grid node fault diagnosis method and device based on deep hybrid neural network
CN118653990A (en) * 2024-08-20 2024-09-17 大连罗斯泵业有限公司 Real-time monitoring system and method for oil pump status based on sensor network
CN119269970A (en) * 2024-11-19 2025-01-07 国家电网有限公司技术学院分公司 Power grid topology fault location system based on graph neural network

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116880451A (en) * 2023-07-20 2023-10-13 中国船舶集团有限公司综合技术经济研究院 Fault detection method, system and equipment for closed-loop control system of water jet propulsion device
CN116937758A (en) * 2023-09-19 2023-10-24 广州德姆达光电科技有限公司 Household energy storage power supply system and operation method thereof
CN116937758B (en) * 2023-09-19 2023-12-19 广州德姆达光电科技有限公司 Household energy storage power supply system and operation method thereof
CN117347781A (en) * 2023-10-07 2024-01-05 国网江苏省电力有限公司泰州供电分公司 Power distribution network fault detection method and system based on feature fusion
CN118504066B (en) * 2024-03-07 2024-11-22 山东大学 Grouting intelligent simulation method and system based on topological relationship mining
CN118504066A (en) * 2024-03-07 2024-08-16 山东大学 Grouting intelligent simulation method and system based on topology relation mining
CN117872038B (en) * 2024-03-11 2024-05-17 浙江大学 DC micro-grid instability fault source positioning method and device based on graph theory
CN117872038A (en) * 2024-03-11 2024-04-12 浙江大学 A method and device for locating the source of instability fault in DC microgrid based on graph theory
CN117950906B (en) * 2024-03-27 2024-06-04 西南石油大学 A server failure cause inference method based on tabular graph neural network
CN117950906A (en) * 2024-03-27 2024-04-30 西南石油大学 A server failure cause inference method based on tabular graph neural network
CN118584242A (en) * 2024-05-17 2024-09-03 西南大学 Power grid node fault diagnosis method and device based on deep hybrid neural network
CN118653990A (en) * 2024-08-20 2024-09-17 大连罗斯泵业有限公司 Real-time monitoring system and method for oil pump status based on sensor network
CN118653990B (en) * 2024-08-20 2024-12-10 大连罗斯泵业有限公司 Real-time monitoring system and method for oil pump status based on sensor network
CN119269970A (en) * 2024-11-19 2025-01-07 国家电网有限公司技术学院分公司 Power grid topology fault location system based on graph neural network

Similar Documents

Publication Publication Date Title
CN115733730A (en) Power grid fault detection method and device based on graph neural network
CN117290800B (en) Timing sequence anomaly detection method and system based on hypergraph attention network
CN106779069A (en) A kind of abnormal electricity consumption detection method based on neutral net
Krzysztofowicz et al. Fusion of detection probabilities and comparison of multisensor systems
CN108921301A (en) A kind of machine learning model update method and system based on self study
CN114186900A (en) Fire risk assessment method and device based on cloud model and fuzzy Bayesian network
CN117151649B (en) Construction method management and control system and method based on big data analysis
CN110213087B (en) Complex system fault positioning method based on dynamic multilayer coupling network
CN117805658B (en) Data-driven electric vehicle battery remaining life prediction method
CN115481726A (en) A method and system for evaluating the health of an industrial robot
Jiang et al. Real-time intelligent elevator monitoring and diagnosis: Case studies and solutions with applications using artificial intelligence
CN119089342A (en) A time series anomaly detection method based on reconstruction and prediction
CN115438897A (en) Industrial process product quality prediction method based on BLSTM neural network
CN114580474A (en) Transformer sound vibration fault diagnosis method, system, equipment and storage medium
CN112862211A (en) Method and device for assigning orders of dynamic ring defects of communication management system
CN118193954A (en) A method and system for detecting abnormal data in distribution network based on edge computing
CN115907079B (en) Airspace traffic flow prediction method based on attention space-time diagram convolutional network
CN111488711A (en) Network robustness assessment method and system
CN118152945A (en) Hydropower station auxiliary equipment fault positioning method based on component topological graph
CN117131407A (en) Relay protection strategy generation method, device, electronic equipment and storage medium
CN117746090A (en) A self-organized criticality identification method for power systems based on graph convolutional neural network
CN117669656A (en) TCN-Semi PN-based direct-current micro-grid stability real-time monitoring method and device
CN117745057A (en) A security risk assessment method for dispatch automation systems based on graph neural network
CN116578858A (en) Air compressor fault prediction and health degree evaluation method and system based on graphic neural network
CN113688171B (en) A method and system for train braking fault detection based on graph convolutional neural network

Legal Events

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