Micro-grid fault diagnosis and dynamic recovery method based on deep reinforcement learning

Through the deep reinforcement learning method, the multimodal data of the microgrid is synchronously processed and the graph model is constructed, which solves the problems of data fusion and strategy flexibility in the microgrid fault diagnosis and recovery methods, realizes high-precision fault diagnosis and rapid recovery, adapts to topology changes, and ensures the safe and stable operation of the microgrid.

CN120597036APending Publication Date: 2025-09-05HEFEI UNIV OF TECH
View PDF 0 Cites 19 Cited by

Patent Information

Application Number
CN202510719948.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing microgrid fault diagnosis methods are difficult to effectively integrate multimodal feature data, resulting in one-sided characterization of equipment operating status and incomplete fault feature identification. Existing fault recovery methods cannot flexibly adjust recovery strategies, resulting in the inability to meet high-precision monitoring and real-time requirements.

Method used

A method based on deep reinforcement learning is adopted to synchronize the timestamps of multimodal data and process them through graph neural networks. A graph model of the microgrid is constructed, and fault features are extracted using a multi-layer graph attention layer and a time series feature fusion layer. Fault diagnosis and dynamic recovery are achieved by combining a cloud-based teacher model and an edge-side student model.

Benefits of technology

It achieves deep integration of multimodal data, improves the accuracy and response speed of fault diagnosis, can deal with complex faults within milliseconds, adapt to topology changes, and ensure the safe and stable operation of microgrids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120597036A_ABST
    Figure CN120597036A_ABST
Patent Text Reader

Abstract

The invention provides a micro-grid fault diagnosis and dynamic recovery method based on deep reinforcement learning, and the method focuses on the multi-modal features of key nodes through a graph attention mechanism, extracts fault features through a multi-layer graph attention layer, and captures the spatial dependence relation of micro-grid nodes to recognize a fault propagation path. Meanwhile, spatial features and historical multi-modal data are fused with the help of a gating circulation unit, space-time joint feature representation is constructed, pre-fault symptom time sequence evolution is captured, intermittency and early fault detection capacity are enhanced, the multi-modal feature data fusion problem is solved, and high-precision fault diagnosis is achieved. A knowledge distillation technology is adopted to deploy a lightweight student model at edge equipment, millisecond-level emergency response is realized, fault diffusion is prevented, and meanwhile, the accuracy of diagnosis and repair strategies is guaranteed. The optimal repair strategy is generated at the cloud through the teacher model by using the global data, the system can adapt to the topological change of the micro-grid and novel faults, and the fault processing capability is continuously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of microgrid fault diagnosis, and in particular to a microgrid fault diagnosis and dynamic recovery method based on deep reinforcement learning. Background Art

[0002] As a micro power generation and distribution system integrating distributed power sources, energy storage devices and loads, the complex topology and dynamic operating characteristics of microgrids lead to multiple challenges in fault diagnosis and recovery methods.

[0003] Currently, multimodal data such as electrical quantities (voltage, current, power, etc.), thermal characteristics (temperature distribution), acoustic and vibration characteristics are generated during the operation of the equipment. These data reflect the operating status of the equipment from different dimensions. However, when facing such multimodal data, existing solutions generally have problems such as low data fusion efficiency and insufficient utilization of information complementarity. Due to the lack of an effective multimodal data fusion mechanism, various types of data are often analyzed in isolation, resulting in a one-sided portrayal of the equipment's operating status and incomplete identification of fault characteristics, making it difficult to meet the high-precision monitoring needs of intelligent microgrid operation and maintenance. In other words, existing microgrid fault diagnosis methods are difficult to effectively fuse multimodal feature data, making it impossible to fully capture the equipment's operating status and fault characteristics, resulting in an inability to effectively distinguish between multi-device coupled faults.

[0004] As the execution link of fault handling, the fault recovery strategy can essentially be attributed to the optimization problem of network reconstruction. Its process generally includes: (1) Fault isolation. When a microgrid fault occurs, the first task is to remove the fault in the shortest possible time and investigate the fault location and fault type. (2) Load reduction. If necessary, low-priority loads need to be removed to maintain the stability of the power grid system. (3) Power supply restoration. By reconstructing the network topology, the power balance and voltage stability of other non-fault areas are ensured to maintain normal and stable operation. Existing microgrid fault recovery methods mainly rely on fixed logic design. Such methods have poor adaptability to scenarios and are difficult to deal with complex faults or new topologies. They also have low computational efficiency and high maintenance costs, and cannot meet the real-time and dynamic optimization requirements. Summary of the Invention

[0005] (1) Technical problems solved

[0006] In response to the shortcomings of the existing technology, the present invention provides a microgrid fault diagnosis and dynamic recovery method based on deep reinforcement learning, which solves the technical problems that the existing microgrid fault diagnosis method is difficult to effectively integrate multimodal feature data and the existing microgrid fault recovery method is unable to flexibly adjust the recovery strategy.

[0007] (2) Technical solution

[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0009] In a first aspect, the present invention provides a microgrid fault diagnosis method based on deep reinforcement learning, comprising:

[0010] Acquire multimodal data and perform synchronization timestamp alignment on the multimodal data to obtain time-aligned multimodal data;

[0011] The time-aligned multimodal data are processed to obtain a graphical model of the microgrid. The graphical model is based on the microgrid topology and includes a node set, branch connection relationships, and a node eigenvector matrix.

[0012] Through the pre-built graph neural network model, the node features and branch connection relationships in the microgrid graph model are transferred and aggregated, and the fault classification and location results are output;

[0013] The graph neural network model includes a multi-layer graph attention layer, a temporal feature fusion layer and an output layer;

[0014] In the multi-layer graph attention layer, key nodes in the graph model are extracted to achieve hierarchical extraction of fault features;

[0015] In the temporal feature fusion layer, the spatial feature sequence output by the multi-layer graph attention layer and the historical operating status of the node are temporally modeled through the gated recurrent unit to capture the dynamic evolution law of fault development.

[0016] Preferably, the multimodal data includes electrical parameters, thermal imaging, voiceprint and mechanical equipment data.

[0017] Preferably, aligning the synchronous timestamps of the multimodal data includes:

[0018] At the hardware level, the GNSS pulse-per-second generator is used as the master clock source. By capturing the rising edge of the PPS pulse signal, the edge computing gateway and sensor clocks are aligned to the GNSS time reference.

