arXiv ScienceSearch

arXiv subjects

Chenhui Lin

Publications and source records attributed to Chenhui Lin.

15 recordsLinked to original sources

LLMs are Few-Shot Decision-Makers: Generalized Context-Aware Microgrid Frequency Control through Prompt Decision Transformer

The rapid evolution of energy structures has positioned microgrids as pivotal components of next-generation power systems, offering enhanced resilience and renewable energy integration. However, the inherent low inertia, complex dynamics, and poor model conditions of microgrids necessitate advanced data-driven frequency control strategies. Although reinforcement learning (RL) has demonstrated certain potential and advantages, existing RL methods often struggle with generalization across diverse microgrid configurations and lack adaptability to unseen environments, particularly when explicit system parameters are unavailable. To address these challenges, in this paper, we introduce a novel prompt decision transformer (Prompt-DT) architecture for microgrid frequency control. Unlike traditional approaches that rely on hard-to-obtain environmental characteristic parameters, the proposed method leverages few-shot expert historical trajectories as prompts to guide autonomous perception and adaptive decision-making. In addition, we propose a context-aware training and execution mechanism utilizing self-supervised contrastive learning to enhance environment recognition and prompt utilization efficiency. In addition, a physics-informed prompt design technique that filters prompts based on cumulative reward and frequency volatility is proposed, ensuring high-quality physical guidance during online execution. Finally, to ensure generalization in unseen environments with limited data, we develop a lightweight finetuning approach that achieves performance comparable to full-parameter finetuning with minimal adjustments.

eess.SY

Two-Stage Active Distribution Network Voltage Control via LLM-RL Collaboration: A Hybrid Knowledge-Data-Driven Approach

The growing integration of distributed photovoltaics (PVs) into active distribution networks (ADNs) has exacerbated operational challenges, making it imperative to coordinate diverse equipment to mitigate voltage violations and enhance power quality. Although existing data-driven approaches have demonstrated effectiveness in the voltage control problem, they often require extensive trial-and-error exploration and struggle to incorporate heterogeneous information, such as day-ahead forecasts and semantic-based grid codes. Considering the operational scenarios and requirements in real-world ADNs, in this paper, we propose a hybrid knowledge-data-driven approach that leverages dynamic collaboration between a large language model (LLM) agent and a reinforcement learning (RL) agent to achieve two-stage voltage control. In the day-ahead stage, the LLM agent receives coarse region-level forecasts and generates scheduling strategies for on-load tap changer (OLTC) and shunt capacitors (SCs) to regulate the overall voltage profile. Then in the intra-day stage, based on accurate node-level measurements, the RL agent refines terminal voltages by deriving reactive power generation strategies for PV inverters. On top of the LLM-RL collaboration framework, we further propose a self-evolution mechanism for the LLM agent and a pretrain-finetune pipeline for the RL agent, effectively enhancing and coordinating the policies for both agents. The proposed approach not only aligns more closely with practical operational characteristics but also effectively utilizes the inherent knowledge and reasoning capabilities of the LLM agent, significantly improving training efficiency and voltage control performance. Comprehensive comparisons and ablation studies demonstrate the effectiveness of the proposed method.

eess.SY

Learning to Sample in Variable Neighborhood Search Algorithm for Urban Cable Routing Optimization

Urban underground cable construction is essential for enhancing power grid reliability, yet the high construction costs demand systematic optimization. Constrained by road network infrastructure, this problem requires consideration of both connectivity relationships between substations and specific routing strategies along road networks, constituting a large-scale bilevel combinatorial optimization problem. Insufficient attention to routing subproblems in traditional research and simplistic algorithmic designs ill-equipped for large-scale optimization leave substantial room for advancement. To navigate the enormous combinatorial search space, we propose a learning-assisted variable neighborhood search (L-VNS) algorithm integrating four key components. First, an auxiliary task focusing on the upper-level connectivity subproblem generates high-quality initial solutions by employing hybrid genetic search for connection optimization and A* for detailed path routing. Subsequently, the algorithm iteratively refines the connectivity topology using variable neighborhood search with three complementary operators. A multi-agent deep reinforcement learning module adaptively guides probabilistic neighborhood sampling by jointly encoding upper-level connectivity patterns and lower-level routing structures, effectively exploiting problem structure. Finally, a modified A* operator re-plans lower-level paths affected by neighborhood modifications to ensure feasibility and solution completeness. Comprehensive experiments on 12 benchmark instances and 3 GIS-derived instances demonstrate the superiority of L-VNS, achieving total construction cost reductions of 0.92% to 73.72% compared to representative approaches. Ablation studies and sensitivity analyses further validate the effectiveness and robustness of the proposed algorithm.

