A micro-grid self-healing control method and system based on a large language model and adaptive optimization
By introducing a large language model and an adaptive optimization microgrid self-healing control method, combined with the Transformer model and an improved ant colony algorithm, the problem of lag in microgrid self-healing response under high-penetration renewable energy conditions is solved, achieving fast and reliable fault detection and isolation, and improving the system's self-healing capability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID JIANGSU ELECTRIC POWER CO LTD NANJING POWER SUPPLY COMPANY
- Filing Date
- 2026-01-19
- Publication Date
- 2026-06-05
AI Technical Summary
Existing microgrid self-healing methods are unable to respond quickly to dynamic changes in grid operating status under conditions of high renewable energy penetration, resulting in insufficient real-time fault diagnosis and recovery. Existing methods also have insufficient coverage of complex operating conditions, low optimization efficiency, and delayed fault self-healing response.
A microgrid self-healing control method based on large language model and adaptive optimization is adopted. By acquiring microgrid state information, a Transformer model with grid topology constraints is introduced for fault location. Self-healing control is achieved by combining a multi-agent system and an improved ant colony algorithm is used to optimize network reconstruction.
It achieves efficient and reliable fault detection and isolation in dynamic environments, improves fault identification accuracy and response speed, enhances the system's self-healing capability, and optimizes the fault recovery process.
Smart Images