[0019] At the software level, the voltage data timestamp is used as the benchmark. The specific process is as follows: First, the median of the voltage sampling point timestamp is taken as the benchmark time t base , to suppress accidental synchronization deviation; secondly, calculate the time stamps of other sensor data and t base The average offset Δt k , eliminate the influence of random noise; then, select the interpolation method according to the data type: for continuous time series data such as vibration and voiceprint, use cubic spline interpolation to reconstruct the signal sequence to ensure continuity at the reference time point; for discrete data such as infrared thermal imagers, match the nearest reference timestamp through nearest neighbor interpolation. Finally, ensure the alignment quality through maximum time error check. If it does not meet the standard, the resynchronization process is triggered.

[0020] Preferably, the processing of the time-aligned multimodal data to obtain a graphical model of the microgrid includes:

[0021] Perform wavelet packet decomposition on the collected electrical parameters, select appropriate wavelet basis functions and decomposition levels, deconstruct the time domain signal into wavelet packet coefficients of different frequency sub-bands, calculate the energy, entropy and variance of each sub-band, and generate a multi-dimensional feature vector that represents the distribution characteristics in the time and frequency domain;

[0022] Fusion of multimodal data to form node feature vector x i =[Norm(f i,w ),Norm(f i,e ),Embedding(a i )], where each node i corresponds to a device in the microgrid, f i,w is the time-frequency domain feature of node i, which is the electrical parameter feature vector extracted by wavelet packet decomposition, f i,e is the original electrical quantity characteristic of node i, which refers to the real-time electrical parameter without decomposition, a i is the device type encoding, Norm(·) is the Z-score normalization function to eliminate feature scale differences, and Embedding(·) is the discrete vector generated by one-hot encoding, which is mapped to a continuous vector through the embedding layer;

[0023] The graph model of the microgrid is constructed based on the node feature vector and the topological structure of the microgrid G ​​= (V, E, X, A), where A represents the topological structure of the microgrid using the adjacency matrix, where A ij Indicates the connection relationship between nodes i and j. If there is a connection, then A ij =1, otherwise A ij =0; the electrical parameters of the branch are considered as the edge weights, V represents the node set including distributed power sources, loads, buses, switches and other equipment nodes; E represents the edge set, which represents the connection relationship of the branch; the node eigenvector matrix X integrates the multimodal data of each node to reflect the operating status of the equipment.

[0024] Preferably, the multi-layer graph attention layer includes: a first graph attention layer and a multi-layer attention layer stacking structure layer;

[0025] in,

[0026] The first graph attention layer is used to receive the node feature matrix X and the adjacency matrix A, and calculate the neighbor weights through the multi-head attention mechanism:

[0027]

[0028] Among them, x jis the initial feature of node j; K is the number of attention heads, which captures different subspaces of features through a multi-head mechanism; is the attention coefficient of the kth head, which calculates the attention degree of node i to neighbor node j through the attention mechanism;

[0029] The multi-layer attention layer stacking structure layer is used to output h based on the previous layer. i (l) Continue aggregation to capture high-order neighborhood features layer by layer to achieve hierarchical extraction of fault features. The update rules are as follows:

[0030]

[0031] in, represents the feature vector of node j in layer l; σ represents the activation function (ReLU); N (i) is the set of neighbor nodes of node i; is the attention coefficient of the k-th head, which is calculated as follows:

[0032]

[0033] Among them, a k is a trainable attention parameter vector; W k It represents the trainable weight matrix of the k-th head in the l-th layer, which is used to perform linear transformation on node features and extract deeper features; || is a vector concatenation operation.

[0034] Preferably, the data processing process in the temporal feature fusion layer includes:

[0035] The spatial feature sequence output by the multi-layer graph attention layer is integrated with the node historical multimodal data sequence through the gated recurrent unit, and the temporal dependency is captured through the gating mechanism. The formula is as follows:

[0036]

[0037] in, is the hidden state of node i at time t; It is the node spatial feature output by the last layer of GAT; It is the hidden state of node i at the previous moment and stores historical time series features;

[0038] The attention mechanism is introduced to quantify the contribution of different time steps to fault diagnosis and calculate the attention weight:

[0039]

[0040] Among them, β t is the attention weight of time step t, indicating the importance of this time step; is the hidden state vector of the tth time step in the sequence; W h is a trainable weight matrix used to transform hidden states; b h is a trainable bias vector; v is a trainable weight vector used to map the transformed hidden state to a scalar score; tanh is a hyperbolic tangent activation function that compresses the input value to the [-1, 1] interval; exp is an exponential function used to convert the score to a non-negative value; Indicates the summation of all time steps k to achieve Softmax normalization;

[0041] Aggregate multi-time features based on attention weights to form a final representation that includes the fault evolution law:

[0042]

[0043] in, The final time series fusion feature vector not only contains the spatial fault features at the current moment, but also encodes the temporal association of historical states; represents the weighted summation of all time steps t; Indicates that the attention weight β t and the hidden state at the corresponding time step Multiply.

[0044] In a second aspect, the present invention provides a microgrid fault diagnosis system based on deep reinforcement learning, comprising:

[0045] The data acquisition and alignment module is used to acquire multimodal data and perform synchronous timestamp alignment on the multimodal data to obtain time-aligned multimodal data;

[0046] A data processing module is used to process the time-aligned multimodal data to obtain a microgrid graph model. The graph model is based on the microgrid topology and includes a node set, branch connection relationships, and a node eigenvector matrix.

[0047] The fault diagnosis module is used to transfer and aggregate the node features and branch connection relationships in the microgrid graph model through a pre-built graph neural network model, and output fault classification and location results;

[0048] The graph neural network model includes a multi-layer graph attention layer, a temporal feature fusion layer and an output layer;

[0049] In the multi-layer graph attention layer, key nodes in the graph model are extracted to achieve hierarchical extraction of fault features;

[0050] In the temporal feature fusion layer, the spatial feature sequence output by the multi-layer graph attention layer and the historical operating status of the node are temporally modeled through the gated recurrent unit to capture the dynamic evolution law of fault development.

[0051] In a third embodiment, the present invention provides a microgrid dynamic recovery method based on deep reinforcement learning, comprising:

[0052] Using the microgrid fault diagnosis method based on deep reinforcement learning as described above, the fault classification and location results are obtained;

[0053] The cloud-based teacher model processes the fault classification and location results, generates a global recovery strategy, and parses it into executable instructions that are sent to the edge student model.

[0054] The edge student model receives the global strategy and makes adaptive adjustments to monitor the power grid status in real time; it uploads the recovery process data to the cloud. The teacher model updates the strategy library based on the new data, and the student model synchronously updates the local strategy to achieve collaborative optimization and experience feedback of the microgrid dynamic recovery method.

[0055] Preferably, the cloud-based teacher model processes the fault classification and location results, generates a global recovery strategy, and parses it into executable instructions that are sent to the edge-end student model, including:

[0056] The cloud collects fault data reported by multiple edge devices and constructs a global state vector:

[0057] s={Location1,Location2,…,p(1),p(2),…A,S}

[0058] Among them, A is the global adjacency matrix, S is the device state matrix, {Location i}, i = 1, 2, ... is the set of faults reported by multiple edge terminals;

[0059] Define the state space, action space and safety constraints of the teacher model decision to generate the global optimal repair strategy π safe (a|s), calculated as follows:

[0060]

[0061] Among them, π(a|s) is the original policy function, which outputs the probability of action a, Α valid is the set of legal actions generated by the rule engine;

[0062] The global recovery strategy including the time series is output for strategy distribution and knowledge distillation. The global strategy is compressed into an action sequence or parameter vector that can be executed at the edge, and the difference with the edge pre-loaded strategy is sent to the edge student model.

[0063] In a fourth aspect, the present invention provides a microgrid dynamic restoration system based on deep reinforcement learning, comprising:

[0064] A microgrid fault diagnosis module is used to obtain fault classification and location results using the microgrid fault diagnosis method based on deep reinforcement learning as described above;

[0065] The collaborative architecture module for cloud-side global optimization and edge-side real-time response is used to perform the following steps:

[0066] The cloud-based teacher model processes the fault classification and location results, generates a global recovery strategy, and parses it into executable instructions that are sent to the edge student model.

[0067] The edge student model receives the global strategy and makes adaptive adjustments, monitors the grid status in real time, and uploads the recovery process data to the cloud. The teacher model updates the strategy library based on the new data, and the student model synchronously updates the local strategy to achieve collaborative optimization and experience feedback of the microgrid dynamic recovery method.

[0068] (3) Beneficial effects

[0069] This invention provides a microgrid fault diagnosis and dynamic recovery method based on deep reinforcement learning. Compared with the existing technology, it has the following advantages:

[0070] 1. This invention adaptively focuses on the multimodal features of key nodes through a graph attention mechanism. Multi-layered graph attention layers achieve hierarchical extraction of fault features, accurately capturing the spatial dependencies between nodes in the microgrid topology and improving the identification of fault propagation paths. By integrating the spatial features output by the multi-layer graph attention layers with historical multimodal data using gated recurrent units, a joint spatiotemporal feature representation is constructed, effectively capturing the temporal evolution of pre-fault symptoms and enhancing the ability to detect intermittent and early-stage faults. This addresses the technical issue of existing methods that make it difficult to effectively fuse multimodal feature data, enabling high-precision fault diagnosis through deep fusion of multimodal data.

[0071] 2. Deploy a lightweight student model on edge devices. Based on the fault probability and location output by the graph neural network model, this model enables millisecond-level emergency response, preventing the spread of faults while ensuring the accuracy of diagnosis and repair strategies. In the cloud, the teacher model leverages global data to not only generate optimal repair strategies but also enables the system to adapt to changes in microgrid topology and new fault types, continuously improving fault handling capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0073] Figure 1 A block diagram of a microgrid fault diagnosis method based on deep reinforcement learning in Example 1

[0074] Figure 2 This is a flowchart of the microgrid dynamic recovery method based on deep reinforcement learning in Example 3;

[0075] Figure 3 Schematic diagram of the collaborative architecture of cloud-side global optimization and edge-side real-time response in Example 3. DETAILED DESCRIPTION

[0076] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0077] The embodiments of the present application provide a microgrid fault diagnosis and dynamic recovery method based on deep reinforcement learning, which solves the technical problems that existing microgrid fault diagnosis methods are difficult to effectively integrate multimodal feature data and existing microgrid fault recovery methods are unable to flexibly adjust recovery strategies, thereby improving diagnostic accuracy and ensuring that the system can quickly recover after a fault occurs and avoiding secondary faults.

[0078] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:

[0079] Existing microgrid fault diagnosis and dynamic recovery methods have the following main defects:

[0080] 1. It is difficult to effectively integrate multimodal data such as electrical quantities (voltage, current, etc.), thermal characteristics (temperature distribution), acoustic and vibration characteristics in the microgrid, and it is impossible to fully capture the operating status and fault characteristics of the equipment.

[0081] 2. Fault diagnosis response is delayed. Existing detection algorithms have complex data processing and require significant computational effort. This results in a long time from data acquisition to fault diagnosis output, resulting in response delays. This makes it difficult to meet the real-time requirements of microgrids, and can lead to serious consequences such as equipment damage and system failure.

[0082] 3. Lack of adaptive strategies. Traditional fault recovery strategies often use fixed logic designs, resulting in rigid recovery strategies. This leads to significant flaws when microgrid operating modes switch and topology changes dynamically. In the face of different fault scenarios and microgrid operating modes, the system state changes rapidly. Fixed protection logic cannot promptly and accurately identify faults and implement appropriate protection measures, leading to misjudgments, triggering inappropriate operations, or untimely protection.

[0083] In order to overcome the above-mentioned defects, an embodiment of the present invention provides a microgrid fault diagnosis and dynamic recovery method based on deep reinforcement learning. By constructing a multi-dimensional perception system and utilizing deep reinforcement learning technology, it solves the problems of insufficient data fusion, low diagnostic accuracy, and insufficient real-time responsiveness of recovery strategies in existing microgrids. It realizes high-precision fault diagnosis under deep fusion of multimodal data, real-time response in dynamic topology scenarios, and global optimal recovery of cloud-edge collaborative architecture, providing a systematic solution for the safe and stable operation of microgrids.

[0084] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0085] Example 1:

[0086] This embodiment provides a microgrid fault diagnosis method based on deep reinforcement learning, such as Figure 1 As shown, the method includes:

[0087] S1. Acquire multimodal data and perform synchronization timestamp alignment on the multimodal data to obtain time-aligned multimodal data;

[0088] S2. Process the time-aligned multimodal data to obtain a graph model of the microgrid, where the graph model is based on the microgrid topology and includes a node set, branch connection relationships (i.e., topological edges), and a node feature vector matrix;

[0089] S3. Through the pre-built graph neural network model, feature transfer and aggregation are performed on the node features (such as electrical quantities and thermal features) and branch connection relationships in the microgrid graph model, and the fault classification and location results are output;

[0090] The graph neural network model includes a multi-layer graph attention layer, a temporal feature fusion layer and an output layer;

[0091] In the multi-layer graph attention layer, key nodes in the graph model are extracted to achieve hierarchical extraction of fault features;

[0092] In the temporal feature fusion layer, the spatial feature sequence output by the multi-layer graph attention layer and the historical operating status of the node are temporally modeled through the gated recurrent unit (GRU) to capture the dynamic evolution law of fault development.

