Microgrid accident early warning method and device and electronic equipment
Patent Information
- Application Number
- CN202611168220.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]本申请实施例提供了一种微电网事故预警方法、装置及电子设备,以至少解决仅依赖于固定阈值、仅关注单点指标进行微电网事故预警,难以适应工况变化,易漏报或误报,导致预警结果不准确的技术问题
[0021]在本申请实施例中,采用获取微电网的电气量数据集,其中,电气量数据集包括在多个采样时刻下,微电网的多个节点分别对应的电气量数据;依据电气量数据集生成点云序列,其中,点云序列中的每个数据点对应多个采样时刻中的一个采样时刻;对点云序列中目标时间窗口内的目标点云进行特征提取,得到目标拓扑特征向量,其中,目标点云由点云序列中目标时间窗口内的多个数据点组成,目标拓扑特征向量用于指示目标点云在多维空间中的几何形态及连通结构;依据目标拓扑特征向量进行微电网异常检测,得到预警结果,其中,预警结果至少包括以下之一:事故类型、预警等级的方式,通过构建点云序列提取目标点云的拓扑特征,得到指示目标时间窗口内的目标点云在多维空间中的几何形态及连通结构的目标拓扑特征向量,进而基于此进行异常检测,得到预警结果,达到了在预警时不依赖精确物理模型、不依赖于固定阈值且同时关注多节点的指标的目的,进而解决了仅依赖于固定阈值、仅关注单点指标进行微电网事故预警,难以适应工况变化,易漏报或误报,导致预警结果不准确的技术问题。
Smart Images

