Urban power grid fault detection and recovery method and system under extreme conditions
By combining deep belief networks and fault propagation topology, the nonlinear problem of power grid fault diagnosis and recovery under extreme conditions is solved, realizing the identification and rapid recovery of cascading faults at the power grid coupling level, and improving the stability and recovery efficiency of the power grid under extreme conditions.
Patent Information
- Application Number
- CN202510972343.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-10-28
AI Technical Summary
Existing technologies struggle to capture nonlinear mutation characteristics in power grid fault diagnosis under extreme conditions, and recovery schemes fail to effectively address cascading faults and dynamic factors at the power grid coupling level, leading to misjudgments or incomplete recovery.
Deep belief networks are used for fault diagnosis. Fault propagation paths are identified using fault propagation topology graphs. Power grid restoration is carried out through dynamic recovery priority and damping current mechanisms, taking into account cascading faults at the power grid coupling level and dynamic factors under extreme conditions.
It improves the sensitivity of fault identification and the speed of grid restoration, enabling the grid system to stabilize under extreme conditions and enhancing grid recovery capabilities.
Smart Images

Figure CN120855207A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system safety control technology, and in particular to a method and system for power grid fault detection and recovery under extreme conditions. Background Technology
[0002] Extreme scenarios that may occur in the power grid include two main types: first, extreme natural disasters, primarily stemming from typhoons, heavy rainfall, high temperatures, earthquakes, and other extreme natural disasters. These events are often characterized by uncertainty, suddenness, and high destructiveness, severely impacting the operational status of system components such as power lines and distributed generation equipment. Second, extreme fault scenarios, mainly caused by multiple comprehensive faults in components triggered by extreme weather. These faults often damage the physical structure of system components, leading to multiple failures, affecting power generation and transmission, and significantly impacting load supply over a wide area. Chinese patent application CN118137671A discloses an intelligent distribution network fault early warning system based on natural disasters. Its core principle is to calculate power grid fault indicators under extreme conditions through linear weighting and restore power supply to the grid based on the static priority of faults. While this system can improve the stability and security of the power grid to some extent during natural disasters, it is not without its limitations. The high proportion of new energy sources, the large-scale integration of distributed power sources, and the prominent characteristics of power electronics in urban new power systems pose significant challenges to their stability and reliability under extreme disasters. Furthermore, the closer interconnections and greater flexibility among power sources, grids, loads, and storage systems mean that the chain reactions triggered by extreme scenarios are more intense, resulting in a pronounced "chain reaction" of failures and an increasingly wide range of damage and impact. Under these circumstances, the method provided in Chinese patent application CN118137671A has the following drawbacks:
[0003] 1) Under extreme conditions, the power grid parameters oscillate violently. Using a linear model to judge the faults in the power grid makes it difficult to capture the force fluctuations caused by the introduction of new energy sources and the nonlinear mutation characteristics caused by the faults of power electronic equipment, which can easily lead to misjudgment or omission of faults.
[0004] 2) When performing power grid fault recovery, it only isolates the currently detected fault point, ignoring the cascading faults caused by the coupling of "source, grid, load, and storage". Furthermore, it determines the order of fault recovery by setting static priority indicators, and the calculation of priority depends on preset weights, ignoring dynamic factors in the evolution of extreme conditions. As a result, its recovery scheme may not be applicable to power grid fault recovery.
[0005] Therefore, the technical problem to be solved is to provide a power grid fault diagnosis and recovery method that can take into account the impact of nonlinear mutation characteristics on fault diagnosis, cascading faults at the power grid coupling level during fault recovery, and dynamic factors under extreme conditions. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method and system for urban power grid fault detection and recovery under extreme conditions. It utilizes deep belief networks to diagnose power grid faults under extreme conditions, calculates a dynamic warning threshold based on the fault diagnosis results, and draws a fault propagation topology diagram. The recovery priority of each substructure in the power grid is dynamically adjusted using this warning threshold. It takes into account the cascading faults of the power grid coupling level and the dynamic factors under extreme conditions during the fault recovery process, and can achieve faster power grid recovery.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] According to a first aspect of the present invention, a method for fault detection and recovery of urban power grid under extreme conditions is provided, the method comprising:
[0009] Meteorological data, power grid operating parameters, meteorological-power grid coupling data, and distributed power source status data are acquired and preprocessed. The preprocessed data are spatiotemporally aligned to generate a spatiotemporal matrix. Based on the spatiotemporal matrix, a deep belief network is used to output the fault probability and fault type of each node in the power grid, and a fault dynamic warning threshold is calculated based on the fault probability. The power grid operating parameters include node voltage, branch current, and voltage phase angle.
[0010] The power grid fault status is determined based on the aforementioned fault probability and dynamic warning value. If there is no fault in the power grid, no operation is performed; otherwise, a fault propagation topology diagram is drawn and the node where the fault occurs is marked as the fault point.
[0011] After fault blocking based on the aforementioned fault propagation topology, dynamic recovery priority is calculated based on the aforementioned dynamic warning threshold, and islanded reconfiguration is performed based on the aforementioned dynamic recovery priority to restore the urban power grid.
[0012] As a preferred technical solution, the deep belief network includes an input layer, a bottom-level RBM, a spatiotemporal attention mechanism layer, a high-level RBM, and an output layer. The method for outputting the fault probability and fault type of each node using the deep belief network includes:
[0013] The preprocessed data is used to generate a three-dimensional tensor based on the three dimensions of time, space, and features. Sliding window sampling of the aforementioned three-dimensional tensor The time matrix is obtained; where T represents the number of data sampling time points, N represents the number of nodes in the urban power grid, F represents the number of data types acquired, and W represents the sliding window length.
[0014] Key voltage derivative features were extracted based on preprocessed power grid operating parameters. The flattened time matrix is then input from the input layer into the bottom layer RBM to extract the first feature; where θ i This represents the power angle of the i-th node in the urban power grid. The Laplace operator represents the voltage of node i in a city power grid;
[0015] The higher-level RBM receives the first feature and performs feature processing to generate the second feature;
[0016] Based on the aforementioned spatiotemporal matrix, time weights and spatial weights are calculated. Based on the aforementioned time weights and spatial weights, the second feature is enhanced using a spatiotemporal attention mechanism layer to generate enhanced features.
[0017] The output layer receives enhanced features and processes them using the softmax function to output the fault probability and fault type probability distribution of each node.
[0018] As a preferred technical solution, the spatiotemporal attention mechanism layer includes a temporal attention network and a spatial attention network, and the method for feature enhancement in the spatiotemporal attention mechanism layer includes:
[0019] The expression for calculating the time attention score is as follows:
[0020] u t =ReLU(W att-t ·h t,i +b att-t ),
[0021]
[0022] Among them, u t Indicates intermediate features over time; W att-t The first parameter of the time attention network; h t,i b represents the second feature of the i-th node at time t; att-t The second parameter of the time-attention network is indicated; This represents the transpose of the time attention score weight vector; e t Indicates attentional time score;
[0023] Based on the aforementioned time attention score, the time attention weight is calculated, and its expression is as follows:
[0024]
[0025] Among them, e sThe time attention score for the s-th sliding window is represented by W; W represents the length of the sliding window.
[0026] The spatial attention score is calculated using the following expression:
[0027]
[0028] Among them, z i W represents intermediate features in space. att-s b represents the first parameter of the spatial attention network. att-s The second parameter of a spatial attention network; g represents the transpose of the spatial attention score weight vector; i Indicates spatial attention score;
[0029] Based on the aforementioned spatial attention score, the spatial attention weight is calculated, and its expression is as follows:
[0030]
[0031] Among them, g j Let represent the spatial attention score of the j-th node; N represents the number of nodes in the urban power grid.
[0032] The enhancement feature is calculated based on the aforementioned temporal attention weights and spatial attention weights, and its expression is as follows:
[0033]
[0034] As a preferred technical solution, the method for calculating the aforementioned fault dynamic warning threshold is as follows:
[0035] Disaster levels are determined based on preprocessed meteorological data;
[0036] The basic threshold for calculating the disaster level is expressed as follows: Where α and β represent constant coefficients, L d Indicates the level of disaster;
[0037] The base threshold is corrected using the aforementioned fault probability, expressed as: T d =T base ·(1+γ·(0.5-Pf i ), where γ represents a constant coefficient; Pf i This represents the failure probability of the i-th node.
[0038] As a preferred technical solution, the method for drawing the aforementioned fault propagation topology diagram is as follows:
[0039] The topological nodes of the urban power grid are used as nodes in the fault propagation topology graph, and edges are constructed based on the relationships between the topological nodes.
[0040] The edge weights are calculated based on the aforementioned power grid operating parameters, which include node active power, node power angle, and node frequency. Their expressions are as follows:
[0041]
[0042] Where, θ j P represents the work angle of topological node j. i t represents the active power of node i in the topology. crit,i Let t represent the critical instability time of topological node i, and t crit,i =2H i / |△P i |,H i Let ΔP represent the inertia constant of the i-th topological node. i Δf represents the change in active power at node i in the topology; i f represents the difference between the actual frequency and the rated frequency of topology node i; nom This represents the rated frequency of topology node i.
[0043] As a preferred technical solution, the method for fault blocking based on the aforementioned fault propagation topology map includes:
[0044] Traverse all edges of the fault points in the fault propagation topology graph, and select edges with weights greater than a first preset value to construct a set of fault propagation paths for the corresponding fault points.
[0045] If the failure probability of the fault point is greater than the aforementioned fault dynamic warning threshold, then the edges with weights greater than the second preset value in the fault propagation path set are disconnected, and the damping current mechanism is used to perform transient recovery on the topology nodes connected to the fault point.
[0046] If the probability of a fault point is less than or equal to the dynamic fault warning threshold but greater than the early warning threshold, an early warning signal is generated.
[0047] As a preferred technical solution, the damping current mechanism involves injecting a damping current into the topology node connected to the fault point to suppress oscillations in the urban power grid substructure corresponding to that topology node. The expression for calculating the damping current is as follows:
[0048]
[0049] Where K represents the damping coefficient, and the value of K decreases as the fault dynamic warning threshold increases; ΔV represents the difference between the target voltage required for the normal operation of the corresponding urban power grid substructure and the measured voltage.
[0050] As a preferred technical solution, the method for calculating the dynamic recovery priority is as follows:
[0051] Obtain a historical dynamic fault warning threshold sequence, and calculate the disaster impact coefficient based on the historical dynamic fault warning threshold sequence;
[0052] The expression for the adjusted recovery coefficient based on the aforementioned disaster impact coefficient is as follows:
[0053] ω1(t)=κ·e -λt ,
[0054] ω2(t)=κ·log(1+t / τ),
[0055] Where ω1(t) represents the infrastructure recovery coefficient; ω2(t) represents the economic activity recovery coefficient; λ represents the infrastructure attenuation coefficient; t represents time; τ represents the time constant of economic loss; and k represents the corrected recovery coefficient.
[0056] The dynamic priority is calculated based on the corrected recovery coefficient, and its expression is as follows:
[0057] Priority=ω1(t)P infra +ω2(t)P econ +ω3(t)P life +ω4(t)P res , where P infra Indicates the impact of infrastructure; P econ Indicator of the impact of economic activity; P life Indicators of impact on life activities; P res ω3(t) represents the human activity impact index; ω4 represents the life activity recovery coefficient.
[0058] As a preferred technical solution, the method for calculating the corrected recovery coefficient is as follows:
[0059]
[0060] Among them, T h Indicates the duration of extreme conditions; T d (t) represents the fault dynamic warning threshold at time t.
[0061] According to a second aspect of the present invention, a system for detecting and restoring urban power grid faults under extreme conditions is provided, characterized in that the system is used to implement the above-described method.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] 1) When performing fault diagnosis, this invention introduces key voltage derivative features obtained from power grid operating parameters (these features include the higher-order derivative of the phase angle of the node voltage and the second-order voltage change), which helps the deep belief network to capture nonlinear changes in the power grid caused by sudden changes in new energy sources and transient processes of equipment switching in the power grid during feature processing. Moreover, when judging power grid faults, it does not rely on a fixed threshold, but dynamically updates the judgment threshold through the fault probability, thereby enhancing the sensitivity of fault identification and its adaptability under different extreme conditions.
[0064] 2) In response to the current "source, grid, load, and storage" coupled structure of urban power grids, this invention identifies fault propagation paths between different levels of the structure by constructing a fault propagation topology graph. It then filters high-risk fault propagation paths based on edge weights, blocks them, and injects damping current into the topology nodes connected to the fault point to temporarily maintain the steady state of the corresponding power grid substructure. Based on this, it corrects the priority recovery coefficient by considering the impact of disaster evolution and constructs power grid islands according to priority to achieve power grid recovery. Compared with the prior art that relies solely on static calculations to restore the power grid sequentially based on priority, this invention can stabilize the operation of the power grid system in a short time by relying on damping current when a power grid fault occurs, thus improving the power grid's recovery capability under extreme conditions. Attached Figure Description
[0065] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0067] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0068] Example 1
[0069] To address the shortcomings of existing technologies, this invention provides a method for urban power grid fault detection and recovery under extreme conditions, the process of which is as follows: Figure 1 As shown, including:
[0070] S1. Generate a spatiotemporal matrix based on meteorological data, power grid operating parameters, meteorological-power grid coupled data, and distributed power source status data. Utilize a deep belief network to output the fault probability and fault type of the nodes, and calculate the dynamic fault warning threshold based on the fault probability.
[0071] In this invention, the provided deep belief network includes an input layer, a bottom RBM, a spatiotemporal attention mechanism layer, a high-level RBM, and an output layer, wherein the spatiotemporal attention mechanism layer includes a temporal attention network and a spatial attention network.
[0072] S11. Acquire meteorological data, including the coordinates of extreme disasters and their status data, such as typhoon weather data including typhoon wind speed and rainfall intensity; acquire power grid operating parameters, including node voltage, branch current, node power angle, and voltage phase angle; acquire meteorological-power grid coupling data, which is based on historical meteorological data and historical power grid fault data; acquire distributed power source status data, such as photovoltaic output and energy storage of energy storage systems in the power grid.
[0073] S12. Preprocessing the acquired data includes: correcting missing data using interpolation, correcting outliers and standardizing the data, and aligning the processed data by time.
[0074] S13. Generate a three-dimensional tensor from the preprocessed data according to the three dimensions of time, space, and features. Sliding window sampling of 3D tensors The time matrix is obtained; where T represents the number of data sampling time points, N represents the number of nodes in the urban power grid, F represents the number of data types obtained, and W represents the sliding window length; the data types obtained in this invention include four categories: meteorological data, power grid operation data, meteorological-power grid coupling data, and distributed power source status data, so its F value is 4.
[0075] S14. Extract key voltage derivative features based on preprocessed power grid operating parameters. The flattened time matrix is then input from the input layer into the bottom layer RBM to extract the first feature; where θ i This represents the power angle of the i-th node in the urban power grid. The Laplace operator represents the voltage of node i in a city power grid.
[0076] S15. The higher-level RBM receives the first feature and performs feature processing to generate the second feature.
[0077] S16. Calculate time weights and spatial weights based on the spatiotemporal matrix. Then, use the spatiotemporal attention mechanism layer to enhance the second feature based on the time weights and spatial weights, and generate enhanced features.
[0078] S161. Calculate the time attention score, the expression of which is:
[0079] u t =ReLU(W att-t ·h t,i +b att-t ),
[0080]
[0081] Among them, u t Indicates intermediate features over time; W att-t The first parameter of the time attention network; h t,i b represents the second feature of the i-th node at time t; att-t The second parameter of the time-attention network is indicated; This represents the transpose of the time attention score weight vector; e tIndicates attentional time score;
[0082] S162. Based on the time attention score, calculate the time attention weight, the expression of which is:
[0083]
[0084] Among them, e s The time attention score for the s-th sliding window is represented by W; W represents the length of the sliding window.
[0085] S163. Calculate the spatial attention score, the expression of which is:
[0086]
[0087] Among them, z i W represents intermediate features in space. att-s b represents the first parameter of the spatial attention network. att-s The second parameter of a spatial attention network; g represents the transpose of the spatial attention score weight vector; i Indicates spatial attention score;
[0088] S164. Based on the spatial attention score, calculate the spatial attention weight, the expression of which is:
[0089]
[0090] Among them, g j Let represent the spatial attention score of the j-th node; N represents the number of nodes in the urban power grid.
[0091] S165. The enhanced features are calculated based on temporal attention weights and spatial attention weights, and their expression is as follows:
[0092]
[0093] By utilizing spatiotemporal attention to further filter and enhance the comprehensive features extracted from the RBM layer, the key spatiotemporal information for fault prediction is highlighted, making the final generated features more discriminative and thus improving the accuracy of fault diagnosis.
[0094] S17. The output layer receives enhanced features and processes them using the softmax function to output the fault probability and fault type probability distribution of each node.
[0095] In this invention, the output layer includes three branches, which output the fault probability, fault type (such as short circuit, overload, etc.) and fault location respectively.
[0096] S18. Calculate the dynamic warning threshold for faults.
[0097] Under extreme conditions, the probability of power grid failure varies depending on the level of disaster, and the power grid's sensitivity to different disasters also differs. Therefore, extreme disaster scenarios must be taken into account when setting the threshold for determining whether a failure has occurred.
[0098] S181. Obtain the disaster level based on the preprocessed meteorological data. In detail, if it is a typhoon, it is calculated based on parameters such as wind speed and rainfall.
[0099] S182. The basic threshold is calculated based on the disaster level, and its expression is as follows: Where α and β represent constant coefficients, L d Indicates the level of disaster.
[0100] S183. The basic threshold is corrected using the fault probability, and its expression is: T d =T base ·(1+γ·(0.5-Pf i ), where γ represents a constant coefficient, typically taken as 0.5; Pf i This represents the failure probability of the i-th node.
[0101] S2. Determine the fault status of the power grid. If there is a fault in the power grid, draw a fault propagation topology diagram and mark the node where the fault occurred as the fault point.
[0102] Specifically, a node is considered to have failed when its failure probability exceeds its dynamic early warning threshold. However, in urban power grids, due to the tight coupling of "source, grid, load, and storage," a single node failure can easily trigger a cascading failure. Therefore, analyzing failures at only a single node is insufficient to accurately diagnose the overall failure status of the urban power grid. Based on this, this invention constructs a fault propagation topology diagram to identify the fault propagation path relationships between nodes in the power grid, thereby achieving a more comprehensive fault diagnosis of the urban power grid.
[0103] S21. Use the topology nodes of the urban power grid as nodes of the fault propagation topology graph, and construct edges based on the relationships between the topology nodes.
[0104] S22. Calculate edge weights based on power grid operating parameters. Specifically, the power grid operating parameters also include node frequencies, and their expression is as follows:
[0105]
[0106] Where, θ j P represents the work angle of topological node j. i t represents the active power of node i in the topology. crit,i Let t represent the critical instability time of topological node i, and t crit,i =2H i / |△P i |,H i Let ΔP represent the inertia constant of the i-th topological node. i Δf represents the change in active power at node i in the topology; i f represents the difference between the actual frequency and the rated frequency of topology node i; nom This represents the rated frequency of topology node i.
[0107] S3. After fault blocking based on the fault propagation topology, calculate the dynamic recovery priority based on the dynamic warning threshold, and perform islanded reconstruction based on the dynamic recovery priority to restore the urban power grid.
[0108] S31. Traverse all edges of the fault point in the fault propagation topology graph, filter edges with a weight greater than 0.7 to determine that the two topology nodes connected by the edge have a strong correlation and a high probability of fault propagation. Based on such edges, construct the fault propagation path set for the corresponding fault point.
[0109] S32. If the fault probability of the fault point is greater than the fault dynamic warning threshold, disconnect the edges with a weight greater than 0.9 in the fault propagation path set, and use the damping current mechanism to perform transient recovery on the topology nodes connected to the fault point. By disconnecting high-weight lines, the fault propagation path can be effectively cut off, preventing chain reactions from causing a larger power outage.
[0110] In detail, the damping current mechanism involves injecting damping current into the topology node connected to the fault point to suppress oscillations in the urban power grid substructure corresponding to that topology node. The expression for calculating the damping current is as follows:
[0111]
[0112] Where K represents the damping coefficient, and the value of K decreases as the fault dynamic warning threshold increases; ΔV represents the difference between the target voltage required for the normal operation of the corresponding urban power grid substructure and the measured voltage.
[0113] In the damping current mechanism, the damping coefficient is correlated with the fault dynamic warning threshold, thereby enabling dynamic adjustment of the damping effect according to the severity of the fault.
[0114] S33. If the failure probability of the fault point is less than or equal to the fault dynamic warning threshold but greater than the early warning threshold (in this embodiment, this value is set to 0.9 times the fault dynamic warning value), then an early warning signal is generated.
[0115] In addition, the energy storage system in the urban power grid enters standby mode and outputs 50% of the damping current to maintain the stability of the corresponding substructure, and mobilizes resources for grid restoration to the high-risk area to ensure rapid response and repair when the fault expands.
[0116] S34. Calculate the dynamic recovery priority.
[0117] S341. Obtain the historical dynamic warning threshold sequence of faults, and calculate the disaster impact coefficient based on the historical dynamic warning threshold sequence. The expression is as follows:
[0118]
[0119] Among them, T h Indicates the duration of extreme conditions; T d (t) represents the fault dynamic warning threshold at time t.
[0120] S342. The recovery coefficient is adjusted based on the disaster impact coefficient, and its expression is as follows:
[0121] ω1(t)=κ·e -λt ,
[0122] ω2(t)=κ·log(1+t / τ),
[0123] Where ω1(t) represents the infrastructure recovery coefficient; ω2(t) represents the economic activity recovery coefficient; λ represents the infrastructure attenuation coefficient; t represents time; τ represents the time constant of economic loss; and κ represents the corrected recovery coefficient.
[0124] S343. Calculate the dynamic priority based on the corrected restoration coefficient, the expression of which is:
[0125] Priority=ω1(t)P infra +ω2(t)P econ +ω3(t)P life +ω4(t)P res , where P infra Indicates the impact of infrastructure; P econ Indicator of the impact of economic activity; P life Indicators of impact on life activities; P res ω3(t) represents the human activity impact index; ω4 represents the life activity recovery coefficient.
[0126] S35. Select objects to become islands based on dynamic recovery priority and perform island switching.
[0127] Example 2
[0128] This embodiment provides a training method for training the deep belief network in Embodiment 1, comprising:
[0129] A1. Construct the training dataset.
[0130] A11. Obtain disaster data, historical power grid operating parameters, and fault data under historical extreme conditions. Align the disaster data and historical power grid data by timestamp, correct values that exceed the physical range, and perform standardization processing.
[0131] A12. Obtain fault types based on fault data, generate a joint dataset based on standardized disaster data and historical power grid data, match fault types to the joint dataset according to timestamps, construct a training dataset, and divide it into a training set and a validation set. Perform A2 and A3 on the training set.
[0132] A2, Unsupervised training of RBM layer.
[0133] The algorithm greedily trains both the lower-level and higher-level RBMs and updates the rules within the RBMs, including:
[0134] A21. Randomly initialize the layer parameters of the underlying RBM. Randomly select data from the training dataset and input it into the underlying RBM. Fix the layer parameters of the underlying RBM, calculate the first hidden feature, and calculate the activation probability of its hidden layer. The expression is as follows:
[0135]
[0136] h1 represents the first hidden feature; v represents the input data including the label; b1 represents the transpose of the weight matrix of the underlying RBM; b2 represents the bias of the underlying RBM.
[0137] A22. Randomly initialize the layer parameters of the high-level RBM, use the hidden features as input to the high-level RBM, fix the layer parameters of the high-level RBM layer, calculate the second hidden feature, and calculate the activation probability of its hidden layer. The expression is as follows:
[0138]
[0139] h1 represents the second hidden feature; h1 represents the first hidden feature; b1 represents the transpose of the weight matrix of the high-level RBM; b2 represents the bias of the high-level RBM.
[0140] A23. Reconstruct from the high-level RBM to the low-level RBM, and calculate the activation probability of the corresponding visible layer. The expression is as follows:
[0141] p(h′1|h2)=σ(W2h2+a2),
[0142] p(v′|h′1)=σ(W1h′1+a1),
[0143] h′1 represents the output of the high-level RBM after reconstruction; a2 represents the bias of the high-level RBM; v′ represents the output of the low-level RBM after reconstruction; a1 represents the bias of the low-level RBM.
[0144] A24. Calculate the reconstruction error based on v′ and v. If the reconstruction error is less than the minimum threshold, end the unsupervised training; otherwise, update the weight matrix and two bias terms based on the activation probabilities of the hidden probability layers of the bottom and high-level RBMs and the activation probabilities of the visible layers, and return to execute A21.
[0145] A3. Supervised fine-tuning.
[0146] The trained low-level and high-level RBMs are stacked and a classifier is added. Data is randomly selected from the training dataset as input, and the fault diagnosis results are output. A loss function is calculated based on the fault diagnosis results and real data. In this embodiment, the weighted cross loss function is selected. Fine-tuning ends if the loss function value is less than the minimum loss function threshold, otherwise it ends. Stochastic gradient descent is used to update the network parameters of the deep belief network.
[0147] A4. Validate the performance of the fine-tuned deep belief network in the validation set. If the performance is excellent, it will be used as the final deep belief network; otherwise, repeat A2 to A3.
[0148] Example 3
[0149] This invention also provides a city power grid fault detection and recovery system under extreme conditions for implementing the above-described method, including a central processing unit (CPU), which can execute various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from storage units into random access memory (RAM). The RAM can also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0150] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0151] The processing unit executes the various methods and processes described above, such as methods S1-S3 and A1-A3. For example, in some embodiments, methods S1-S3 and A1-A3 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1-S3 and A1-A3 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1-S3 and A1-A3 by any other suitable means (e.g., by means of firmware).
[0152] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0153] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0154] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0155] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for fault detection and recovery of urban power grid under extreme conditions, characterized in that, The methods include: Meteorological data, power grid operating parameters, meteorological-power grid coupling data, and distributed power source status data are acquired and preprocessed. The preprocessed data are spatiotemporally aligned to generate a spatiotemporal matrix. Based on the spatiotemporal matrix, a deep belief network is used to output the fault probability and fault type of each node in the power grid, and a fault dynamic warning threshold is calculated based on the fault probability. The power grid operating parameters include node voltage, branch current, and voltage phase angle. The power grid fault status is determined based on the aforementioned fault probability and dynamic warning value. If there is no fault in the power grid, no operation is performed. Conversely, draw a fault propagation topology diagram and mark the nodes where the fault occurs as fault points; After fault blocking based on the aforementioned fault propagation topology, dynamic recovery priority is calculated based on the aforementioned dynamic warning threshold, and islanded reconfiguration is performed based on the aforementioned dynamic recovery priority to restore the urban power grid.
2. The method for urban power grid fault detection and recovery under extreme conditions according to claim 1, characterized in that, The deep belief network comprises an input layer, a bottom-level RBM, a spatiotemporal attention mechanism layer, a high-level RBM, and an output layer. The method for outputting the fault probability and fault type of each node using the deep belief network includes: The preprocessed data is used to generate a three-dimensional tensor based on the three dimensions of time, space, and features. Sliding window sampling of the aforementioned three-dimensional tensor The time matrix is obtained; where T represents the number of data sampling time points, N represents the number of nodes in the urban power grid, F represents the number of data types acquired, and W represents the sliding window length. Key voltage derivative features were extracted based on preprocessed power grid operating parameters. The flattened time matrix is then input from the input layer into the bottom layer RBM to extract the first feature; where θ i This represents the power angle of the i-th node in the urban power grid. The Laplace operator represents the voltage of node i in a city power grid; The higher-level RBM receives the first feature and performs feature processing to generate the second feature; Based on the aforementioned spatiotemporal matrix, time weights and spatial weights are calculated. Based on the aforementioned time weights and spatial weights, the second feature is enhanced using a spatiotemporal attention mechanism layer to generate enhanced features. The output layer receives enhanced features and processes them using the softmax function to output the fault probability and fault type probability distribution of each node.
3. The method for urban power grid fault detection and recovery under extreme conditions according to claim 2, characterized in that, The spatiotemporal attention mechanism layer includes a temporal attention network and a spatial attention network. The methods for feature enhancement within this layer include: The expression for calculating the time attention score is as follows: u t =ReLU(W att-t h t,i +b att-t ), Among them, u t Indicates intermediate features over time; W att-t The first parameter of the time attention network; h t,i b represents the second feature of the i-th node at time t; att-t The second parameter of the time attention network is indicated; This represents the transpose of the time attention score weight vector; e t Indicates attentional time score; Based on the aforementioned time attention score, the time attention weight is calculated, and its expression is as follows: Among them, e s The time attention score for the s-th sliding window is represented by W; W represents the length of the sliding window. The spatial attention score is calculated using the following expression: Among them, z i W represents intermediate features in space. att-s b represents the first parameter of the spatial attention network. att-s The second parameter of a spatial attention network; g represents the transpose of the spatial attention score weight vector; i Indicates spatial attention score; Based on the aforementioned spatial attention score, the spatial attention weight is calculated, and its expression is as follows: Among them, g j Let represent the spatial attention score of the j-th node; N represents the number of nodes in the urban power grid. The enhancement feature is calculated based on the aforementioned temporal attention weights and spatial attention weights, and its expression is as follows:
4. The method for urban power grid fault detection and recovery under extreme conditions according to claim 1, characterized in that, The method for calculating the aforementioned fault dynamic warning threshold is as follows: Disaster levels are determined based on preprocessed meteorological data; The basic threshold for calculating the disaster level is expressed as follows: Where α and β represent constant coefficients, L d Indicates the level of disaster; The base threshold is corrected using the aforementioned fault probability, expressed as: T d =T base ·(1+γ·(0.5-Pf i ), where γ represents a constant coefficient; Pf i This represents the failure probability of the i-th node.
5. The method for urban power grid fault detection and recovery under extreme conditions according to claim 1, characterized in that, The method for drawing the aforementioned fault propagation topology diagram is as follows: The topological nodes of the urban power grid are used as nodes in the fault propagation topology graph, and edges are constructed based on the relationships between the topological nodes. The edge weights are calculated based on the aforementioned power grid operating parameters, which include node active power, node power angle, and node frequency. Their expressions are as follows: Where, θ j P represents the work angle of topological node j. i t represents the active power of node i in the topology. crit,i Let t represent the critical instability time of topological node i, and t crit,i =2H i / |△P i |,H i Let ΔP represent the inertia constant of the i-th topological node. i Δf represents the change in active power at node i in the topology; i f represents the difference between the actual frequency and the rated frequency of topology node i; nom This represents the rated frequency of topology node i.
6. The method for urban power grid fault detection and recovery under extreme conditions according to claim 1, characterized in that, The method for fault blocking based on the aforementioned fault propagation topology includes: Traverse all edges of the fault points in the fault propagation topology graph, and select edges with weights greater than a first preset value to construct a set of fault propagation paths for the corresponding fault points. If the failure probability of the fault point is greater than the aforementioned fault dynamic warning threshold, then the edges with weights greater than the second preset value in the fault propagation path set are disconnected, and the damping current mechanism is used to perform transient recovery on the topology nodes connected to the fault point. If the probability of a fault point is less than or equal to the dynamic fault warning threshold but greater than the early warning threshold, an early warning signal is generated.
7. The method for urban power grid fault detection and recovery under extreme conditions according to claim 6, characterized in that, The damping current mechanism involves injecting damping current into the topology node connected to the fault point to suppress oscillations in the urban power grid substructure corresponding to that topology node. The expression for calculating the damping current is as follows: Where K represents the damping coefficient, and the value of K decreases as the fault dynamic warning threshold increases; ΔV represents the difference between the target voltage required for the normal operation of the corresponding urban power grid substructure and the measured voltage.
8. The method for urban power grid fault detection and recovery under extreme conditions according to claim 1, characterized in that, The method for calculating the dynamic recovery priority is as follows: Obtain a historical dynamic fault warning threshold sequence, and calculate the disaster impact coefficient based on the historical dynamic fault warning threshold sequence; The expression for the adjusted recovery coefficient based on the aforementioned disaster impact coefficient is as follows: ω1(t)=κ·e -λt , ω2(t)=κ·log(1+t / τ), Where ω1(t) represents the infrastructure recovery coefficient; ω2(t) represents the economic activity recovery coefficient; λ represents the infrastructure attenuation coefficient; t represents time; τ represents the time constant of economic loss; and κ represents the corrected recovery coefficient. The dynamic priority is calculated based on the corrected restoration coefficient, and its expression is as follows: Priority=ω1(t)P infra +ω2(t)P econ +ω3(t)P life +ω4(t)P res , where P infra Indicates the impact of infrastructure; P econ Indicator of the impact of economic activity; P life Indicators of impact on life activities; P res ω3(t) represents the human activity impact index; ω4 represents the life activity recovery coefficient.
9. The method for urban power grid fault detection and recovery under extreme conditions according to claim 8, characterized in that, The method for calculating the corrected restitution coefficient is as follows: Among them, T h Indicates the duration of extreme conditions; T d (t) represents the fault dynamic warning threshold at time t.
10. A fault detection and recovery system for urban power grids under extreme conditions, characterized in that, The system is used to implement the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Intelligent power distribution network fault early warning system based on natural disasters
CN118137671A