[0093] The embodiments of the present invention adaptively focus on the multimodal features of key nodes through a graph attention mechanism. The multi-layer stacked graph attention layer achieves hierarchical extraction of fault features, accurately captures the spatial dependencies between nodes in the microgrid topology, and improves the identification of fault propagation paths. By utilizing gated recurrent units to integrate the spatial features output by the multi-layer graph attention layer with historical multimodal data, a joint spatiotemporal feature representation is constructed, effectively capturing the temporal evolution of pre-fault symptoms. This enhances the ability to detect intermittent and early-stage faults, addresses the technical issue of existing methods that make it difficult to effectively fuse multimodal feature data, and enables high-precision fault diagnosis using deep fusion of multimodal data.

[0094] The following describes each step in detail:

[0095] In step S1, multimodal data is acquired and synchronized with the timestamps of the multimodal data to obtain time-aligned multimodal data. The specific implementation process is as follows:

[0096] Multimodal data includes electrical parameters, thermal imaging, voiceprints, and mechanical equipment data.

[0097] In microgrids, various types of sensors are deployed, including smart meters, fault recorders, infrared thermal imagers, fiber optic temperature sensors, microphones, and vibration sensors. Smart meters and fault recorders can accurately and in real time acquire electrical parameters. Infrared thermal imagers and fiber optic temperature sensors enable detailed monitoring of equipment temperature distribution, effectively capturing thermal imaging data and providing early warning of potential faults. Given that equipment anomalies are often accompanied by changes in acoustic characteristics, high-sensitivity microphones (frequency response range 20Hz-20kHz) are used to capture abnormal sound patterns during equipment operation. Vibration sensors collect multi-dimensional data on mechanical equipment, enriching the basis for fault diagnosis.

[0098] Since the collected multimodal data comes from different types of sensors, in order to achieve temporal consistency of multi-source heterogeneous sensor data, a synchronous timestamp alignment operation needs to be performed.

[0099] At the hardware level, the GNSS Pulse Per Second (PPS) generator is used as the master clock source. By capturing the rising edge of the PPS pulse signal, the edge computing gateway and sensor clocks are aligned to the GNSS time reference. In scenarios where GNSS signals are limited (such as indoor or underground environments), NTP (Network Time Protocol) or PTP (Precision Time Protocol) is used as the external clock source.

[0100] At the software level, since the voltage signal is the core indicator of grid synchronization, the software alignment is based on the voltage data timestamp. The specific process is as follows: First, the median of the voltage sampling point timestamp is taken as the reference time t base , to suppress accidental synchronization deviation; secondly, calculate the time stamps of other sensor data and t base The average offset Δt k , eliminating the effects of random noise. Then, the interpolation method is selected based on the data type: for continuous time series data such as vibration and voiceprint, cubic spline interpolation is used to reconstruct the signal sequence to ensure continuity at the reference time point. For discrete data such as infrared thermal imagers, nearest neighbor interpolation is used to match the nearest reference timestamp (with an allowable error range of ±50ms). Finally, a maximum time error check (required to be less than 100ms) is performed to ensure alignment quality. If the standard is not met, a resynchronization process is triggered.

[0101] After time alignment is achieved, multimodal data is stored in a time series database in a structured format with timestamps, including information such as electrical quantities (voltage, current, power, etc.), temperature fields (two-dimensional matrices), soundprints, and original vibration waveforms, forming a time-synchronized multidimensional data set, providing high-precision input features for subsequent fault diagnosis models.

[0102] In step S2, the time-aligned multimodal data is processed to obtain a microgrid graph model, where the graph model includes the microgrid topology, branch connection relationships, node sets (corresponding to the device nodes of the microgrid), and a node eigenvector matrix (each row corresponds to the multimodal eigenvector of a node). The specific implementation process is as follows:

[0103] First, the collected electrical parameters are decomposed by wavelet packets, and the appropriate wavelet basis function (db4 or sym8) and the number of decomposition layers (such as 3 layers) are selected to deconstruct the time domain signal into wavelet packet coefficients f of different frequency sub-bands. i,w , calculate the energy, entropy, variance and other statistics for each sub-band, and generate a multi-dimensional feature vector f that represents the time-frequency domain distribution characteristics i,e , to effectively capture abnormal frequency components and time domain mutations.

[0104] Then, the multimodal data is fused to form the node feature vector x i =[Norm(f i,w ),Norm(f i,e ),Embedding(a i )], each node i corresponds to a device in the microgrid (distributed power supply, load, bus, etc.), and its eigenvector consists of three parts, where f i,w is the time-frequency domain feature of node i, which is the electrical parameter feature vector extracted by wavelet packet decomposition, f i,eis the original electrical quantity characteristic of node i, which refers to the real-time electrical parameter without decomposition, a i is the device type code (e.g., distributed generation = 0, load = 1, bus = 2), Norm(·) is the Z-score normalization function to eliminate feature scale differences, and Embedding(·) maps the discrete vector generated by one-hot encoding to a continuous vector through the embedding layer.