Figure CN122159210A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system optimization and self-healing control technology, specifically relating to a microgrid self-healing control method and system based on large language models and improved ant colony optimization. Background Technology
[0002] With the increasing penetration of renewable energy sources such as photovoltaics and wind power, the uncertainty and volatility of power systems have significantly increased. Rapid power fluctuations not only challenge traditional dispatch strategies but also increase the complexity of fault propagation and recovery. Modern power grids urgently need highly resilient self-healing mechanisms to automatically detect, isolate, and restore power supply, thereby ensuring system reliability and economy.
[0003] Most existing self-healing methods rely on static grid topology models and manually set heuristic rules. Under conditions of high-proportion renewable energy integration, these methods struggle to reflect rapid changes in grid operating status in a timely manner. They also have limitations in dealing with dynamic fault propagation, multimodal data fusion, and adaptive updates during operation, resulting in insufficient real-time fault diagnosis and recovery.
[0004] In recent years, with the development of artificial intelligence, researchers have attempted to use novel intelligent methods such as large language models to learn and model power system operating data to assist in power grid state analysis and prediction. However, existing methods still suffer from insufficient coverage of complex operating conditions, low optimization efficiency, and delayed fault self-healing response. Therefore, how to achieve more efficient and reliable microgrid self-healing control in dynamic environments remains a pressing technical challenge. Summary of the Invention
[0005] Purpose of the Invention: The purpose of this invention is to overcome the shortcomings of traditional microgrid self-healing methods under conditions of high renewable energy penetration, especially the problems of slow self-healing response and inflexible scheduling. To this end, this invention proposes a microgrid self-healing control method and system based on a large language model and adaptive optimization.
[0006] Technical solution:
[0007] On the one hand, this invention proposes a microgrid self-healing control method based on a large language model and adaptive optimization, comprising:
[0008] The microgrid status information, including operation and maintenance logs and fault report texts, is obtained. All the obtained microgrid status information is preprocessed to obtain a dataset.
[0009] By introducing power grid topology constraints into the location encoding layer of the Transformer model, an improved model based on power grid physical constraints is established.
[0010] The dataset is input into the improved model, and the fault report text semantics in the dataset are combined to locate the fault in the microgrid.
[0011] Based on the faults located by the improved model, a microgrid control scheme including operation state switching and emergency control mechanisms is formulated. The microgrid control scheme is deployed to the equipment through a multi-agent system to achieve self-healing control of the microgrid.
[0012] Furthermore, the preprocessing includes data cleaning and standardization, format conversion and label generation, time-frequency feature extraction, anomaly detection and island identification, and multimodal fusion.
[0013] Furthermore, the introduction of power grid topology constraints into the location encoding layer of the Transformer model includes:
[0014] To address the spatial coupling characteristics of power systems, this invention introduces power grid topology constraints into the location coding layer and designs an impedance-weighted power domain location coding method:
[0015]
[0016] in, For sequence position, Here, d represents the feature dimension index, and d represents the model's hidden dimension. The weighting factor is calculated based on the power grid impedance matrix. This is a scaling constant.
[0017] Furthermore, the working process of the improved model includes:
[0018] For different signal characteristics, type-specific attention coefficients are introduced, and key features are highlighted through adaptive weights; large language models analyze text data such as operation and maintenance reports and scheduling logs to extract key descriptions, equipment names and geographical location information; semantic features and electrical features are mapped to a unified latent space, and classification or clustering analysis is performed using Transformer output embedding to predict fault type and location.
[0019] Furthermore, the operating status of the microgrid includes six categories: economic operation, normal operation, alarm operation, abnormal operation, recovery operation, and emergency operation. Among them, normal operation, alarm operation, emergency operation, and recovery operation refer to the recognized safety state model of the power system. Economic operation is defined as the energy optimization state that meets the safety constraints of the power system, and abnormal operation is defined as the state of equipment communication or non-fatal hardware damage.
[0020] Furthermore, the switching relationship of the operating state includes:
[0021] The operating status after emergency operation switchover includes alarm operation, recovery operation, abnormal operation, and normal operation. The operating status after recovery operation switchover includes alarm operation, abnormal operation, and normal operation. The operating status after abnormal operation switchover includes alarm operation and normal operation. The operating status after alarm operation switchover includes normal operation. The operating status after normal operation switchover includes economic operation.
[0022] Furthermore, the switching of the operating state is jointly triggered by the fault type, impact range and fault development trend prediction results output by the model in step 3, and is determined in combination with system safety constraints and operating margins. The specific threshold is set according to the engineering specifications.
[0023] Furthermore, the emergency control mechanism is activated when the operating state switches to the emergency operating state, including:
[0024] Real-time monitoring of status changes and rapid response to fault events; maximizing the recovery of lost loads and improving power supply reliability through network reconstruction, fault zone isolation, and grid-connected / islanded operation switching; optimization objective is to minimize load shedding and network losses; strategy is to prioritize the use of the main grid to restore power supply, followed by islanding of distributed power sources.
[0025] Furthermore, the network reconstruction introduces an improved ant colony algorithm, integrating grouping strategies and pheromone penalty updates, including:
[0026] Generate includes The initial population of each ant colony is determined by calculating and ranking the objective function fitness values of all ant colonies. Based on the ranking, the top 50% of ant colonies with the lowest fitness values are selected as high-quality solutions, and the rest are low-quality solutions. The high-quality ant colonies are then crossoverdone to generate a new high-quality offspring population, as shown in the following formula:
[0027]
[0028] in, For the generation of new, superior offspring; , From 1 to A random array that does not repeat between elements; The coefficients are random; ant colonies with poorly performing solutions use the following update formula:
[0029]
[0030]
[0031] in, A new population generated for the inferior group; This is the global mean vector for the entire population; Let be the mean of the i-th inferior group; The maximum number of iterations for the i-th ant colony in the inferior group; , These are the upper and lower bounds of the particle, respectively; r is a random number in the interval (0,1); This represents the current iteration number;
[0032] Introducing a penalty function into the information update strategy reduces the probability of ants choosing that path, expressed as:
[0033]
[0034] in, For the penalty function, This indicates the length of the globally optimal path found so far; the output of the ant colony algorithm directly corresponds to specific on / off switching and operating mode switching instructions.
[0035] On the other hand, this invention also proposes a microgrid self-healing control system based on a large language model and adaptive optimization, comprising:
[0036] The data collection module is used to obtain microgrid status information, including operation and maintenance logs and fault report texts. All the obtained microgrid status information is preprocessed to obtain a dataset.
[0037] The control unit module is used to introduce power grid topology constraints into the location encoding layer of the Transformer model and establish an improved model based on power grid physical constraints; the dataset is input into the improved model, and the fault location of the microgrid is determined by combining the fault report text semantics in the dataset.
[0038] The strategy design module is used to formulate a microgrid control scheme, including operation state switching and emergency control mechanism, based on the faults located by the improved model. The microgrid control scheme is deployed to the equipment through a multi-agent system to realize the microgrid self-healing control.
[0039] Beneficial Effects: This invention, with minimal or no human intervention, assesses operational status through real-time monitoring and intelligent algorithms, achieving automatic fault detection, isolation, and power restoration. Unlike methods relying on preset rules or static models, this solution can dynamically adapt to the complexity of microgrids and the fluctuating characteristics of renewable energy. Compared to existing technologies, the beneficial effects of this invention include:
[0040] (1) Significantly improved multimodal fault identification accuracy: This invention introduces a large language model to fuse topology and real-time signals, realizing the collaborative analysis of semantic and physical features, and significantly improving the accuracy of fault identification and location.
[0041] (2) Enhanced spatial correlation modeling capability: This invention embeds power grid topology impedance information in Transformer location encoding, enabling the model to have electrical distance perception capability and improving the accuracy of topology-related fault classification.
[0042] (3) Optimize algorithm convergence and global performance: The improved ant colony algorithm adopts a grouping and penalty mechanism to avoid getting trapped in local optima, significantly speeding up the convergence speed and improving the quality of the global optimal solution.
[0043] (4) Achieve closed-loop self-healing and rapid recovery: Construct a closed-loop system of data “collection-diagnosis-decision-control”, and complete fault isolation and dynamic scheduling through multi-agent collaboration to achieve real-time self-healing and stable system operation. Attached Figure Description
[0044] Figure 1 This is a flowchart of the method of the present invention;
[0045] Figure 2 This is a schematic diagram of a microgrid fault location mechanism based on a large language model.
[0046] Figure 3 This is a schematic diagram illustrating the switching relationships of microgrid operating states.
[0047] Figure 4 A flowchart for the improved ant colony optimization algorithm;
[0048] Figure 5 This is a block diagram of a microgrid self-healing control system. Detailed Implementation
[0049] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.
[0050] To achieve self-healing of microgrids under high renewable energy penetration conditions, this invention proposes a smart microgrid self-healing control method integrating multi-agent control, large language model, and improved ant colony algorithm. By introducing a fault location mechanism driven by a large language model, the location accuracy and response speed of the microgrid self-healing system are significantly improved. The specific process is as follows: Figure 1 As shown, it includes the following steps:
[0051] Step 1: Acquire information such as voltage, current, frequency, vibration, and relay status through various sensors and intelligent sensing devices, and collect operation and maintenance logs and fault report texts at the same time.
[0052] To meet the input requirements of subsequent large language models, the acquired raw data needs to undergo multiple layers of preprocessing to obtain a dataset that can be input into the large language model. The preprocessing specifically includes:
[0053] (1) Data cleaning and standardization: Remove redundant and erroneous records and normalize numerical features;
[0054] (2) Format conversion and label generation: Convert time series data into standardized input formats (JSON, CSV, etc.) and automatically generate feature labels for samples through semi-supervised learning;
[0055] (3) Time-frequency feature extraction: For non-stationary signals, wavelet packet decomposition and discrete wavelet transform are used to extract transient features of voltage and current; Daubechies-4 and Symlet-6 mother wavelets are used to capture local disturbances and high-frequency features;
[0056] (4) Anomaly detection and island identification: Frequency deviation and island effect are detected by adaptive Kalman filtering and phase-locked loop algorithm;
[0057] (5) Multimodal fusion: The Dempster-Shafer evidence theory is used to fuse current imbalance, impedance change and relay status to enhance the fault criteria.
[0058] The preprocessed dataset is input into a large language model and a Transformer feature extraction network to provide a unified multi-source feature representation for subsequent diagnosis.
[0059] Step 2: Introduce power grid topology constraints into the location encoding layer of the Transformer model to establish an improved model based on power grid physical constraints.
[0060] This invention employs an improved Transformer model based on power grid physical constraints for feature learning. The model utilizes a self-attention mechanism to capture medium- to long-distance dependencies between multi-dimensional sequences and achieves parallel computation through multi-head attention, thus balancing contextual expressiveness and computational efficiency. Addressing the spatial coupling characteristics of power systems, this invention introduces power grid topology constraints into the location encoding layer, designing an impedance-weighted power domain location encoding method.
[0061]
[0062] in, For sequence position, Here, d represents the feature dimension index, and d represents the model's hidden dimension. The weighting factor is calculated based on the power grid impedance matrix. This is a scaling constant. This improvement enables the model to perceive the electrical distances between nodes during the encoding process, thereby enhancing its ability to detect topology-related faults.
[0063] Through this structure, the Transformer model can simultaneously integrate temporal information and spatial dependencies to achieve deep semantic modeling of high-dimensional power grid signals, providing structured prior knowledge input for large language models.
[0064] Step 3: Input the preprocessed dataset into the improved model, and combine multi-source signals and text semantics to achieve multi-dimensional identification and localization of faults.
[0065] The improved model introduces type-specific attention coefficients for different signal characteristics (such as transient waveforms, frequency shifts, and relay actions), highlighting key features through adaptive weights; the large language model analyzes text data such as operation and maintenance reports and scheduling logs to extract key descriptions, equipment names, and geographical location information; semantic features and electrical features are mapped to a unified latent space, and classification or clustering analysis is performed using Transformer output embedding to predict fault types and locations; combined with model output and real-time monitoring data, regression analysis is used to predict fault development trends, enabling early intervention.
[0066] This invention significantly improves the fault location accuracy and response speed of microgrid self-healing systems by introducing a fault location mechanism driven by a large language model. The fault location mechanism is as follows: Figure 2 As shown, the large language model, by integrating semantic reasoning and time-series data analysis, can achieve fault feature identification and location reasoning in complex power grid operating environments. This method can complete multi-node fault diagnosis and location within milliseconds, significantly improving the self-healing speed and system reliability of microgrids.
[0067] Step 4: Based on the faults identified and located by the improved model in Step 3, formulate a microgrid control scheme, including operation state switching and emergency control mechanisms; deploy the microgrid control scheme to the equipment through a multi-agent system to achieve microgrid self-healing control.
[0068] Based on the fault information obtained in step 3, the microgrid's operating status is divided into six categories: economic operation, normal operation, alarm operation, abnormal operation, recovery operation, and emergency operation. Among these, normal, alarm, emergency, and recovery operations refer to the generally accepted safety state model for power systems. Economic operation is defined as an energy-optimized state that meets safety constraints, and abnormal operation is defined as a state of equipment communication or non-fatal hardware damage. The switching relationships between each operating state are as follows: Figure 3 As shown, the switching is triggered by the fault type, impact range, and fault development trend prediction results output by the model in step 3, and is determined by combining system safety constraints and operational margins. The specific threshold is set according to the engineering specifications.
[0069] To implement corresponding control switching for different states, this invention achieves this step through a multi-agent system. The multi-agent system decomposes complex problems into tasks that can be processed in parallel through autonomous cooperation and information sharing, and achieves global consistency and optimization in distributed decision-making.
[0070] The self-healing control described in this invention is mainly for fault situations that cause the system's safety constraints to be violated, and is triggered and implemented in emergency operation and recovery operation states; for faults identified in alarm or abnormal operation states, they are handled through conventional adjustment or local control, without the need to initiate strong self-healing measures such as network reconstruction.
[0071] When the operating state switches to emergency operation state, an emergency control mechanism is activated to monitor state changes in real time and respond quickly to fault events. Through network reconfiguration, fault zone isolation, and grid-connected / islanded operation switching, the microgrid achieves self-healing recovery, maximizing load recovery and improving power supply reliability. The optimization objective is to minimize load shedding and network losses. The strategy is to prioritize restoring power supply using the main grid, followed by islanding distributed generation sources to leverage their flexibility.
[0072] Specifically, when a microgrid fails, it is necessary to supply power to critical loads and maximize the recovery of lost loads. Distributed power generation can be divided into two modes: grid-connected and islanded. The objective function for islanded operation is:
[0073]
[0074] Where i is the switch number. Let j be the set of switches for island j. In switch state. Prioritize the connection of the switch to the load. This refers to the size of the connected load.
[0075] The constraints are as follows:
[0076]
[0077] in, For node voltage, For branch current, Let be the minimum and maximum voltage values of the i-th node, respectively. These are the maximum and minimum values of the branch current, respectively. Let the total load of the j-th island be , This represents the total capacity of all distributed power sources within the island.
[0078] The multi-objective optimization function of the emergency control model is:
[0079]
[0080] in, and These represent the system load shedding and network losses following a microgrid fault, respectively. and These are the weighting coefficients.
[0081] The expression is:
[0082]
[0083] in, and These represent the number of load nodes in the normal operation state and the fault recovery state of the microgrid, respectively; and These represent the first and second stages under normal operation and fault recovery states, respectively. The load power of each node.
[0084] The expression is as follows:
[0085]
[0086] in, The number of system branches; Indicates the first The resistance of each branch; , and They represent the first The active power, reactive power, and voltage amplitude of each branch.
[0087] The constraints are as follows:
[0088]
[0089] in, and These represent the lower and upper limits of the total system load, respectively.
[0090] Network reconfiguration is a core decision-making step in self-healing control, transitioning from fault isolation to power restoration. Addressing the characteristics of the self-healing reconfiguration problem—large scale, numerous constraints, and susceptibility to local optima—this invention proposes an improved ant colony algorithm that integrates a grouping strategy with pheromone penalty updates to enhance search diversity and convergence efficiency. The improved ant colony algorithm is used to solve for the optimal reconfiguration scheme on the isolated network structure. Its output directly corresponds to specific switch-on and operation mode switching commands, which are executed by a multi-agent system as part of the control scheme, thereby achieving self-healing recovery of the microgrid.
[0091] Traditional ant colony optimization algorithms do not explicitly group ants, resulting in a lack of population diversity, a tendency to get trapped in local optima, and difficulty in fully searching for the global optimum. By introducing a grouping strategy, the crossover of high-quality solutions is promoted, and population updates are accelerated, which can improve search efficiency and convergence speed.
[0092] First generate the included The initial population of each ant colony is determined, and the fitness values of all ant colonies within the population are calculated and ranked. Based on the ranking, the top 50% of ant colonies with the lowest fitness values are selected as high-quality clusters, and the rest are considered low-quality clusters. The high-quality clusters are then crossoverdated to generate a new high-quality offspring population, as shown in the following formula:
[0093]
[0094] in, For the generation of new, superior offspring; , From 1 to A random array that does not repeat between elements; These are random coefficients.
[0095] For ant colonies with poor disintegration, the following update formula is used:
[0096]
[0097]
[0098] in, A new population generated for the inferior group; This is the global mean vector for the entire population; Let be the mean of the i-th inferior group; The maximum number of iterations for the i-th ant colony in the inferior group; , These are the upper and lower bounds of the particle, respectively; r is a random number in the interval (0,1); This represents the current iteration number.
[0099] During the search process, ant colonies are prone to path congestion, leading to the decay of local path information and affecting subsequent searches. This invention introduces a penalty function into the information update strategy to reduce the probability of ants choosing a particular path, encouraging them to better explore the solution space, thereby improving the algorithm's search capability and solution quality. This is expressed as:
[0100]
[0101] in, For the penalty function, This represents the length of the globally optimal path found so far.
[0102] The improved ant colony optimization algorithm used in this invention has the following process: Figure 4 As shown, the specific steps include the following:
[0103] Step 1: Determine the initial parameters of the system, including the number of switches, branch lines, and node loads;
[0104] Step 2: Set initial values, including ant colony size M, maximum number of iterations N, and initial pheromone value;
[0105] Step 3: Randomly select one of the solutions as the current optimal solution;
[0106] Step 4: Each ant selects a branch from the set of switches and disconnects that branch. After the selection is completed, a constraint judgment is performed. If the constraint is satisfied, the objective function value is calculated; otherwise, it is discarded.
[0107] Step 5: After all ants have made their selections, compare the minimum objective function value with the current optimal solution. If the minimum objective function value is better, replace the current optimal solution; otherwise, retain the current optimal solution.
[0108] Step 6: Based on the selection results of all ants, update the pheromone concentration of each branch according to the objective function value of the scheme;
[0109] Step 7: When the number of iterations reaches N, the process ends and the global optimal solution is obtained.
[0110] The algorithm first initializes parameters such as the number of switches, branch paths, and node loads, and sets the ant colony size M, the maximum number of iterations N, and the initial pheromone concentration. Then, each ant sequentially selects a branch from the switch set and disconnects it, checking if the constraints are satisfied. If satisfied, the objective function is calculated; otherwise, the solution is discarded. After all ants have made their selections, the minimum objective function value is compared with the current optimal solution, and the pheromone concentration is updated accordingly. This process combines a penalty function and a grouping strategy for dynamic iteration until convergence, ensuring the acquisition of the globally optimal solution.
[0111] On the other hand, this invention also proposes a microgrid self-healing control system based on a large language model and adaptive optimization, which is run to implement all the steps of the aforementioned method. In this embodiment, the overall architecture of the system includes a real-time data module, a control unit module, and a strategy design module, such as... Figure 5 As shown, specifically:
[0112] The real-time data module is responsible for collecting multi-source operating data from sensors, protection devices, and smart terminals, including voltage, current, frequency, temperature, vibration, and switch status, to achieve continuous monitoring and updating of the microgrid's operating status.
[0113] The control unit module is responsible for data processing, fault detection, and control execution.
[0114] The strategy design module generates and optimizes self-healing strategies based on historical operating data and simulation scenarios using a large language model.
[0115] The three modules work together to build a closed-loop mechanism from data perception to intelligent diagnosis to adaptive optimization control, ensuring that the microgrid can quickly and accurately achieve self-healing after a fault occurs.
Claims
1. A self-healing control method for microgrids based on large language models and adaptive optimization, characterized in that, include: The microgrid status information, including operation and maintenance logs and fault report texts, is obtained. All the obtained microgrid status information is preprocessed to obtain a dataset. By introducing power grid topology constraints into the location encoding layer of the Transformer model, an improved model based on power grid physical constraints is established. The dataset is input into the improved model, and the fault report text semantics in the dataset are combined to locate the fault in the microgrid. Based on the faults located by the improved model, a microgrid control scheme including operation state switching and emergency control mechanisms is formulated. The microgrid control scheme is deployed to the equipment through a multi-agent system to achieve self-healing control of the microgrid.
2. The microgrid self-healing control method according to claim 1, characterized in that, The preprocessing includes data cleaning and standardization, format conversion and label generation, time-frequency feature extraction, anomaly detection and island identification, and multimodal fusion.
3. The microgrid self-healing control method according to claim 2, characterized in that, The introduction of power grid topology constraints into the location encoding layer of the Transformer model includes: To address the spatial coupling characteristics of power systems, this invention introduces power grid topology constraints into the location coding layer and designs an impedance-weighted power domain location coding method: in, For sequence position, Here, d represents the feature dimension index, and d represents the model's hidden dimension. The weighting factor is calculated based on the power grid impedance matrix. This is a scaling constant.
4. The microgrid self-healing control method according to claim 3, characterized in that, The working process of the improved model includes: For different signal characteristics, type-specific attention coefficients are introduced, and key features are highlighted through adaptive weights; large language models analyze text data such as operation and maintenance reports and scheduling logs to extract key descriptions, equipment names and geographical location information; semantic features and electrical features are mapped to a unified latent space, and classification or clustering analysis is performed using Transformer output embedding to predict fault type and location.
5. The microgrid self-healing control method according to claim 4, characterized in that, The operating states include economic operation, normal operation, alarm operation, abnormal operation, recovery operation, and emergency operation. Among them, normal operation, alarm operation, emergency operation, and recovery operation refer to the recognized safety state model of the power system. Economic operation is defined as the energy optimization state that meets the safety constraints of the power system, and abnormal operation is defined as the state of equipment communication or non-fatal hardware damage.
6. The microgrid self-healing control method according to claim 5, characterized in that, The switching relationships of the operating state include: The operating status after emergency operation switchover includes alarm operation, recovery operation, abnormal operation, and normal operation. The operating status after recovery operation switchover includes alarm operation, abnormal operation, and normal operation. The operating status after abnormal operation switchover includes alarm operation and normal operation. The operating status after alarm operation switchover includes normal operation. The operating status after normal operation switchover includes economic operation.
7. The microgrid self-healing control method according to claim 6, characterized in that, The switching of the operating state is jointly triggered by the fault type, scope of impact and fault development trend prediction results output by the model in step 3, and is determined in combination with system safety constraints and operating margin. The specific threshold is set according to the engineering specifications.
8. The microgrid self-healing control method according to claim 7, characterized in that, The emergency control mechanism is activated when the operating state switches to emergency operating state, including: Real-time monitoring of status changes and rapid response to fault events; maximizing the recovery of lost loads and improving power supply reliability through network reconstruction, fault zone isolation, and grid-connected / islanded operation switching; optimization objective is to minimize load shedding and network losses; strategy is to prioritize the use of the main grid to restore power supply, followed by islanding of distributed power sources.
9. The microgrid self-healing control method according to claim 8, characterized in that, The network reconstruction introduces an improved ant colony algorithm, which integrates grouping strategies and pheromone penalty updates, including: Generate includes The initial population of each ant colony is determined by calculating and ranking the objective function fitness values of all ant colonies. Based on the ranking, the top 50% of ant colonies with the lowest fitness values are selected as high-quality solutions, and the rest are low-quality solutions. The high-quality ant colonies are then crossoverdone to generate a new high-quality offspring population, as shown in the following formula: in, For the generation of new, superior offspring; , From 1 to A random array where no two elements repeat. The coefficients are random; ant colonies with poorly performing solutions use the following update formula: in, A new population generated for the inferior group; This is the global mean vector for the entire population; Let be the mean of the i-th inferior group; The maximum number of iterations for the i-th ant colony in the inferior group; , These are the upper and lower bounds of the particle, respectively; r is a random number in the interval (0,1); This represents the current iteration number; Introducing a penalty function into the information update strategy reduces the probability of ants choosing that path, expressed as: in, For the penalty function, This indicates the length of the globally optimal path found so far; the output of the ant colony algorithm directly corresponds to specific on / off switching and operating mode switching commands.
10. A microgrid self-healing control system based on a large language model and adaptive optimization, characterized in that, include: The data collection module is used to obtain microgrid status information, including operation and maintenance logs and fault report texts. All the obtained microgrid status information is preprocessed to obtain a dataset. The control unit module is used to introduce power grid topology constraints into the location encoding layer of the Transformer model and establish an improved model based on power grid physical constraints; the dataset is input into the improved model, and the fault location of the microgrid is determined by combining the fault report text semantics in the dataset. The strategy design module is used to formulate a microgrid control scheme, including operation state switching and emergency control mechanism, based on the faults located by the improved model. The microgrid control scheme is deployed to the equipment through a multi-agent system to realize the microgrid self-healing control.