Figure CN122990913A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of microgrid monitoring, and more specifically, to a method, device, and electronic equipment for early warning of microgrid accidents. Background Technology
[0002] With the large-scale integration of distributed power sources and power electronic devices, microgrids exhibit highly nonlinear, multivariate coupling, and strong uncertainty characteristics in their operation. Early fault warning is crucial for ensuring the safe and stable operation of the power grid during microgrid operation. Currently, microgrid fault warning methods primarily rely on analytical methods based on physical models or data-driven single-point index threshold methods. However, as the scale and complexity of microgrids increase, these methods suffer from the following significant drawbacks in practical applications:
[0003] Fixed electrical quantity thresholds (such as voltage exceedances, frequency exceedances, and power fluctuation ranges) are set to determine the system status. However, the operating conditions of microgrids are complex and variable, and the fluctuation range of normal conditions varies greatly under different operating modes. Fixed thresholds are difficult to adapt to dynamic changes in operating conditions and are prone to generating false alarms during normal fluctuations.
[0004] Focusing only on changes in a single node or a single electrical indicator fails to capture the correlation changes between multiple nodes, resulting in a lack of global perception capability and insufficient warning sensitivity in the early warning system.
[0005] Early warning methods based on physical models require the establishment of accurate mathematical models of microgrids and the accurate acquisition of parameters such as line parameters and load characteristics. However, the topology of microgrids changes frequently, parameters are uncertain, and accurate modeling is difficult and computationally costly. When system parameters drift or the model mismatches, the reliability of model-based early warnings will be significantly reduced.
[0006] There is currently no effective solution to the above problems. Summary of the Invention
[0007] This application provides a microgrid accident early warning method, device, and electronic device to at least solve the technical problem that relying solely on fixed thresholds and focusing only on single-point indicators for microgrid accident early warning makes it difficult to adapt to changes in operating conditions, easily leads to missed or false alarms, and results in inaccurate early warning results.
[0008] According to one aspect of the embodiments of this application, a microgrid accident early warning method is provided, comprising: acquiring an electrical quantity dataset of a microgrid, wherein the electrical quantity dataset includes electrical quantity data corresponding to multiple nodes of the microgrid at multiple sampling times; generating a point cloud sequence based on the electrical quantity dataset, wherein each data point in the point cloud sequence corresponds to one sampling time among multiple sampling times; extracting features from a target point cloud within a target time window in the point cloud sequence to obtain a target topology feature vector, wherein the target point cloud is composed of multiple data points within the target time window in the point cloud sequence, and the target topology feature vector is used to indicate the geometric shape and connectivity structure of the target point cloud in multidimensional space; and performing microgrid anomaly detection based on the target topology feature vector to obtain an early warning result, wherein the early warning result includes at least one of the following: accident type and early warning level.
[0009] Optionally, generating a point cloud sequence based on the electrical quantity dataset includes: determining data points corresponding to multiple sampling times based on the electrical quantity data, wherein the data point corresponding to each sampling time is a high-dimensional vector composed of electrical quantity data of multiple nodes at the corresponding sampling time, and the dimension of the high-dimensional vector is equal to the product of the total number of nodes and the number of features contained in the electrical quantity data; sorting the data points corresponding to the multiple sampling times in order from first to last to obtain the point cloud sequence.
[0010] Optionally, feature extraction is performed on the target point cloud within the target time window in the point cloud sequence to obtain a target topological feature vector, including: generating a target persistent barcode corresponding to the target point cloud using a first algorithm, and extracting features from the target persistent barcode to obtain a first topological feature vector, wherein the first topological feature vector includes multiple numerical features; processing the target point cloud using a second algorithm to generate a target graph structure, and extracting features from the target graph structure to obtain a second topological feature vector; and determining the combination of the first topological feature vector and the second topological feature vector as the target topological feature vector.
[0011] Optionally, microgrid anomaly detection is performed based on the target topology feature vector to obtain early warning results, including: acquiring the historical persistent barcode, historical graph structure, and historical topology feature vector corresponding to the point cloud within the target historical time window, wherein the target historical time window is the time window preceding the target time window; performing topology structure anomaly detection based on the target persistent barcode and historical persistent barcode corresponding to the first topology feature vector to obtain a first type of detection result; performing graph structure anomaly detection based on the second topology feature vector, the second historical topology feature vector, the target graph structure, and the historical graph structure to obtain a second type of detection result, wherein the second historical topology feature vector includes multiple graph structure features; and acquiring the first mean value corresponding to each of the multiple features in the first topology feature vector. The first standard deviation and the second mean and second standard deviation corresponding to multiple features in the second topological feature vector are used to perform feature anomaly detection based on the first topological feature vector, the first mean and first standard deviation corresponding to multiple features in the first topological feature vector, and the second mean and second standard deviation corresponding to multiple features in the second topological feature vector, to obtain a third type of detection result. In this case, the first mean of each feature in the first topological feature vector is the mean of the feature value of that feature in multiple historical time windows, and the first standard deviation of each feature in the first topological feature vector is the standard deviation of the feature value of that feature in multiple historical time windows. The warning result is determined based on at least one of the first type of detection result, the second type of detection result, and the third type of detection result.
[0012] Optionally, topological anomaly detection is performed based on the target persistent barcode and historical persistent barcode corresponding to the first topological feature vector to obtain a first type of detection result, including: converting the target persistent barcode and historical persistent barcode into a target persistent map and a historical persistent map, respectively, and determining the metric distance between the target persistent map and the historical persistent map in the metric space; if the metric distance is greater than a preset distance threshold, the first type of detection result is determined as a first type of anomaly result, wherein the first type of anomaly result is an anomaly pattern corresponding to the target topological feature vector that is a global topological anomaly.
[0013] Optionally, graph structure anomaly detection is performed based on the second topological feature vector, the second historical topological feature vector in the historical topological feature vector, the target graph structure, and the historical graph structure to obtain a second type of detection result, including: determining the incremental value between the number of connected components in the second topological feature vector and the number of historical connected components in the second historical topological feature vector; determining the graph similarity between the target graph structure and the historical graph structure; and determining the second type of detection result as a second type of anomaly result if the incremental value is greater than or equal to a preset incremental threshold or the graph similarity is less than a preset similarity threshold, wherein the second type of anomaly result is the anomaly pattern corresponding to the target topological feature vector as a graph structure anomaly.
[0014] Optionally, feature anomaly detection is performed based on the first topological feature vector, the first mean and the first standard deviation corresponding to multiple features in the first topological feature vector, and the second topological feature vector, the second mean and the second standard deviation corresponding to multiple features in the second topological feature vector, to obtain a third type of detection result. This includes: when any feature in the first topological feature vector or any feature in the second topological feature vector satisfies a preset anomaly condition, the third type of detection result is determined as a third type of anomaly result. The preset anomaly condition is that the absolute value of the difference between the target feature and the corresponding first mean or second mean is greater than a preset multiple of the first standard deviation or second standard deviation corresponding to the target feature. The third type of anomaly result is that the anomaly pattern corresponding to the target topological feature vector is anomaly in feature value, and the target feature is any feature in the first topological feature vector or any feature in the second topological feature vector.
[0015] Optionally, the warning result is determined based on at least one of the first type of detection result, the second type of detection result, and the third type of detection result, including: determining the accident type and warning level based on at least one of the first type of detection result, the second type of detection result, and the third type of detection result; determining abnormal electrical quantity data from the electrical quantity dataset based on the accident type, and determining the node with the highest deviation contribution in the abnormal electrical quantity data as the predicted accident location, wherein the deviation contribution is used to indicate the limit of the data value corresponding to the node exceeding the normal range; obtaining the preset handling suggestions corresponding to the warning level; and determining the set consisting of the accident type, the warning level, the predicted accident location, and the preset handling suggestions as the warning result.
[0016] Optionally, the accident type and warning level are determined based on at least one of the first, second, and third type of detection results, including: If only the third type of detection result is detected as a third-type abnormal result, the accident type is determined to be a third-type accident type, wherein the third-type abnormal result is an abnormal mode corresponding to the target topology feature vector where the feature value is abnormal, and the third-type accident type indicates an abnormal equipment status in the microgrid system, wherein the abnormal equipment status includes at least one of the following: parameter aging, equipment degradation, and the warning level corresponding to the third-type accident type is Level 1; If only the first type of detection result is detected as a first-type abnormal result, the accident type is determined to be a first-type accident type, wherein the first-type abnormal result is an abnormal mode corresponding to the target topology feature vector where the global topology is abnormal, and the first-type accident type indicates an abnormal operation in the microgrid system, and the warning level corresponding to the first-type accident type is Level 2. Level 1 and Level 2 warnings are more severe than Level 1. If only one of the two types of detection results is a Type 2 anomaly, the accident type is determined to be Type 2. Type 2 anomalies are defined as graph structure anomalies corresponding to the target topology feature vector. Type 2 accidents indicate local connectivity anomalies in the microgrid system, where connectivity anomalies include at least one of the following: network topology splitting or line disconnection. The warning level for Type 2 accidents is Level 2. If at least two of the following types of anomalies are detected simultaneously, the accident type is determined to be Type 4. Type 4 accidents indicate global anomalies in the microgrid system. The warning level for Type 4 accidents is Level 3, and the warning level for Level 3 is more severe than Level 2: Type 1 detection results are Type 1 anomalies, Type 2 detection results are Type 2 anomalies, and Type 3 detection results are Type 3 anomalies.
[0017] According to another aspect of the embodiments of this application, a microgrid accident early warning device is also provided, comprising: an acquisition module for acquiring an electrical quantity dataset of a microgrid, wherein the electrical quantity dataset includes electrical quantity data corresponding to multiple nodes of the microgrid at multiple sampling times; a generation module for generating a point cloud sequence based on the electrical quantity dataset, wherein each data point in the point cloud sequence corresponds to one sampling time among multiple sampling times; an extraction module for extracting features from a target point cloud in the point cloud sequence to obtain a target topology feature vector, wherein the target point cloud is composed of multiple data points within a target time window in the point cloud sequence, and the target topology feature vector is used to indicate the geometric shape and connectivity structure of the target point cloud in multidimensional space; and a detection module for detecting microgrid anomalies based on the target topology feature vector to obtain an early warning result, wherein the early warning result includes at least one of the following: accident type and early warning level.
[0018] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, wherein a program is stored in the non-volatile storage medium, and the program controls the device where the non-volatile storage medium is located to execute the above-mentioned microgrid fault early warning method when it runs.
[0019] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the above-described microgrid fault early warning method when it runs.
[0020] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions, which, when executed by a processor, implement the above-described microgrid fault early warning method.
[0021] In this embodiment, an electrical quantity dataset of a microgrid is obtained, comprising electrical quantity data corresponding to multiple nodes of the microgrid at multiple sampling times. A point cloud sequence is generated based on the electrical quantity dataset, wherein each data point in the point cloud sequence corresponds to one sampling time among multiple sampling times. Feature extraction is performed on the target point cloud within a target time window in the point cloud sequence to obtain a target topology feature vector. The target point cloud is composed of multiple data points within the target time window in the point cloud sequence, and the target topology feature vector indicates the geometric shape and connectivity structure of the target point cloud in multidimensional space. Microgrid anisotropy is then performed based on the target topology feature vector. Regular detection yields early warning results, which include at least one of the following: accident type, early warning level, etc. By constructing a point cloud sequence to extract the topological features of the target point cloud, the topological feature vector of the target point cloud in multidimensional space is obtained, indicating the geometric shape and connectivity of the target point cloud within the target time window. Based on this, anomaly detection is performed to obtain early warning results. This achieves the goal of not relying on a precise physical model or a fixed threshold during early warning, while simultaneously focusing on the indicators of multiple nodes. This solves the technical problem that relying solely on fixed thresholds and focusing only on single-point indicators for microgrid accident early warning makes it difficult to adapt to changes in operating conditions, easily leads to missed or false alarms, and results in inaccurate early warning results. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0023] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a microgrid accident early warning method, according to an embodiment of this application.
[0024] Figure 2This is a flowchart of a microgrid fault early warning method provided according to an embodiment of this application;
[0025] Figure 3 This is a flowchart of another microgrid fault early warning method provided according to an embodiment of this application;
[0026] Figure 4 This is a schematic diagram of a microgrid accident early warning device provided according to an embodiment of this application. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0028] The information collected in this application embodiment is information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant regions, and necessary confidentiality measures have been taken. It does not violate public order and good morals, and provides corresponding operation entry points for users to choose to authorize or reject the automated decision results. If the user chooses to reject, the process will proceed to the expert decision-making process.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:
[0031] A microgrid is a local power grid consisting of distributed power sources (such as photovoltaic power generation, wind power generation, and diesel generators), energy storage devices (such as battery energy storage and supercapacitors), loads, and related control and protection equipment. A microgrid can operate in parallel with the external power grid or independently as an island. In this application, the microgrid includes several key nodes, which are the objects of electrical quantity data acquisition and topology analysis.
[0032] In related technologies, microgrid fault early warning methods mainly rely on analytical methods based on physical models or data-driven single-point index threshold methods. Therefore, there are technical problems with relying solely on fixed thresholds and focusing only on single-point indicators for microgrid fault early warning, making it difficult to adapt to changes in operating conditions, prone to missed or false alarms, and resulting in inaccurate early warning results. To address this problem, this application provides relevant solutions, which are detailed below.
[0033] According to an embodiment of this application, an embodiment of a microgrid fault early warning method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0034] The methods and embodiments provided in this application can be executed on a computer terminal or similar computing device.
[0035] Figure 1 A hardware block diagram of a computer terminal for implementing a microgrid fault early warning method is shown. Figure 1 As shown, the computer terminal 10 may include a processor 102, a memory 104 for storing data, and a transmission module 106 for communication functions. The processor 102 may include one or more processors. For ease of explanation, Figure 1 The diagram illustrates multiple processors, including a first processor 102a, a second processor 102b, ..., an nth processor 102n. The processor 102 may be a processing device including, but not limited to, a microcontroller unit (MCU) or a field-programmable gate array (FPGA).
[0036] In addition, a computer terminal may also include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0037] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits may be referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As described in the embodiments of this application, the data processing circuits serve as a form of processor control (e.g., selection of a variable resistor termination path connected to an interface).
[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the microgrid accident early warning method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned microgrid accident early warning method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0039] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for data interaction with external networks or devices via wired and / or wireless network connections.
[0040] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10. In addition, the computer terminal 10 can also connect to a cursor control device and a keyboard via an input / output interface. The cursor control device (e.g., a mouse, trackball, or touchpad) is mainly used to transmit directional information and command selections to the terminal and control the movement of the cursor on the display; the keyboard is mainly used to receive letters, numbers, and other control commands input by the user, thereby enabling interaction between the user and the computer terminal 10.
[0041] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.
[0042] Under the above operating environment, embodiments of this application provide a microgrid fault early warning method, such as... Figure 2 The diagram shown is a flowchart of a microgrid fault early warning method according to an embodiment of this application, including:
[0043] Step S202: Obtain the electrical quantity dataset of the microgrid. The electrical quantity dataset includes electrical quantity data corresponding to multiple nodes of the microgrid at multiple sampling times.
[0044] In the technical solution provided in step S202, multiple nodes requiring real-time monitoring are determined based on the physical topology and protection and control requirements of the microgrid. These multiple nodes include, but are not limited to, distributed power sources (such as photovoltaic inverters, wind turbine converters, and diesel generators), energy storage system interfaces, critical load connection points, and tie-line switches. In this embodiment, the characteristics of the electrical quantity data include, but are not limited to, voltage amplitude, frequency, active power, and reactive power.
[0045] In some embodiments of this application, steps S202-S208 can be a continuously executed process. In step S202, each sampling time interval is preset for a certain duration. At each sampling time, electrical quantity data is collected by synchronous measurement terminals deployed at multiple nodes, and time synchronization is performed at the microsecond level via GPS / BeiDou time synchronization to ensure strict consistency of the sampling time of the data from each node. Through the above step S202, a high-precision electrical quantity dataset containing multiple nodes, multiple features, and strict time synchronization is obtained. This dataset not only retains information such as the amplitude and frequency of electrical quantities at each node, but also ensures the spatiotemporal correspondence of data from multiple nodes through time synchronization, laying a solid data foundation for subsequently mapping electrical quantities into geometric point clouds in high-dimensional space.
[0046] Step S204: Generate a point cloud sequence based on the electrical quantity dataset. Each data point in the point cloud sequence corresponds to one of multiple sampling times.
[0047] In the technical solution provided in step S204, there are multiple ways to generate a point cloud sequence based on the electrical quantity dataset. For example, the data points corresponding to multiple sampling times are determined based on the electrical quantity data. The data point corresponding to each sampling time is a high-dimensional vector composed of electrical quantity data of multiple nodes at the corresponding sampling time. The dimension of the high-dimensional vector is equal to the product of the total number of nodes and the number of features contained in the electrical quantity data. The data points corresponding to multiple sampling times are sorted according to the order of sampling time from first to last to obtain the point cloud sequence.
[0048] To extract global geometric features of the system (such as connectivity and ring structure) using topology data analysis techniques, time-series data must be mapped to a set of points in a multidimensional space. Therefore, step S204 aims to construct a point cloud sequence that evolves over time by combining the multidimensional electrical quantities of all nodes at each sampling moment into a high-dimensional vector. This transforms the dynamic operation of the microgrid into a geometric evolution trajectory in a high-dimensional space, providing standardized data input for subsequent topology feature extraction. The implementation process of step S204 is as follows:
[0049] Step S204.1: Determine the data points corresponding to multiple sampling times based on the electrical quantity data: Standardize the electrical quantity data at multiple sampling times in the electrical quantity dataset to obtain standardized electrical quantity data corresponding to each sampling time. After standardization, the high-dimensional vector formed by combining the electrical quantity data of multiple nodes at each sampling time is determined as the data point for that sampling time. Assume the microgrid has... There are 1 monitoring node, and each node collects data. The first characteristic (such as voltage amplitude, frequency, active power, etc.) then the second characteristic (such as voltage amplitude, frequency, active power, etc.) Data points at any sampling time (t is any sampling time) can be represented as a high-dimensional column vector. ,in The point cloud sequence is represented as X = ( - (T)), where T is the last sampling time among multiple sampling times.
[0050] Because different features have vastly different dimensions—for example, voltage (1.0 kV per unit), frequency (approximately 50 Hz), and active power (kW / MW)—directly calculating the Euclidean distance would cause low-dimensional features to be overwhelmed by high-dimensional features. Therefore, the process of standardizing electrical quantity data at multiple sampling times in the electrical quantity dataset involves performing Z-score standardization or per-unit normalization on each feature dimension to bring all features to the same numerical order of magnitude, thus eliminating the impact of dimensional differences on subsequent topology analysis.
[0051] Step S204.2: Combine the standardized data points from multiple sampling times into a point cloud sequence. The target point cloud within the target time window in the point cloud sequence is then... ,in, Where W is the current time, and W is the total length of the target time window, selected according to the warning time requirements, such as 10-50 sampling points. The start time of the target time window Until the end time All standardized data points within the target time window. It should be noted that the target time window is a sliding window. As time progresses, the current time... Increasing by 1 causes the window to slide backward one step, generating a new set of target point clouds. This sliding mechanism ensures that the early warning system can continuously and in real-time acquire the latest local topology information.
[0052] Step S206: Feature extraction is performed on the target point cloud to obtain the target topological feature vector. The target topological feature vector indicates the geometric shape and connectivity of the target point cloud in multidimensional space.
[0053] In the technical solution provided in step S206, there are multiple ways to extract features from the target point cloud to obtain the target topological feature vector. For example, a first algorithm is used to generate a persistent barcode corresponding to the target point cloud, and features are extracted from the persistent barcode to obtain a first topological feature vector, wherein the first topological feature vector includes multiple numerical features; a second algorithm is used to process the target point cloud to generate a target graph structure, and features are extracted from the target graph structure to obtain a second topological feature vector; the combination of the first topological feature vector and the second topological feature vector is determined as the target topological feature vector.
[0054] In some embodiments of this application, to comprehensively describe the geometric morphology and connectivity of the target point cloud in multidimensional space, step S206 employs two complementary topological data analysis algorithms to extract features from two dimensions: global persistent homology and local manifold structure. The first algorithm is a persistent homology algorithm, which can quantify the topological invariants of the point cloud at different scales, especially the changes in connected components and ring structures, and is suitable for global anomaly detection without prior knowledge. The second algorithm is the Mapper algorithm, which can reveal the local geometric structure of data points and the connectivity between nodes in low-dimensional space through dimensionality reduction and clustering, and is suitable for directional analysis with clear physical priors (such as frequency deviation and power oscillation). The two algorithms are used in parallel and complement each other.
[0055] The process of generating a persistent barcode corresponding to the target point cloud using the first algorithm, and extracting features from the persistent barcode to obtain the first topological feature vector is as follows:
[0056] The continuous cohomology algorithm is used to standardize the target point cloud. Using the Euclidean distance between any two points as a metric, a non-negative real parameter is defined. For a given non-negative real parameter, if the distance between two points is less than or equal to the non-negative real parameter, an edge is established between the two points. If all pairwise distances between a set of points are less than or equal to the non-negative real parameter, then this set of points constitutes a simplex. As the non-negative real parameter gradually increases from 0, these simplexes gradually connect and merge, forming a series of nested simplex sequences, namely the Vietoris-Rips complex sequence. For this complex sequence, the Betti number is calculated in different dimensions. The Betti-0 number represents the number of connected components in the point cloud, reflecting the overall connectivity of the microgrid system; the Betti-1 number represents the number of 1-dimensional loops (loops) in the point cloud, reflecting oscillations or cyclic dependencies in the system. For each topological feature (such as a connected component or a cycle), record its birth time (a non-negative real number parameter indicating the first occurrence of the feature) and death time (a non-negative real number parameter indicating whether the feature merges with other features or disappears). Plot these (birth time, death time) pairs on a persistence graph and convert them into target persistence barcodes, where the length of each barcode represents the persistence of the feature.
[0057] The next step is to extract key numerical features from the target persistent barcode to construct the first topological feature vector. These key numerical features include at least the following: The sum of the survival durations of all connected branches except the global connected branch (which survives to infinity) reflects the complexity of the microgrid system's connectivity structure. : The total durability length of all 1D rings (the sum of the death times and birth times of each ring). The sum of the persistence of all topological features (Betti-0 and Betti-1) characterizes the complexity and stability of the overall point cloud structure.
[0058] The process of using the second algorithm to process the target point cloud, generating the target map structure, and extracting features from the target map structure to obtain the second topological feature vector is as follows:
[0059] One or more electrical quantities with clear physical meaning are selected as filtering functions, such as the frequency or power of all nodes. The high-dimensional target point cloud is mapped to a low-dimensional space (1D or 2D) through the filtering function. The projected space is then covered, and clustered to obtain interconnected simplex complexes, forming a Mapper graph (i.e., the target graph structure). Feature extraction is performed on the target graph structure to obtain a second topological feature vector. The second topological feature vector includes at least the following graph structure features: the number of connected components in the graph (the number of connected components in the Mapper graph); the degree of all nodes in the graph (the number of connected edges), and the mean, variance, or histogram features of the degree are extracted to obtain the degree distribution of the nodes in the graph; and the number of cycles in the graph (the number of independent cycles in the Mapper graph).
[0060] Through the above steps, the target topological feature vector is extracted by using two complementary algorithms, providing rich and comprehensive feature input for subsequent anomaly detection.
[0061] Step S208 involves performing microgrid anomaly detection based on the target topology feature vector to obtain an early warning result. The early warning result includes at least one of the following: fault type and early warning level. To achieve early warning of microgrid faults, it is necessary to identify abnormal patterns in the topology features. A single static threshold judgment is difficult to adapt to changes in operating conditions and is easily affected by noise interference. Therefore, this embodiment adopts a multi-dimensional anomaly detection strategy, comprehensively judging from three levels: macroscopic topology changes, local graph structure abrupt changes, and microscopic statistical feature drift. Step S208 first executes three different types of anomaly detection in parallel and determines the final early warning result based on at least one of the above three detection results.
[0062] In the technical solution provided in step S208, microgrid anomaly detection is performed based on the target topology feature vector to obtain early warning results. This includes: acquiring the historical persistent barcode, historical graph structure, and historical topology feature vector corresponding to the point cloud within the target historical time window, wherein the target historical time window is the time window preceding the target time window; performing topology structure anomaly detection based on the target persistent barcode and historical persistent barcode corresponding to the first topology feature vector to obtain a first type of detection result; performing graph structure anomaly detection based on the second topology feature vector, the second historical topology feature vector, the target graph structure, and the historical graph structure to obtain a second type of detection result, wherein the second historical topology feature vector includes multiple graph structure features; acquiring the first mean and first standard deviation corresponding to multiple features in the first topology feature vector, and the second mean and second standard deviation corresponding to multiple features in the second topology feature vector. Based on the first topological feature vector, the first mean and first standard deviation corresponding to multiple features in the first topological feature vector, and the second topological feature vector, the second mean and second standard deviation corresponding to multiple features in the second topological feature vector, feature anomaly detection is performed to obtain a third type of detection result. Specifically, the first mean of each feature in the first topological feature vector is the mean of the feature value over multiple historical time windows, and the first standard deviation of each feature in the first topological feature vector is the standard deviation of the feature value over multiple historical time windows; the second mean of each feature in the second topological feature vector is the mean of the feature value over multiple historical time windows, and the second standard deviation of each feature in the second topological feature vector is the standard deviation of the feature value over multiple historical time windows; and a warning result is determined based on at least one of the first type of detection result, the second type of detection result, and the third type of detection result.
[0063] Before performing anomaly detection, it is necessary to establish a historical baseline for the current state. This involves acquiring the historical persistent barcodes, historical graph structures, and historical topological feature vectors corresponding to the point cloud within the target historical time window. The target historical time window is the previous time window, i.e., the sliding window moves to the window preceding the target time window. The methods for acquiring the historical persistent barcodes are the same as those for determining the target persistent barcodes, acquiring the historical graph structures are the same as those for determining the target graph structures, and acquiring the historical topological feature vectors are the same as those for determining the target topological feature vectors; these methods will not be elaborated further here. This historical data reflects the state of the microgrid at the previous moment and serves as a comparison baseline for anomaly detection at the current moment.
[0064] In step S208 above, topological anomaly detection is performed based on the target persistent barcode and historical persistent barcode corresponding to the first topological feature vector to obtain a first type of detection result. This includes: converting the target persistent barcode and historical persistent barcode into a target persistent map and a historical persistent map, respectively, and determining the metric distance between the target persistent map and the historical persistent map in the metric space; if the metric distance is greater than a preset distance threshold, the first type of detection result is determined as a first type of anomaly result, wherein the first type of anomaly result is an anomaly pattern corresponding to the target topological feature vector that is a global topological anomaly. The process of obtaining the first type of anomaly detection result is further explained below:
[0065] First, the target persistent barcode and the historical persistent barcode are converted into a target persistent graph and a historical persistent graph, respectively. Each point in the persistent graph corresponds to a topological feature (such as a connected component or a cycle).
[0066] The next step is to determine the metric distance between the target persistence graph and the historical persistence graph within the metric space, using adjacent time windows. The Wasserstein distance (or Bottleneck distance) can be used to quantify the magnitude of topological changes. If the metric distance exceeds a preset threshold, the first type of detection result is identified as a first type of anomaly. Taking Wasserstein as an example:
[0067] The conditions for classifying a Type I detection result as a Type I abnormal result are: ,in For the target persistence graph, For historical persistence, This is the Wasserstein distance (i.e., the metric distance). A preset distance threshold is used. The first type of anomaly result is the anomaly pattern corresponding to the target topological feature vector, which is a global topological anomaly.
[0068] In step S208 above, graph structure anomaly detection is performed based on the second topological feature vector, the second historical topological feature vector in the historical topological feature vector, the target graph structure, and the historical graph structure to obtain a second type of detection result. This includes: determining the increment value between the number of connected components in the second topological feature vector and the number of historical connected components in the second historical topological feature vector; determining the graph similarity between the target graph structure and the historical graph structure; and determining the second type of detection result as a second type of anomaly result if the increment value is greater than or equal to a preset increment threshold or the graph similarity is less than a preset similarity threshold. The second type of anomaly result is defined as an anomaly pattern corresponding to the target topological feature vector that is a graph structure anomaly. The process of obtaining the second type of anomaly detection result is further explained below:
[0069] Method 1: Extract the number of connected components from the second topological feature vector, and extract the number of historical connected components from the second historical topological feature vector. Calculate the increment between the two. If the detected incremental value is greater than or equal to a preset incremental threshold (e.g., 1), the second type of detection result is determined as the second type of abnormal result. The second type of abnormal result is the abnormal pattern corresponding to the target topological feature vector as graph structure abnormality.
[0070] Method 2: Use graph edit distance or Jaccard similarity method to determine the graph similarity between the target graph structure and the historical graph structure. If the graph similarity is less than the preset similarity threshold (0.6), the second type of detection result is identified as the second type of abnormal result.
[0071] In step S208 above, feature anomaly detection is performed based on the first topological feature vector, the first mean and first standard deviation corresponding to multiple features in the first topological feature vector, and the second topological feature vector, the second mean and second standard deviation corresponding to multiple features in the second topological feature vector, to obtain a third type of detection result. This includes: if any feature in the first topological feature vector or any feature in the second topological feature vector satisfies a preset anomaly condition, the third type of detection result is determined as a third type of anomaly result. The preset anomaly condition is that the absolute value of the difference between the target feature and its corresponding first or second mean is greater than a preset multiple of the first or second standard deviation corresponding to the target feature. The third type of anomaly result is that the anomaly pattern corresponding to the target topological feature vector is an abnormal feature value, and the target feature is any feature in the first topological feature vector or any feature in the second topological feature vector. The process of obtaining the third type of anomaly detection result is further explained below:
[0072] The process of obtaining the first mean and first standard deviation corresponding to multiple features in the first topological feature vector is as follows:
[0073] Obtain a preset number (e.g., 10) of historical time windows prior to the target time window (multiple historical time windows should ensure the microgrid is in normal operation, i.e., the historical mode corresponding to a fault-free microgrid system). For each historical time window, extract its corresponding historical first topology feature vector. This historical first topology feature vector contains numerical features of the same dimension as the current first topology feature vector. For each feature dimension in the first topology feature vector, calculate the mean of the feature value in the historical first topology feature vectors corresponding to the multiple historical time windows, and use it as the first mean of the feature. Calculate the standard deviation of the feature value in the historical first topology feature vectors corresponding to the multiple historical time windows, and use it as the first standard deviation of the feature. Finally, obtain the first mean and first standard deviation corresponding to the multiple features in the first topology feature vector.
[0074] The method for determining the second mean and second standard deviation corresponding to multiple features in the second topological feature vector is the same as the process for determining the first mean and first standard deviation corresponding to multiple features in the first topological feature vector, and will not be repeated here.
[0075] The target feature is any one of the features in the first topological feature vector (e.g., , , When any one of the following is used, calculate whether the absolute value of the difference between the target feature and the corresponding first mean is greater than a preset multiple (e.g., 4 times) of the first standard deviation corresponding to the target feature. If it is greater, the preset abnormality condition is met, and the third type of detection result is determined to be the third type of abnormal result.
[0076] When the target feature is any feature in the second topological feature vector (e.g., the number of connected components in the Mapper graph), the absolute value of the difference between the target feature and its corresponding second mean is calculated. If this difference is greater than a preset multiple of the second standard deviation of the target feature, the preset anomaly condition is met, and the third-type detection result is determined to be a third-type anomaly. This can be expressed by the following formula:
[0077]
[0078] in, When it is any feature in the first topological feature vector, This corresponds to the first mean. This corresponds to the first standard deviation; When it is any feature in the second topological feature vector, This corresponds to the second mean. This represents the corresponding second standard deviation.
[0079] Through the steps described above, the detection of anomalies in topological eigenvalues is extended to drift detection targeting specific features. Compared to the first two types of detection, which mainly focus on drastic changes in the topology, the third type of detection can capture changes in topological eigenvalues, thereby enabling early warning of faults such as early degradation and parameter drift in microgrid equipment. This multi-dimensional anomaly detection mechanism significantly improves the comprehensiveness and sensitivity of microgrid fault early warning and reduces the risk of missed detections due to the limitations of a single detection dimension.
[0080] Faults in microgrids have different evolutionary stages and manifestations. A single type of anomaly may only indicate minor equipment degradation, while the simultaneous occurrence of multiple anomalies may indicate a system-wide collapse risk. Therefore, a hierarchical early warning mechanism based on the combination of detection results is needed to differentiate the severity of faults and avoid over-prediction or missed detection of critical risks. In step S208, an early warning result is determined based on at least one of the first, second, and third types of detection results, including: determining the accident type and early warning level based on at least one of the first, second, and third types of detection results; determining abnormal electrical quantity data from the electrical quantity dataset based on the accident type, identifying the node with the highest deviation contribution in the abnormal electrical quantity data as the predicted accident location, where the deviation contribution indicates the extent to which the data value corresponding to the node exceeds the normal range; obtaining preset handling suggestions corresponding to the early warning level; and determining the set consisting of the accident type, early warning level, predicted accident location, and preset handling suggestions as the early warning result.
[0081] The accident type and warning level are determined based on at least one of the following: Type 1, Type 2, and Type 3 detection results. Specifically: If only a Type 3 detection result is detected as a Type 3 anomalous result, the accident type is determined to be Type 3 accident type. In this case, the Type 3 anomalous result corresponds to an anomalous feature value pattern in the target topology feature vector, indicating an abnormal equipment status in the microgrid system. This abnormal equipment status includes at least one of the following: parameter aging or equipment degradation. The warning level corresponding to Type 3 accident type is Level 1. Alternatively, if only a Type 1 detection result is detected as a Type 1 anomalous result, the accident type is determined to be Type 1 accident type. In this case, the Type 1 anomalous result corresponds to a global topology anomaly in the target topology feature vector, indicating an operational anomaly in the microgrid system. The warning level corresponding to Type 1 accident type is Level 2. The warning level of Level 2 is greater than that of Level 1. If only one of the two types of detection results is a Type 2 anomaly, the accident type is determined to be Type 2. Type 2 anomalies are defined as graph structure anomalies corresponding to the target topology feature vector. Type 2 accidents indicate a local connection anomaly in the microgrid system, where the connection anomaly includes at least one of the following: network topology splitting or line disconnection. The warning level for Type 2 accidents is Level 2. If at least two of the following anomalies are detected simultaneously, the accident type is determined to be Type 4. Type 4 accidents indicate a global anomaly in the microgrid system. The warning level for Type 4 accidents is Level 3, which is greater than that of Level 2: Type 1 detection results are Type 1 anomalies, Type 2 detection results are Type 2 anomalies, and Type 3 detection results are Type 3 anomalies.
[0082] The following further explains the process for determining the early warning results:
[0083] First, the types of anomaly detection results triggered at the current moment (Category 1, Category 2, and Category 3) are statistically analyzed, and the accident type and corresponding warning level are determined according to the preset mapping rules. The warning level is divided into three levels, with Level 1 being a warning (lowest), Level 2 being a severe warning, and Level 3 being an emergency warning (highest), with the warning intensity increasing sequentially.
[0084] The preset mapping rules are as follows:
[0085] Scenario 1: If only the third type of detection result is detected as a third type of abnormal result (the abnormal mode corresponding to the target topology feature vector is abnormal feature value), and no first type (global topology abnormality) or second type (local graph structure abnormality) abnormality is detected, then the accident type is determined to be the third type of accident. The third type of accident indicates an abnormal equipment status in the microgrid system. This type of abnormality usually manifests as a slow drift of topology feature values, without causing drastic changes in the overall or local topology of the system. Typical faults include at least parameter aging (parameter aging refers to the irreversible change of the physical parameters of electrical equipment in the microgrid over time, causing its electrical characteristics to deviate from the initial nominal value) and equipment degradation (equipment degradation refers to physical damage such as wear, loosening, insulation failure, and poor contact in the internal mechanical or electrical components of the equipment, leading to a decrease in equipment reliability). The corresponding warning level is Level 1. Because this type of fault develops slowly, it mainly serves as a warning, and it is recommended to arrange subsequent maintenance.
[0086] Scenario 2: If only the first type of detection result is detected as a first-type anomaly (if no second or third type anomaly is detected, the accident type is determined to be a first-type accident), and no second or third type anomaly is detected, the accident type is determined to be a first-type accident. A first-type accident indicates an abnormal operation in the microgrid system, particularly a significant change in the overall system connectivity or oscillation mode. Abnormal operation includes two types of anomalies: system frequency out-of-synchronization (loss of frequency synchronization between different local areas or distributed power sources within the microgrid), islanding (physical or electrical isolation of some nodes in the microgrid due to switching actions, forming independently operating sub-networks), voltage oscillation (sustained periodic fluctuations in the voltage amplitude or phase of microgrid nodes), and power oscillation (low- or medium-frequency periodic fluctuations in active power (P) or reactive power (Q) during transmission in the microgrid). System frequency out-of-synchronization and islanding correspond to the first sub-type of the first-type accident, while voltage oscillation and power oscillation correspond to the second sub-type of the first-type accident. After detecting the first type of accident, the specific sub-accident type (first or second) is further determined using the following methods:
[0087] Extract from the first topological feature vector in the target topological feature vector and the first historical topological feature vector in the historical topological feature vector respectively. Features, denoted as the total persistence length sequence, respectively. and Extract from the first topological feature vector in the target topological feature vector and the first historical topological feature vector in the historical topological feature vector respectively. Features, denoted as the total length of the persistence sequence. and .
[0088] After detecting the first topological feature vector Eigenvalues and first historical topological eigenvectors The absolute value of the difference of eigenvalues Greater than the first mutation threshold When, it indicates that it appears The typical system accident types corresponding to the sudden increase are system frequency loss of synchronization and islanding, which are identified as the first sub-accident type and can be expressed by the following formula: .
[0089] After detecting the first topological feature vector Eigenvalues and first historical topological eigenvectors The absolute value of the difference of eigenvalues Greater than the first mutation threshold When, it indicates that it appears A sudden increase, corresponding to typical system fault types such as voltage oscillation and power oscillation, is identified as the second sub-fault type and can be expressed by the following formula: .
[0090] Scenario 3: If only a Type II anomaly is detected (the anomaly pattern corresponding to the target topology feature vector is a graph structure anomaly), and no Type I or Type III anomalies are detected, then the incident type is determined to be Type II. Type II incidents indicate a local connectivity anomaly in the microgrid system, meaning a sudden change in the physical topology connections of the microgrid system. Local connectivity anomalies include at least one of the following: network topology splitting or line disconnection. The warning level corresponding to Type II incidents is Level II; this type of anomaly may lead to local power outages and requires immediate attention.
[0091] If at least two of the anomalies described in scenarios 1-3 are detected simultaneously, the incident type is classified as Type IV. Type IV incidents are used to indicate a severe, systemic, and global anomaly in the microgrid system. The concurrent occurrence of multiple anomaly modes often signifies that the system is on the verge of collapse or has already experienced a serious failure (such as total substation power loss).
[0092] The mapping relationship between anomaly detection methods, accident types, and early warning levels is shown in Table 1 below:
[0093] Table 1:
[0094]
[0095] After determining the accident type and warning level, the corresponding preset handling suggestions are automatically mapped. The preset handling suggestions are as follows: Level 1: It is recommended to arrange maintenance; Level 2: It is recommended to dispatch intervention; Level 3: It is recommended to take emergency action.
[0096] The predicted accident location is determined in the following way:
[0097] Abnormal electrical quantity data are determined from the electrical quantity dataset based on the accident type. The determination method is to first determine the detection method corresponding to the accident type, and then trace the feature extraction algorithm (first algorithm or second algorithm) used based on the corresponding detection method.
[0098] For the first algorithm (the continuous cohomology method), to pinpoint the specific cause, it is necessary to identify the set of key data points that contribute most to the changes in the target persistence graph (i.e., the key data points that contribute most to the difference between the current target persistence graph and the historical normal persistence graph (such as the Wasserstein distance)). The original sampling point set corresponding to the key data point set is traced, and the electrical quantity data of each sampling point in this original sampling point set at the corresponding sampling time in the electrical quantity dataset is identified as anomalous electrical quantity data. For the second algorithm (Mapper), the key clustering nodes with abrupt changes in morphology or connectivity degree in the target graph structure are located. The original sampling point set contained in the original high-dimensional space of the key clustering nodes is traced, and the electrical quantity data of each sampling point in the original sampling point set (referring to a moment on the time axis) at the corresponding sampling time in the electrical quantity dataset is identified as anomalous electrical quantity data.
[0099] After identifying the abnormal electrical quantity data, the node with the highest deviation contribution in the abnormal electrical quantity data is determined as the predicted accident location. The process is as follows: Calculate the deviation contribution of the sampling point in the corresponding node (physical node) dimension of the abnormal electrical quantity data, and identify the physical node with the highest deviation contribution as the predicted accident location. For each physical node and its corresponding electrical quantity characteristics (such as voltage amplitude, frequency, etc.), obtain its statistical characteristics under the historical normal mode benchmark, mainly including the mean and standard deviation. For each sampling point in the abnormal electrical quantity data set, for each physical node, calculate the standardized absolute deviation of its current electrical quantity value relative to the normal mode benchmark: the standardized absolute deviation is the electrical quantity value of a physical node in the current abnormal data at that sampling point minus the mean of the historical normal mode of that node, divided by the standard deviation of the historical normal mode of that node, and the absolute value of the result is taken. The sum of the standardized absolute deviations of all sampling points belonging to a physical node is determined as the deviation contribution of that physical node. Finally, the physical node with the highest deviation contribution is determined as the predicted accident location.
[0100] Finally, the set consisting of the accident type, warning level, predicted accident location, and preset handling suggestions is determined as the warning result. In some optional embodiments, the warning result also includes the time of anomaly occurrence, which is the time when the abnormal electrical quantity data of the node with the highest deviation contribution is obtained from the abnormal electrical quantity data. After obtaining the warning result, it is output to the dispatch center or maintenance personnel for early intervention or rapid location after an accident.
[0101] In some embodiments of this application, a sliding window can be used to continuously update the features, mean, and standard deviation of historical normal patterns. Furthermore, the various thresholds used in steps S202-S208 can be dynamically adjusted based on the statistical distribution of historical data.
[0102] The following is a sample operation: A microgrid consists of 6 nodes (2 diesel generators, 2 energy storage units, and 2 photovoltaic units). A synchronous measurement terminal is deployed to collect voltage amplitude, frequency, and active power at a sampling rate of 100Hz. Sliding window length. One point (0.5 seconds). Under normal operating conditions, the point cloud is concentrated on a low-dimensional manifold, with Betti-0=1 (single connected) and Betti-1=0 (acyclic). The Mapper graph is a single connected chain. After a disturbance, frequency divergence was detected, with increased frequency differences between nodes. 0.2 seconds before frequency loss of synchronization, multiple clusters appeared in the point cloud (Betti-0 suddenly increased from 1 to 3), and the persistent homology bar chart showed two persistent cycles. The Mapper graph split into 3 connected components. The sudden increase in Betti-0 and the change in the number of connected components were detected, triggering a level-two warning indicating "frequency loss of synchronization risk," and locating the split node groups ({Generator 1, Energy Storage 1} and {Generator 2, Energy Storage 2}). Maintenance personnel intervened in advance, adjusting output to prevent the incident from escalating.
[0103] In some embodiments of this application, a microgrid accident early warning system based on topology data analysis is also provided. This early warning system is used to execute the microgrid accident early warning method in the embodiments of this application and includes the following modules: a data acquisition module, a high-dimensional point cloud construction module, a topology feature extraction module, a feature tracking and anomaly detection module, and an early warning decision module. The data acquisition module is used to execute the above step S202. Through synchronous measurement terminals deployed at each key node (converter, load, distributed power source) of the microgrid, it collects electrical quantities such as voltage amplitude, frequency, active power, and reactive power in real time, and achieves microsecond-level synchronization through GPS / BeiDou time synchronization. The high-dimensional point cloud construction module combines the measurement values of all nodes at each sampling time into a high-dimensional vector (dimension is the number of nodes × the number of features), forming a point cloud sequence that evolves over time. The topology feature extraction module extracts the topology features of the point cloud within each time window using the Persistent Homology or Mapper algorithm, including the number of connected branches (Betti-0), the number of 1-dimensional rings (Betti-1), persistent barcodes, Mapper graph structure, etc. The feature tracking and anomaly detection module tracks changes in topological features over time, identifies anomaly patterns using multiple anomaly detection methods, and establishes a mapping relationship between each detection method and the accident type. The early warning decision module, when any anomaly detection method triggers an anomaly, outputs the corresponding accident type, early warning level, and possible accident location based on the mapping relationship.
[0104] The microgrid accident early warning method of this application constructs a high-dimensional point cloud sequence by collecting electrical quantities (voltage, frequency, power, etc.) of each node of the microgrid in real time, and extracts the topological features (number of connected branches, persistent barcodes, etc.) of the point cloud using continuous cohomology and the Mapper algorithm. These features are sensitive to changes in system state and do not require the establishment of an accurate physical model, making them suitable for microgrid accident early warning. When the topological features change significantly, an accident early warning is issued, effectively solving the problems of relying solely on thresholds, lacking a global perspective, and being insensitive to precursors when issuing early warnings.
[0105] In some embodiments of this application, Figure 3 This is a flowchart of another microgrid fault early warning method provided according to an embodiment of this application, including:
[0106] Real-time acquisition of electrical quantities (voltage / frequency / power, etc.) at each node and synchronization with GPS.
[0107] High-dimensional point clouds are constructed using a sliding window (i.e., point cloud sequences generated based on the electrical quantity dataset).
[0108] Topological feature extraction is performed using continuous homology (Betti-0 / Betti-1 / barcode, corresponding to the first algorithm mentioned above) and the Mapper algorithm (Mapper graph / connected component / cycle, corresponding to the second algorithm mentioned above). Topological feature vectors (L0 / L1 / L_total) are extracted. ( / Mapper graph features).
[0109] Determine if the topological features (corresponding to the target topological feature vector) are abnormal. If there are no abnormalities, continue monitoring. If there are abnormalities, make an accident warning decision (output accident type / location / level).
[0110] Feature tracking and anomaly detection (rate of change / statistical deviation / cumulative sum (CUSUM)) are performed, while the normal pattern library is updated (the threshold is updated via a sliding window, meaning that various thresholds can also be dynamically adjusted based on the statistical distribution of historical data).
[0111] Figure 4 This is a schematic diagram of a microgrid fault early warning device according to an embodiment of this application, comprising:
[0112] The acquisition module 402 is used to acquire the electrical quantity dataset of the microgrid, wherein the electrical quantity dataset includes electrical quantity data corresponding to multiple nodes of the microgrid at multiple sampling times.
[0113] The generation module 404 is used to generate a point cloud sequence based on the electrical quantity dataset, wherein each data point in the point cloud sequence corresponds to one of multiple sampling times.
[0114] The extraction module 406 is used to extract features from the target point cloud within the target time window in the point cloud sequence to obtain the target topological feature vector. The target point cloud is composed of multiple data points within the target time window in the point cloud sequence, and the target topological feature vector is used to indicate the geometric shape and connectivity structure of the target point cloud in multi-dimensional space.
[0115] The detection module 408 is used to detect microgrid anomalies based on the target topology feature vector and obtain early warning results. The early warning results include at least one of the following: accident type and early warning level.
[0116] It should be noted that, Figure 4 The microgrid fault early warning device shown is used to perform Figure 2 The microgrid fault early warning method shown herein, therefore Figure 2 The relevant explanations in the microgrid fault early warning method also apply to this microgrid fault early warning device, and will not be repeated here.
[0117] It should be noted that each module in the above-mentioned microgrid accident early warning device can be a program module (for example, a set of program instructions to implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.
[0118] This application also provides a non-volatile storage medium, which includes a stored program, wherein, when the program is running, it controls the device where the non-volatile storage medium is located to execute the microgrid fault early warning method of any of the above embodiments.
[0119] This application also provides an electronic device, which includes a processor for running a program, wherein the microgrid fault early warning method of any of the above embodiments is executed when the program is running.
[0120] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the microgrid fault early warning method of any of the above embodiments.
[0121] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0122] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0123] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0124] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0125] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0126] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A microgrid fault early warning method, characterized in that, include: Obtain the electrical quantity dataset of the microgrid, wherein the electrical quantity dataset includes electrical quantity data corresponding to multiple nodes of the microgrid at multiple sampling times; A point cloud sequence is generated based on the electrical quantity dataset, wherein each data point in the point cloud sequence corresponds to one of the plurality of sampling times; Feature extraction is performed on the target point cloud within the target time window in the point cloud sequence to obtain the target topological feature vector. The target point cloud is composed of multiple data points within the target time window in the point cloud sequence. The target topological feature vector is used to indicate the geometric shape and connectivity structure of the target point cloud in multidimensional space. Microgrid anomaly detection is performed based on the target topology feature vector to obtain early warning results, wherein the early warning results include at least one of the following: accident type and early warning level.
2. The method according to claim 1, characterized in that, Generate a point cloud sequence based on the electrical quantity dataset, including: Based on the electrical quantity data, the data points corresponding to the plurality of sampling times are determined respectively. The data point corresponding to each sampling time is a high-dimensional vector composed of the electrical quantity data of the plurality of nodes at the corresponding sampling time. The dimension of the high-dimensional vector is equal to the product of the total number of the plurality of nodes and the number of features contained in the electrical quantity data. The data points corresponding to the multiple sampling times are sorted in order of sampling time from earliest to latest to obtain the point cloud sequence.
3. The method according to claim 1, characterized in that, Feature extraction is performed on the target point cloud within the target time window in the point cloud sequence to obtain the target topological feature vector, including: A first algorithm is used to generate a persistent barcode corresponding to the target point cloud, and features are extracted from the persistent barcode to obtain a first topological feature vector, wherein the first topological feature vector includes multiple numerical features. The target point cloud is processed using a second algorithm to generate a target graph structure, and features are extracted from the target graph structure to obtain a second topological feature vector. The combination of the first topological feature vector and the second topological feature vector is determined as the target topological feature vector.
4. The method according to claim 3, characterized in that, Microgrid anomaly detection is performed based on the target topology feature vector to obtain early warning results, including: Obtain the historical persistent barcode, historical graph structure, and historical topological feature vector corresponding to the point cloud within the target historical time window, wherein the target historical time window is the previous time window of the target time window; Based on the target persistent barcode and the historical persistent barcode corresponding to the first topological feature vector, topological anomaly detection is performed to obtain the first type of detection result; Based on the second topological feature vector, the second historical topological feature vector in the historical topological feature vector, the target graph structure, and the historical graph structure, graph structure anomaly detection is performed to obtain a second type of detection result, wherein the second historical topological feature vector includes multiple graph structure features; The first mean and first standard deviation of multiple features in the first topological feature vector and the second mean and second standard deviation of multiple features in the second topological feature vector are obtained respectively. Feature anomaly detection is performed based on the first topological feature vector, the first mean and first standard deviation of multiple features in the first topological feature vector and the second topological feature vector, the second mean and second standard deviation of multiple features in the second topological feature vector to obtain a third type of detection result. In this case, the first mean of each feature in the first topological feature vector is the mean of the feature value of the feature in multiple historical time windows, and the first standard deviation of each feature in the first topological feature vector is the standard deviation of the feature value of the feature in multiple historical time windows. The warning result is determined based on at least one of the first type of detection result, the second type of detection result, and the third type of detection result.
5. The method according to claim 4, characterized in that, Based on the target persistent barcode and the historical persistent barcode corresponding to the first topological feature vector, topological anomaly detection is performed to obtain a first type of detection result, including: The target persistent barcode and the historical persistent barcode are converted into a target persistent map and a historical persistent map, respectively, and the metric distance between the target persistent map and the historical persistent map in the metric space is determined. If the measured distance is greater than a preset distance threshold, the first type of detection result is determined as the first type of abnormal result, wherein the first type of abnormal result is the abnormal pattern corresponding to the target topological feature vector as a global topological anomaly.
6. The method according to claim 4, characterized in that, Based on the second topological feature vector, the second historical topological feature vector in the historical topological feature vector, the target graph structure, and the historical graph structure, graph structure anomaly detection is performed to obtain a second type of detection result, including: Determine the incremental value between the number of connected components in the second topological feature vector and the number of historical connected components in the second historical topological feature vector; Determine the graph similarity between the target graph structure and the historical graph structure; If the incremental value is greater than or equal to a preset incremental threshold or the graph similarity is less than a preset similarity threshold, the second type of detection result is determined as the second type of abnormal result, wherein the second type of abnormal result is the abnormal pattern corresponding to the target topological feature vector as a graph structure abnormality.
7. The method according to claim 4, characterized in that, Based on the first topological feature vector, the first mean and first standard deviation corresponding to multiple features in the first topological feature vector, and the second topological feature vector, the second mean and second standard deviation corresponding to multiple features in the second topological feature vector, feature anomaly detection is performed to obtain a third type of detection result, including: If any feature in the first topological feature vector or any feature in the second topological feature vector satisfies a preset anomaly condition, the third type of detection result is determined as a third type of anomaly result. The preset anomaly condition is that the absolute value of the difference between the target feature and the corresponding first mean or second mean is greater than a preset multiple of the first standard deviation or second standard deviation corresponding to the target feature. The third type of anomaly result is that the anomaly pattern corresponding to the target topological feature vector is an abnormal feature value. The target feature is any feature in the first topological feature vector or any feature in the second topological feature vector.
8. The method according to claim 4, characterized in that, The warning result is determined based on at least one of the first type of detection result, the second type of detection result, and the third type of detection result, including: The accident type and warning level are determined based on at least one of the first type of detection results, the second type of detection results, and the third type of detection results. Abnormal electrical quantity data are determined from the electrical quantity dataset based on the accident type. The node with the highest deviation contribution in the abnormal electrical quantity data is determined as the predicted accident location. The deviation contribution is used to indicate the limit of the data value corresponding to the node exceeding the normal range. Obtain the preset processing suggestions corresponding to the warning level; The set consisting of the accident type, the warning level, the predicted accident location, and the preset handling suggestions is determined as the warning result.
9. The method according to claim 8, characterized in that, The accident type and warning level are determined based on at least one of the first type of detection results, the second type of detection results, and the third type of detection results, including: If only the third type of detection result is detected as a third type of abnormal result, the accident type is determined as a third type of accident type. The third type of abnormal result is the abnormal mode corresponding to the target topology feature vector, which is the feature value abnormality. The third type of accident type indicates the abnormal equipment status in the microgrid system. The abnormal equipment status includes at least one of the following: parameter aging, equipment degradation. The warning level corresponding to the third type of accident type is level one. If only the first type of detection result is detected as a first type of abnormal result, the accident type is determined as a first type of accident type. The first type of abnormal result is the abnormal pattern corresponding to the target topology feature vector, which is a global topology abnormality. The first type of accident type indicates that there is an abnormal operation in the microgrid system. The warning level corresponding to the first type of accident type is level two, and the warning level of level two is greater than that of level one. If only the second type of detection result is detected as a second type of abnormal result, the accident type is determined as a second type of accident type, wherein the second type of abnormal result is the abnormal pattern corresponding to the target topology feature vector as a graph structure abnormality, the second type of accident type indicates that there is a local connection abnormality in the microgrid system, wherein the connection abnormality includes at least one of the following: network topology split or line disconnection, and the warning level corresponding to the second type of accident type is the second level; If at least two of the following anomalies are detected simultaneously, the accident type is identified as a fourth type of accident. This fourth type of accident indicates a global anomaly in the microgrid system. The warning level corresponding to this fourth type of accident is level three, which is more severe than level two. The first type of detection result is the first type of abnormal result, the second type of detection result is the second type of abnormal result, and the third type of detection result is the third type of abnormal result.
10. A microgrid fault early warning device, characterized in that, include: The acquisition module is used to acquire the electrical quantity dataset of the microgrid, wherein the electrical quantity dataset includes electrical quantity data corresponding to multiple nodes of the microgrid at multiple sampling times; A generation module is used to generate a point cloud sequence based on an electrical quantity dataset, wherein each data point in the point cloud sequence corresponds to one of the plurality of sampling times; The extraction module is used to extract features from the target point cloud within the target time window in the point cloud sequence to obtain a target topological feature vector. The target point cloud is composed of multiple data points within the target time window in the point cloud sequence, and the target topological feature vector is used to indicate the geometric shape and connectivity structure of the target point cloud in multidimensional space. The detection module is used to perform microgrid anomaly detection based on the target topology feature vector and obtain early warning results, wherein the early warning results include at least one of the following: accident type and early warning level.
11. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a program, wherein when the program is executed, it controls the device containing the non-volatile storage medium to execute the microgrid accident early warning method according to any one of claims 1 to 9.
12. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, executes the microgrid fault early warning method according to any one of claims 1 to 9.