[0105] Finally, a graph model of the microgrid is constructed based on the node feature vectors and the topological structure of the microgrid. In the embodiment of the present invention, the topological structure of the microgrid is represented by an adjacency matrix A, where A ij Indicates the connection relationship between nodes i and j (if there is a connection, then A ij =1, otherwise A ij =0). Meanwhile, considering the electrical parameters of the branches (such as resistance, reactance, conductance, or power transmission capacity) as edge weights, a complete graph model G = (V, E, X, A) is constructed. The node set V includes device nodes such as distributed power sources, loads, buses, and switches. E is the edge set, representing the connection relationships between branches (a branch represents an electrical connection between nodes (such as a transmission line or transformer) or a non-electrical association (such as a heat conduction path or vibration transmission path). Undirected edges represent bidirectional energy flow, and directed edges represent unidirectional transmission paths. The node feature vector matrix X integrates the multimodal data of each node (such as electrical quantities and thermal characteristics) to reflect the operating status of the equipment. This graph model encodes multi-source heterogeneous data such as electrical quantities and thermal characteristics into node feature vectors and establishes spatial associations based on the topological structure. This mapping of fragmented data into a unified graph feature space not only preserves the physical meaning of device status (node ​​features) and energy flow (edge ​​connections), but also provides structured input for subsequent cross-domain feature fusion in graph neural networks.

[0106] In step S3, the pre-built graph neural network model is used to transfer and aggregate the node features (such as electrical quantities and thermal characteristics) and branch connection relationships in the microgrid graph model, and output the fault classification and location results. The specific implementation process is as follows:

[0107] The pre-built graph neural network model (CNN model) includes a graph attention layer, a temporal feature fusion layer, and an output layer. The following is a detailed description of the structure and data processing process of each layer:

[0108] Graph Attention Layer (GAT): local feature extraction.

[0109] The first layer of GAT directly receives the node feature matrix X and adjacency matrix A generated in step S2, and calculates the neighbor weights through the multi-head attention mechanism:

[0110]

[0111] Among them, x j is the initial feature of node j (i.e., the multimodal feature vector in step S2); K is the number of attention heads, which captures different subspaces of features through the multi-head mechanism; is the attention coefficient of the kth head, and the attention degree of node i to neighbor node j is calculated through the attention mechanism.

[0112] Multi-layer attention layer stacking structure layer:

[0113] The subsequent GAT layer is based on the output h of the previous layer i (l) Continue aggregation to capture high-order neighborhood features (such as second-order and third-order neighbor relationships) layer by layer to achieve hierarchical extraction of fault features. The update rules are as follows:

[0114]

[0115] in, represents the feature vector of node j in layer l; σ represents the activation function (ReLU); N (i) is the set of neighbor nodes of node i; is the attention coefficient of the k-th head, which is calculated as follows:

[0116]

[0117] Among them, a k is a trainable attention parameter vector; W k It represents the trainable weight matrix of the k-th head in the l-th layer, which is used to perform linear transformation on node features and extract deeper features; || is a vector concatenation operation.

[0118] GAT can focus on key nodes in the graph model (such as devices near the fault point), and multi-layer stacking can achieve hierarchical extraction of fault features.

[0119] Temporal feature fusion layer: dynamic correlation modeling of spatiotemporal features.

[0120] First, the spatial feature sequence output by the multi-layer GAT is integrated with the node historical multimodal data sequence through the gated recurrent unit (GRU), and the temporal dependency is captured through the gating mechanism. The formula is as follows:

[0121]

[0122] in, is the hidden state of node i at time t; It is the node spatial feature output by the last layer of GAT; It is the hidden state of node i at the previous moment and stores historical time series features.

[0123] Then, the attention mechanism is introduced to quantify the contribution of different time steps to fault diagnosis and calculate the attention weight:

[0124]

[0125] Among them, β t is the attention weight (scalar) of time step t, indicating the importance of this time step; is the hidden state vector of the tth time step in the sequence; W h is a trainable weight matrix used to transform hidden states; b h is a trainable bias vector; v is a trainable weight vector used to map the transformed hidden state to a scalar score; tanh is a hyperbolic tangent activation function that compresses the input value to the [-1, 1] interval; exp is an exponential function used to convert the score to a non-negative value; It means summing all time steps k to achieve Softmax normalization.

[0126] Finally, the multi-time features are aggregated based on the attention weights to form the final representation that contains the fault evolution law:

[0127]

[0128] in, The final time series fusion feature vector not only contains the spatial fault characteristics (fault point location) at the current moment, but also encodes the temporal association of historical states; represents the weighted summation of all time steps t; Indicates that the attention weight β t and the hidden state at the corresponding time step Multiply.

[0129] The above content can capture the timing characteristics of fault development (such as changes in symptoms before the fault) and improve the ability to detect intermittent faults.

[0130] Output layer: fault classification and location.

[0131] First, the fault is classified. The high-dimensional feature vector output by the last layer of GAT is transformed into Mapping to fault type space:

[0132]

[0133] Among them, W f is the classification weight matrix, b f is the bias term, z cis the score vector of node i on the cth fault type.

[0134] The score is converted into a probability distribution through the Softmax function, and the conversion formula is as follows:

[0135]

[0136] Among them, p(y=c) represents the probability that the sample belongs to fault type c, z k is the mapping output of the kth fault type space, k = 1, 2, …, C, and C is the total number of fault types.

[0137] Then, the fault type with the highest probability is selected as the diagnosis result and the fault type is output.

[0138] Finally, troubleshoot the problem:

[0139]

[0140] Among them, argmax is to find the fault node corresponding to the data point with the highest fault probability. τ is the fault threshold (usually set to 0.7), which is a pre-set value used to determine whether a fault has occurred. If max(p) is greater than τ, it is considered that a fault has occurred and the fault location is located at argmax i p(i), otherwise, it is considered that no fault has occurred and the fault location is marked as NoFault; Location is the predicted fault location.

[0141] Example 2:

[0142] This embodiment provides a microgrid fault diagnosis system based on deep reinforcement learning, the system comprising:

[0143] The data acquisition and alignment module is used to acquire multimodal data and perform synchronous timestamp alignment on the multimodal data to obtain time-aligned multimodal data;

[0144] A data processing module is used to process the time-aligned multimodal data to obtain a microgrid graph model. The graph model is based on the microgrid topology and includes a node set, branch connection relationships (i.e., topological edges), and a node feature vector matrix.

[0145] The fault diagnosis module is used to transfer and aggregate the node characteristics (such as electrical quantities and thermal characteristics) and branch connection relationships in the microgrid graph model through a pre-built graph neural network model, and output fault classification and location results;

[0146] The graph neural network model includes a multi-layer graph attention layer, a temporal feature fusion layer and an output layer;

[0147] In the multi-layer graph attention layer, key nodes in the graph model are extracted to achieve hierarchical extraction of fault features;

[0148] In the temporal feature fusion layer, the spatial feature sequence output by the multi-layer graph attention layer and the historical operating status of the node are temporally modeled through the gated recurrent unit (GRU) to capture the dynamic evolution law of fault development.

[0149] It is understandable that the microgrid fault diagnosis system based on deep reinforcement learning provided in this embodiment corresponds to the above-mentioned microgrid fault diagnosis method based on deep reinforcement learning. The explanations, examples, beneficial effects, etc. of the relevant contents can refer to the corresponding contents in the microgrid fault diagnosis method based on deep reinforcement learning, and will not be repeated here.

[0150] Example 3:

[0151] This embodiment provides a microgrid dynamic recovery method based on deep reinforcement learning. Based on the fault classification and location obtained in Example 1, this method constructs the following collaborative architecture of cloud-side global optimization and edge-side real-time response to complete the dynamic recovery of the microgrid. Figure 2 As shown, specifically including:

[0152] S200: Using the microgrid fault diagnosis method based on deep reinforcement learning described in Example 1 to obtain fault classification and location results;

[0153] S300: Process the fault classification and location results through the cloud-based teacher model, generate a global recovery strategy, and parse it into executable instructions that are sent to the edge-end student model;

[0154] S400 and the edge student model receive the global strategy and make adaptive adjustments to monitor the grid status in real time; and upload the recovery process data (such as actual operation time and load recovery amount) to the cloud. The teacher model updates the strategy library based on the new data, and the student model synchronously updates the local strategy to achieve collaborative optimization and experience feedback of the microgrid dynamic recovery method.

[0155] The following combination Figure 3 The schematic diagram of the collaborative architecture of cloud-side global optimization and edge-side real-time response is shown in detail to illustrate this embodiment:

[0156] In this embodiment, a cloud-edge collaborative repair architecture is designed based on the fault probability and positioning results of the graph neural network model, and deep reinforcement learning (DRL) and knowledge distillation technology are used to achieve rapid response and global optimization after the fault. First, a global optimization model (teacher model) is constructed on the cloud based on DRL (such as PPO / DDPG), and historical fault data, microgrid topology and equipment parameters are input to generate the optimal repair strategy (such as switch operation sequence, power supply adjustment parameters) with the goal of minimizing recovery time and energy loss. Then, the teacher model is compressed through knowledge distillation, and the MobileNet lightweight architecture is adopted in combination with quantization-aware training (QAT) to be deployed to the edge device to achieve millisecond-level rapid response to the fault. Finally, the edge performs emergency response and local repair based on the student model, and uploads the fault data to the cloud at the same time; the cloud-based teacher model integrates global information to generate an optimization strategy, and updates the edge model through knowledge distillation to form a "diagnosis-decision-execution-optimization" closed loop.

[0157] The following describes each step in detail:

[0158] In step S300, it is necessary to first perform preliminary model training, and then implement edge fault diagnosis to obtain the fault probability matrix and positioning results and perform edge fast response. The specific steps are as follows:

[0159] Early model training

[0160] First, the teacher model is trained in the cloud.

[0161] Input: historical fault data (including fault probability and location results output by GNN), microgrid topology, and equipment operating parameters;

[0162] Model: Build a deep reinforcement learning model based on DDPG. Train the DRL model in the cloud based on historical data. The state space includes fault location, topology, load priority, etc. The reward function is:

[0163] R=-ω1·t restore -ω2·ΔE loss +ω3·U stable

[0164] Among them, t restore is the recovery time, ΔE loss is the energy loss, U stable Represents power supply reliability, ω i (i=1, 2, 3) is the weight coefficient, which represents the importance of each goal in the whole.

[0165] Output: Global optimal repair strategy (switching operation sequence, power supply adjustment parameters).

[0166] Then, knowledge distillation and student model generation are performed.

[0167] Compression goal: Migrate the teacher model (DDPG) to a lightweight MobileNet architecture student model through knowledge distillation;

[0168] Loss function:

[0169]

[0170] Among them, L KD The knowledge distillation loss measures the difference between the outputs of the teacher model and the student model, optimizes the student model's prediction of fault probability, and indirectly improves the accuracy of fault location. is the output of the teacher model, which indicates the predicted probability of the cth type of fault for the nth sample, reflecting the teacher model's judgment on the fault probability; is the output of the student model, which represents the predicted probability of the cth type fault for the nth sample. Its accuracy directly affects the fault location. α is the weighting coefficient, which balances the weights of the two parts of the loss and coordinates the knowledge transfer of the teacher model and the learning of the student model itself. N is the number of samples, representing the number of microgrid operating states or fault scenarios participating in the training.

[0171] This formula is obtained by minimizing L KD , so that the student model learns the fault probability prediction knowledge of the teacher model and optimizes distribution of . Accurate It can more reliably determine the nodes or categories with the highest probability of failure (i.e., fault location), thereby improving the accuracy of microgrid fault diagnosis and location.

[0172] Combined with quantization-aware training (QAT) technology, pseudo-quantization nodes are embedded in training to simulate 8-bit integer quantization errors, and gradient feedback is processed through the straight-through estimator (STE) to generate a low-precision but efficient model.

[0173] Finally, the model is deployed.

[0174] The teacher model and global policy library are stored in the cloud, and the lightweight model after knowledge distillation is deployed to edge devices for rapid response to local failures. By deploying the student model, the lightweight policy issued by the cloud is preloaded.

[0175] Edge fault diagnosis and rapid response:

[0176] Electrical quantities (voltage / current) and thermal characteristics of microgrid nodes are collected in real time and then spatially aligned. These are then fed into a GNN for real-time edge diagnosis. The GNN model then outputs the fault probability p(i) and the location result i. If P(i) exceeds a threshold, an edge-side emergency response is triggered: pre-defined safety policies are executed (such as disconnecting the faulty node or switching to a backup power source) to prevent the fault from spreading. Fault information is also sent to the cloud: {Location, p(i), TimeStamp}. Location represents the predicted fault location, p(i) represents the fault probability, and TimeStamp represents the timestamp.

[0177] In step S300, based on the fault information uploaded by the edge, a global recovery strategy is generated by the cloud teacher model and sent to the edge student model. The specific implementation process is as follows:

[0178] First, the cloud collects fault data reported by multiple edge devices and constructs a global state vector:

[0179] s={Location1,Location2,…,p(1),p(2),…A,S}

[0180] Among them, A is the global adjacency matrix, S is the device status matrix (normal / fault), {Location i}, i=1,2,… is the set of faults reported by multiple edge terminals.

[0181] Define the state space, action space, and safety constraints of the teacher model's decisions:

[0182] State space: fault location, topology, equipment capacity, load demand;

[0183] Action space: switch operation, power regulation, load shedding.

[0184] Safety constraints: Filter dangerous actions through the rule engine, such as prohibiting adjustments that exceed equipment capacity

[0185] Then, the global optimal repair strategy π is generated safe (a|s), calculated as follows:

[0186]

[0187] Among them, π(a|s) is the original policy function, which outputs the probability of action a, Α valid It is a set of legal actions generated by the rule engine (such as prohibiting the "overload load shedding" action), which ensures decision safety by prohibiting dangerous operations.

[0188] Finally, the global recovery strategy including the time series is output for policy distribution and knowledge distillation. The global strategy is compressed into an action sequence or parameter vector that can be executed at the edge. Only the difference with the edge preloaded strategy is sent to reduce communication volume.

[0189] In step S400, the edge student model receives the generated global recovery strategy and performs adaptive adjustments, uploading the recovery data to the cloud update strategy library to achieve collaborative optimization. The specific implementation process is as follows:

[0190] First, the edge device receives the optimization policy issued by the cloud and executes the precise repair actions of the global policy according to priority (such as closing switches in sequence and adjusting the output power of distributed power generation). If a new fault is detected during execution (such as a sudden drop in bus voltage), local re-optimization is triggered at the edge and reported to the cloud, providing real-time feedback on the execution results.

[0191] The cloud then collects edge execution data and uses edge feedback data to incrementally train the teacher model, thereby evaluating the teacher model's policy effectiveness and updating the reward function parameters. The edge student model is also regularly updated through knowledge distillation:

[0192]

[0193] Among them, θ student are the parameters (weights and biases) of the student model, which are the targets that need to be updated; θ teacher are the parameters of the teacher model. Knowledge Distillation Loss Function About the student model parameters θ student gradient.

[0194] Finally, by periodically triggering knowledge distillation, the optimized student model in the cloud is redeployed to the edge, thereby achieving collaborative optimization and experience feedback of the microgrid dynamic recovery method.

[0195] Example 4:

[0196] This embodiment provides a microgrid dynamic restoration system based on deep reinforcement learning, including:

[0197] A microgrid fault diagnosis module, configured to obtain fault classification and location results using the microgrid fault diagnosis method based on deep reinforcement learning described in Example 1;

[0198] The collaborative architecture module for cloud-side global optimization and edge-side real-time response is used to perform the following steps:

[0199] The cloud-based teacher model processes the fault classification and location results, generates a global recovery strategy, and parses it into executable instructions that are sent to the edge student model.

[0200] The edge student model receives the global strategy and makes adaptive adjustments to monitor the grid status in real time; it uploads the recovery process data (such as actual operation time and load recovery amount) to the cloud. The teacher model updates the strategy library based on the new data, and the student model synchronously updates the local strategy to achieve collaborative optimization and experience feedback of the microgrid dynamic recovery method.

[0201] It is understandable that the microgrid dynamic recovery system based on deep reinforcement learning provided in this embodiment corresponds to the above-mentioned microgrid dynamic recovery method based on deep reinforcement learning. The explanations, examples, beneficial effects, etc. of the relevant contents can refer to the corresponding contents in the microgrid dynamic recovery method based on deep reinforcement learning, and will not be repeated here.

[0202] In summary, compared with the existing technology, the present invention has the following beneficial effects:

[0203] 1. This embodiment of the present invention adaptively focuses on the multimodal features of key nodes through a graph attention mechanism. Multi-layered graph attention layers achieve hierarchical extraction of fault features, accurately capturing the spatial dependencies between nodes in the microgrid topology and improving the identification of fault propagation paths. A gated recurrent unit is used to integrate the spatial features output by the multi-layer graph attention layer with historical multimodal data to construct a joint spatiotemporal feature representation. This effectively captures the temporal evolution of pre-fault symptoms, enhances the detection capability of intermittent and early-stage faults, and addresses the technical issue of existing methods that make it difficult to effectively fuse multimodal feature data. This enables high-precision fault diagnosis through deep fusion of multimodal data.

[0204] 2. Deploy a lightweight student model on edge devices. Based on the fault probability and location output by the graph neural network model, this model enables millisecond-level emergency response, preventing the spread of faults while ensuring the accuracy of diagnosis and repair strategies. In the cloud, the teacher model leverages global data to not only generate optimal repair strategies but also enables the system to adapt to changes in microgrid topology and new fault types, continuously improving fault handling capabilities.

[0205] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0206] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A microgrid fault diagnosis method based on deep reinforcement learning, characterized in that: include: Acquire multimodal data and perform synchronization timestamp alignment on the multimodal data to obtain time-aligned multimodal data; The time-aligned multimodal data are processed to obtain a graphical model of the microgrid. The graphical model is based on the microgrid topology and includes a node set, branch connection relationships, and a node eigenvector matrix. Through the pre-built graph neural network model, the node features and branch connection relationships in the microgrid graph model are transferred and aggregated, and the fault classification and location results are output; The graph neural network model includes a multi-layer graph attention layer, a temporal feature fusion layer and an output layer; In the multi-layer graph attention layer, key nodes in the graph model are extracted to achieve hierarchical extraction of fault features; In the temporal feature fusion layer, the spatial feature sequence output by the multi-layer graph attention layer and the historical operating status of the node are temporally modeled through the gated recurrent unit to capture the dynamic evolution law of fault development.