cs.NE

One Request, Multiple Experts: LLM Orchestrates Domain Specific Models via Adaptive Task Routing

With the integration of massive distributed energy resources and the widespread participation of novel market entities, the operation of active distribution networks (ADNs) is progressively evolving into a complex, multi-scenario, and multi-objective problem. Although expert engineers have developed numerous domain specific models (DSMs) to address distinct technical problems, mastering, integrating, and orchestrating these heterogeneous DSMs still entail considerable overhead for ADN operators. Therefore, an intelligent approach is urgently required to unify these DSMs and enable efficient coordination. To address this challenge, this paper proposes the ADN-Agent architecture, which leverages a general large language model (LLM) to coordinate multiple DSMs, enabling adaptive intent recognition, task decomposition, and DSM invocation. Within the ADN-Agent, we design a novel communication mechanism that provides a unified and flexible interface for diverse heterogeneous DSMs. Finally, for specific language-intensive subtasks, we propose an automated training pipeline for fine-tuning small language models, thereby effectively enhancing the overall problem-solving capability of the system. Comprehensive comparisons and ablation experiments validate the efficacy of the proposed method and demonstrate that the ADN-Agent architecture outperforms existing LLM application paradigms.

eess.SY

Novel discretization method to calculate g-functions of vertical geothermal boreholes with improved accuracy and efficiency

The calculation of g-functions is essential for the design and simulation of geothermal boreholes. However, existing methods, such as the stacked finite line source (SFLS) model, face challenges regarding computational efficiency and accuracy, particularly with fine-grained discretization. This paper introduces a novel discretization method to address these limitations. We reformulate the g-function calculation under the uniform borehole wall temperature boundary condition as the solution to spatio-temporal integral equations. The SFLS model is identified as a special case using stepwise approximation of the heat extraction rate. Our proposed method employs the Gauss-Legendre quadrature to approximate the spatial integrals with a weighted sum of function values at strategically chosen points. This transforms the time-consuming segment-to-segment integral calculations in SFLS model into simpler and analytical point-to-point response factors. Furthermore, we identify that the governing integral equations are of the Fredholm first kind, leading to ill-conditioned linear systems that can cause g-function to diverge at high discretization orders. To address this, a regularization technique is implemented to ensure stable and convergent solutions. Numerical tests demonstrate that the proposed method is significantly more efficient, achieving comparable or improved accuracy at speeds 20 to 200 times faster than the SFLS model with optimized nonuniform discretization schemes.

physics.comp-ph

Large Language Model Powered Automated Modeling and Optimization of Active Distribution Network Dispatch Problems

The increasing penetration of distributed energy resources into active distribution networks (ADNs) has made effective ADN dispatch imperative. However, the numerous newly-integrated ADN operators, such as distribution system aggregators, virtual power plant managers, and end prosumers, often lack specialized expertise in power system operation, modeling, optimization, and programming. This knowledge gap renders reliance on human experts both costly and time-intensive. To address this challenge and enable intelligent, flexible ADN dispatch, this paper proposes a large language model (LLM) powered automated modeling and optimization approach. First, the ADN dispatch problems are decomposed into sequential stages, and a multi-LLM coordination architecture is designed. This framework comprises an Information Extractor, a Problem Formulator, and a Code Programmer, tasked with information retrieval, optimization problem formulation, and code implementation, respectively. Afterwards, tailored refinement techniques are developed for each LLM agent, greatly improving the accuracy and reliability of generated content. The proposed approach features a user-centric interface that enables ADN operators to derive dispatch strategies via simple natural language queries, eliminating technical barriers and increasing efficiency. Comprehensive comparisons and end-to-end demonstrations on various test cases validate the effectiveness of the proposed architecture and methods.

cs.AI

Large Language Model as An Operator: An Experience-Driven Solution for Distribution Network Voltage Control

