Search arXivSearch

arXiv · 2512.05876

Context-Aware Model Predictive Control for Microgrid Energy Management via LLMs

Abstract

The optimal operation of modern microgrids, particularly those integrating stochastic renewable generation and battery energy storage system (BESS), relies heavily on load and disturbances forecasting to minimize operational costs. However, in environments with uncertainties in both generation and consumption, traditional numerical forecasting methods often fail to capture generation shifts and event-driven load surges. While contextual information regarding event schedules, system logs, and computational task records is easily obtainable, classic control paradigms lack a formal interface to integrate the unstructured, semantic data into the physical operation loop. This paper addresses this gap by introducing the InstructMPC framework, which utilizes a Large Language Model (LLM) paired with a tunable last layer mapping to translate unstructured operational context into predictive disturbance trajectories for the MPC controller. Unlike conventional forecasting methods, the proposed approach treats the last layer mapping as a tunable component, refined online based on the realized control cost. We establish a theoretical foundation for this closed-loop tuning strategy, proving a regret bound of $O(\sqrt{T \log T})$ for linear systems under a tailored task-aware loss function, together with robustness guarantees against uninformative or noisy textual inputs. The control strategy is experimentally validated on OpenCEM, a real-world microgrid with highly fluctuating generation and consumption. Experimental results demonstrate that the LLM-driven MPC significantly reduces cumulative grid electricity costs compared to classical context-agnostic baselines, validating the efficacy of integrating semantic information directly into physical control loops.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Ruixiang Wu, Jiahao Ai, Tinko Sebastian Bartels, Tongxin Li. 2026-04-08. Context-Aware Model Predictive Control for Microgrid Energy Management via LLMs. https://arxiv.org/abs/2512.05876

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Ensuring Stability of Non-Minimal Modes in Input-Output Data-Driven Representation

Many recent data-driven control approaches for linear time-invariant systems are based on output trajectory prediction using input-output data matrices. The system dynamics described by this predictor, which we refer to as the input-output data-driven representation, yields non-unique autoregressive with exogenous inputs (ARX) models having possibly unstable non-minimal modes. In this note, we show that the stability of these non-minimal modes is ensured by a certain choice of ARX model, which coincides with the minimum-norm least-squares predictor using the Moore-Penrose inverse of the data matrix. This stability guarantee holds regardless of the underlying system's stability. Moreover, the stability persists under sufficiently small noise in data when a suitably truncated Moore-Penrose inverse is used. Consequently, the ARX model need not be reduced to the true system order in order to avoid unstable additional modes.

eess.SY

Optimization-Based Formation Flight on Libration Point Orbits

A model predictive control (MPC) framework is developed for station-keeping in spacecraft formation flight along libration point orbits. At each control period, the MPC policy solves a multi-vehicle optimal control problem (MVOCP) that tracks a reference trajectory, while enforcing path constraints on the relative motion of the formation. The control policy makes use of a limited set of control nodes consistent with operational constraints that allow only a small number of maneuver opportunities per revolution. To promote recursive feasibility, path constraints are progressively tightened across the prediction horizon. An isoperimetric reformulation of the constraints is used to prevent inter-sample violations. The resulting MVOCP is a nonconvex program, which is solved via sequential convex programming. The proposed approach is evaluated in a high-fidelity ephemeris model under uncertainties for a formation along the near-rectilinear halo orbit (NRHO), and subject to path constraints on inter-spacecraft separation and relative Sun phase angle. The results demonstrate maintenance of a spacecraft formation that satisfies the path constraints with realistic cumulative propellant consumption.

eess.SY

Certificates Synthesis for A Class of Observational Properties in Stochastic Systems: A Unified Approach

In this paper, we investigate the probabilistic formal verification of stochastic dynamical systems over continuous state spaces. Motivated by problems in state estimation and information-flow security, we introduce the notion of observational properties, which characterize the inferences an external observer can draw from system outputs. These properties are formulated as probabilistic hyperproperties based on HyperLTL over finite traces, yielding a unified framework that subsumes several existing notions studied separately in the literature. We reduce the verification problem to reachability analysis over an augmented structure that integrates the system dynamics with an automaton representation of the specification. Building on this construction, we develop stochastic barrier certificates that provide probabilistic guarantees for property satisfaction while avoiding explicit state-space discretization. The effectiveness of the proposed framework is demonstrated through a case study.

eess.SY