2. The microgrid fault diagnosis method based on deep reinforcement learning according to claim 1, characterized in that: The multimodal data includes electrical parameters, thermal imaging, voiceprint and mechanical equipment data.

3. The microgrid fault diagnosis method based on deep reinforcement learning according to claim 1, characterized in that: The synchronizing timestamps of the multimodal data includes: At the hardware level, the GNSS pulse-per-second generator is used as the master clock source. By capturing the rising edge of the PPS pulse signal, the edge computing gateway and sensor clocks are aligned to the GNSS time reference. At the software level, the voltage data timestamp is used as the benchmark. The specific process is as follows: First, the median of the voltage sampling point timestamp is taken as the benchmark time t base , to suppress accidental synchronization deviation; secondly, calculate the time stamps of other sensor data and t base The average offset Δt k , eliminate the influence of random noise; then, select the interpolation method according to the data type: for continuous time series data such as vibration and voiceprint, use cubic spline interpolation to reconstruct the signal sequence to ensure continuity at the reference time point; for discrete data such as infrared thermal imagers, match the nearest reference timestamp through nearest neighbor interpolation. Finally, ensure the alignment quality through maximum time error check. If it does not meet the standard, the resynchronization process is triggered.

4. The microgrid fault diagnosis method based on deep reinforcement learning according to claim 1, characterized in that: The processing of the time-aligned multimodal data to obtain a graphical model of the microgrid includes: Perform wavelet packet decomposition on the collected electrical parameters, select appropriate wavelet basis functions and decomposition levels, deconstruct the time domain signal into wavelet packet coefficients of different frequency sub-bands, calculate the energy, entropy and variance of each sub-band, and generate a multi-dimensional feature vector that represents the distribution characteristics in the time and frequency domain; Fusion of multimodal data to form node feature vector x i =[Norm(f i,w ),Norm(f i,e ),Embedding(a i )], where each node i corresponds to a device in the microgrid, f i,w is the time-frequency domain feature of node i, which is the electrical parameter feature vector extracted by wavelet packet decomposition, f i,e is the original electrical quantity characteristic of node i, which refers to the real-time electrical parameter without decomposition, a i is the device type encoding, Norm(·) is the Z-score normalization function to eliminate feature scale differences, and Embedding(·) is the discrete vector generated by one-hot encoding, which is mapped to a continuous vector through the embedding layer; The graph model of the microgrid is constructed based on the node feature vector and the topological structure of the microgrid G ​​= (V, E, X, A), where A represents the topological structure of the microgrid using the adjacency matrix, where A ij Indicates the connection relationship between nodes i and j. If there is a connection, then A ij =1, otherwise A ij =0; the electrical parameters of the branch are considered as the edge weights, V represents the node set including distributed power sources, loads, buses, switches and other equipment nodes; E represents the edge set, which represents the connection relationship of the branch; the node eigenvector matrix X integrates the multimodal data of each node to reflect the operating status of the equipment.