With the advanced reasoning, contextual understanding, and information synthesis capabilities of large language models (LLMs), a novel paradigm emerges for the autonomous generation of dispatch strategies in modern power systems. In this paper, we propose an LLM-based experience-driven day-ahead Volt/Var schedule solution for distribution networks, which enables the self-evolution of LLM agent's strategies through the collaboration and interaction of multiple modules, specifically, experience storage, experience retrieval, experience generation, and experience modification. The experience storage module archives historical operational records and decisions, while the retrieval module selects relevant past cases according to current forecasting conditions. The LLM agent then leverages these retrieved experiences to generate new, context-aware decisions for current situation, which are subsequently refined by the modification module to realize self-evolution of the dispatch policy. Comprehensive experimental results validate the effectiveness of the proposed method and highlight the applicability of LLMs in power system dispatch problems facing incomplete information.

eess.SY

Graph Attention Networks Unleashed: A Fast and Explainable Vulnerability Assessment Framework for Microgrids

Independent microgrids are crucial for supplying electricity by combining distributed energy resources and loads in scenarios like isolated islands and field combat. Fast and accurate assessments of microgrid vulnerability against intentional attacks or natural disasters are essential for effective risk prevention and design optimization. However, conventional Monte Carlo simulation (MCS) methods are computationally expensive and time-consuming, while existing machine learning-based approaches often lack accuracy and explainability. To address these challenges, this study proposes a fast and explainable vulnerability assessment framework that integrates MCS with a graph attention network enhanced by self-attention pooling (GAT-S). MCS generates training data, while the GAT-S model learns the structural and electrical characteristics of the microgrid and further assesses its vulnerability intelligently. The GAT-S improves explainability and computational efficiency by dynamically assigning attention weights to critical nodes. Comprehensive experimental evaluations across various microgrid configurations demonstrate that the proposed framework provides accurate vulnerability assessments, achieving a mean squared error as low as 0.001, real-time responsiveness within 1 second, and delivering explainable results.

cs.LG

Physics-Informed Recurrent Network for State-Space Modeling of Gas Pipeline Networks

As a part of the integrated energy system (IES), gas pipeline networks can provide additional flexibility to power systems through coordinated optimal dispatch. An accurate pipeline network model is critical for the optimal operation and control of IESs. However, inaccuracies or unavailability of accurate pipeline parameters often introduce errors in the state-space models of such networks. This paper proposes a physics-informed recurrent network (PIRN) to identify the state-space model of gas pipelines. It fuses sparse measurement data with fluid-dynamic behavior expressed by partial differential equations. By embedding the physical state-space model within the recurrent network, parameter identification becomes an end-to-end PIRN training task. The model can be realized in PyTorch through modifications to a standard RNN backbone. Case studies demonstrate that our proposed PIRN can accurately estimate gas pipeline models from sparse terminal node measurements, providing robust performance and significantly higher parameter efficiency. Furthermore, the identified state-space model of the pipeline network can be seamlessly integrated into optimization frameworks.

eess.SY

RL2: Reinforce Large Language Model to Assist Safe Reinforcement Learning for Energy Management of Active Distribution Networks

As large-scale distributed energy resources are integrated into the active distribution networks (ADNs), effective energy management in ADNs becomes increasingly prominent compared to traditional distribution networks. Although advanced reinforcement learning (RL) methods, which alleviate the burden of complicated modelling and optimization, have greatly improved the efficiency of energy management in ADNs, safety becomes a critical concern for RL applications in real-world problems. Since the design and adjustment of penalty functions, which correspond to operational safety constraints, requires extensive domain knowledge in RL and power system operation, the emerging ADN operators call for a more flexible and customized approach to address the penalty functions so that the operational safety and efficiency can be further enhanced. Empowered with strong comprehension, reasoning, and in-context learning capabilities, large language models (LLMs) provide a promising way to assist safe RL for energy management in ADNs. In this paper, we introduce the LLM to comprehend operational safety requirements in ADNs and generate corresponding penalty functions. In addition, we propose an RL2 mechanism to refine the generated functions iteratively and adaptively through multi-round dialogues, in which the LLM agent adjusts the functions' pattern and parameters based on training and test performance of the downstream RL agent. The proposed method significantly reduces the intervention of the ADN operators. Comprehensive test results demonstrate the effectiveness of the proposed method.

eess.SY

PyOptInterface: Design and implementation of an efficient modeling language for mathematical optimization

This paper introduces the design and implementation of PyOptInterface, a modeling language for mathematical optimization embedded in Python programming language. PyOptInterface uses lightweight and compact data structure to bridge high-level entities in optimization models like variables and constraints to internal indices of optimizers efficiently. It supports a variety of optimization solvers and a range of common problem classes. We provide benchmarks to exhibit the competitive performance of PyOptInterface compared with other state-of-the-art modeling languages.