5. The microgrid fault diagnosis method based on deep reinforcement learning according to claim 4, characterized in that: The multi-layer graph attention layer includes: a first graph attention layer and a multi-layer attention layer stacking structure layer; in, The first graph attention layer is used to receive the node feature matrix X and the adjacency matrix A, and calculate the neighbor weights through the multi-head attention mechanism: Among them, x j is the initial feature of node j; K is the number of attention heads, which captures different subspaces of features through a multi-head mechanism; is the attention coefficient of the kth head, which calculates the attention degree of node i to neighbor node j through the attention mechanism; The multi-layer attention layer stacking structure layer is used to output h based on the previous layer. i (l) Continue aggregation to capture high-order neighborhood features layer by layer to achieve hierarchical extraction of fault features. The update rules are as follows: in, represents the feature vector of node j in layer l; σ represents the activation function; N (i) is the set of neighbor nodes of node i; is the attention coefficient of the k-th head, which is calculated as follows: Among them, a k is a trainable attention parameter vector; W k It represents the trainable weight matrix of the k-th head in the l-th layer, which is used to perform linear transformation on node features and extract deeper features; || is a vector concatenation operation.

6. The microgrid fault diagnosis method based on deep reinforcement learning according to claim 4, characterized in that: The data processing process in the temporal feature fusion layer includes: The spatial feature sequence output by the multi-layer graph attention layer is integrated with the node historical multimodal data sequence through the gated recurrent unit, and the temporal dependency is captured through the gating mechanism. The formula is as follows: in, is the hidden state of node i at time t; It is the node spatial feature output by the last layer of GAT; It is the hidden state of node i at the previous moment and stores historical time series features; The attention mechanism is introduced to quantify the contribution of different time steps to fault diagnosis and calculate the attention weight: Among them, β t is the attention weight of time step t, indicating the importance of this time step; is the hidden state vector of the tth time step in the sequence; W h is a trainable weight matrix used to transform hidden states; b h is a trainable bias vector; v is a trainable weight vector used to map the transformed hidden state to a scalar score; tanh is a hyperbolic tangent activation function that compresses the input value to the [-1, 1] interval; exp is an exponential function used to convert the score to a non-negative value; Indicates the summation of all time steps k to achieve Softmax normalization; Aggregate multi-time features based on attention weights to form a final representation that includes the fault evolution law: in, The final time series fusion feature vector not only contains the spatial fault features at the current moment, but also encodes the temporal association of historical states; represents the weighted summation of all time steps t; Indicates that the attention weight β t and the hidden state at the corresponding time step Multiply.

7. A microgrid fault diagnosis system based on deep reinforcement learning, characterized in that: include: The data acquisition and alignment module is used to acquire multimodal data and perform synchronous timestamp alignment on the multimodal data to obtain time-aligned multimodal data; A data processing module is used to process the time-aligned multimodal data to obtain a microgrid graph model. The graph model is based on the microgrid topology and includes a node set, branch connection relationships, and a node eigenvector matrix. The fault diagnosis module is used to transfer and aggregate the node features and branch connection relationships in the microgrid graph model through a pre-built graph neural network model, and output fault classification and location results; The graph neural network model includes a multi-layer graph attention layer, a temporal feature fusion layer and an output layer; In the multi-layer graph attention layer, key nodes in the graph model are extracted to achieve hierarchical extraction of fault features; In the temporal feature fusion layer, the spatial feature sequence output by the multi-layer graph attention layer and the historical operating status of the node are temporally modeled through the gated recurrent unit to capture the dynamic evolution law of fault development.

8. A microgrid dynamic recovery method based on deep reinforcement learning, characterized in that: include: Adopting the microgrid fault diagnosis method based on deep reinforcement learning as described in any one of claims 1 to 6 to obtain fault classification and location results; The cloud-based teacher model processes the fault classification and location results, generates a global recovery strategy, and parses it into executable instructions that are sent to the edge student model. The edge student model receives the global strategy and makes adaptive adjustments to monitor the power grid status in real time; it uploads the recovery process data to the cloud. The teacher model updates the strategy library based on the new data, and the student model synchronously updates the local strategy to achieve collaborative optimization and experience feedback of the microgrid dynamic recovery method.

9. The microgrid dynamic recovery method based on deep reinforcement learning according to claim 8, characterized in that: The cloud-based teacher model processes the fault classification and location results, generates a global recovery strategy, and parses it into executable instructions that are sent to the edge-end student model, including: The cloud collects fault data reported by multiple edge devices and constructs a global state vector: s={Location1,Location2,…,p(1),p(2),…A,S} Among them, A is the global adjacency matrix, S is the device state matrix, {Location i }, i = 1, 2, ... is the set of faults reported by multiple edge terminals; Define the state space, action space and safety constraints of the teacher model decision to generate the global optimal repair strategy π safe (a|s), calculated as follows: Among them, π(a|s) is the original policy function, which outputs the probability of action a, Α valid is the set of legal actions generated by the rule engine; The global recovery strategy including the time series is output for strategy distribution and knowledge distillation. The global strategy is compressed into an action sequence or parameter vector that can be executed at the edge, and the difference with the edge pre-loaded strategy is sent to the edge student model.

10. A microgrid dynamic restoration system based on deep reinforcement learning, characterized in that: include: A microgrid fault diagnosis module, configured to obtain fault classification and location results using the microgrid fault diagnosis method based on deep reinforcement learning as described in any one of claims 1 to 6; The collaborative architecture module for cloud-side global optimization and edge-side real-time response is used to perform the following steps: The cloud-based teacher model processes the fault classification and location results, generates a global recovery strategy, and parses it into executable instructions that are sent to the edge student model. The edge student model receives the global strategy and makes adaptive adjustments, monitors the grid status in real time, and uploads the recovery process data to the cloud. The teacher model updates the strategy library based on the new data, and the student model synchronously updates the local strategy to achieve collaborative optimization and experience feedback of the microgrid dynamic recovery method.

Citation Information

Cited By

  • Multi-agent reinforcement learning fault diagnosis method based on edge-center hybrid optimization

    CN120804844A

  • Edge-center hybrid optimization multi-agent reinforcement learning method for fault diagnosis

    CN120804844B

  • Power cable fault sound recognition method and system based on multi-network fusion

    CN120847555A

  • Power cable fault sound recognition method and system based on multi-network fusion

    CN120847555B

  • Machine room monitoring method and system based on multi-source data fusion intelligent inspection robot

    CN120873999A