cs.MS

A Dynamic Equivalent Energy Storage Model of Natural Gas Networks for Joint Optimal Dispatch of Electricity-Gas Systems

The development of energy conversion techniques enhances the coupling between the gas network and power system. However, challenges remain in the joint optimal dispatch of electricity-gas systems. The dynamic model of the gas network, described by partial differential equations, is complex and computationally demanding for power system operators. Furthermore, information privacy concerns and limited accessibility to detailed gas network models by power system operators necessitate quantifying the equivalent energy storage capacity of gas networks. This paper proposes a multi-port energy storage model with time-varying capacity to represent the dynamic gas state transformation and operational constraints in a compact and intuitive form. The model can be easily integrated into the optimal dispatch problem of the power system. Test cases demonstrate that the proposed model ensures feasible control strategies and significantly reduces the computational burden while maintaining high accuracy in the joint optimal dispatch of electricity-gas systems. In contrast, the existing static equivalent model fails to capture the full flexibility of the gas network and may yield infeasible results.

eess.SY

Sufficient Conditions for the Exact Relaxation of Complementarity Constraints for Storages in Multi-period OPF Problems

Storage-concerned Optimal Power Flow (OPF) with complementarity constraints is highly non-convex and intractable. In this paper, we propose two generalized sufficient conditions which guarantee no simultaneous charging and discharging (SCD) in the relaxed multi-period OPF excluding the complementarity constraints. Moreover, we prove that the regions on the locational marginal prices (LMPs) formed by the proposed two conditions both contain the other existing representative ones. We also generalize the application premise of sufficient conditions from the positive electricity price requirements to the negative electricity price scenarios. In contrast to participating solely in the energy dispatch, we highlight that offering reserve services can broaden the application range of relaxation conditions for storages. The case studies verify the exactness and advantages of the proposed conditions.

math.OC

A Spatio-temporal Decomposition Method for the Coordinated Economic Dispatch of Integrated Transmission and Distribution Grids

With numerous distributed energy resources (DERs) integrated into the distribution networks (DNs), the coordinated economic dispatch (C-ED) is essential for the integrated transmission and distribution grids. For large scale power grids, the centralized C-ED meets high computational burden and information privacy issues. To tackle these issues, this paper proposes a spatio-temporal decomposition algorithm to solve the C-ED in a distributed and parallel manner. In the temporal dimension, the multi-period economic dispatch (ED) of transmission grid (TG) is decomposed to several subproblems by introducing auxiliary variables and overlapping time intervals to deal with the temporal coupling constraints. Besides, an accelerated alternative direction method of multipliers (A-ADMM) based temporal decomposition algorithm with the warm-start strategy, is developed to solve the ED subproblems of TG in parallel. In the spatial dimension, a multi-parametric programming projection based spatial decomposition algorithm is developed to coordinate the ED problems of TG and DNs in a distributed manner. To further improve the convergence performance of the spatial decomposition algorithm, the aggregate equivalence approach is used for determining the feasible range of boundary variables of TG and DNs. Moreover, we prove that the proposed spatio-temporal decomposition method can obtain the optimal solution for bilevel convex optimization problems with continuously differentiable objectives and constraints. Numerical tests are conducted on three systems with different scales, demonstrating the high computational efficiency and scalability of the proposed spatio-temporal decomposition method.

eess.SY

A Nested Decomposition Method and Its Application for Coordinated Operation of Hierarchical Electrical Power Grids

Multilevel, multiarea, and hierarchically interconnected electrical power grids confront substantial challenges with the increasing integration of many volatile energy resources. The traditional isolated operation of interconnected power grids is uneconomical due to a lack of coordination; it may result in severe accidents that affect operational safety. However, the centralized operation of interconnected power grids is impractical, considering the operational independence and information privacy of each power grid. This paper proposes a nested decomposition method for the coordinated operation of hierarchical electrical power grids, which can achieve global optimization by iterating among upper- and lower-level power grids with exchange of boundary information alone. During each iteration, a projection function, which embodies the optimal objective value of a lower-level power grid projected onto its boundary variable space, is computed with second-order exactness. Thus, the proposed method can be applied widely to nonlinear continuous optimizations and can converge much more rapidly than existing decomposition methods. We conducted numerical tests of coordinated operation examples with a trilevel power grid that demonstrate the validity and performance of the proposed method.

eess.SY