NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Risk-Averse Just-In-Time Scheme for Learning-Based Operation of Microgrids with Coupled Electricity-Hydrogen-Ammonia under Uncertainties

Longyan Li, Chao Ning, Guangsheng Pan, Leiqi Zhang, Wei Gu, Liang Zhao, Wenli Du, Mohammad Shahidehpour

Abstract

This paper proposes a Risk-Averse Just-In-Time (RAJIT) operation scheme for Ammonia-Hydrogen-based Micro-Grids (AHMGs) to boost electricity-hydrogen-ammonia coupling under uncertainties. First, an off-grid AHMG model is developed, featuring a novel multi-mode ammonia synthesis process and a hydrogen-ammonia dual gas turbine with tunable feed-in ratios. Subsequently, a state-behavior mapping strategy linking hydrogen storage levels with the operation modes of ammonia synthesis is established to prevent cost-ineffective shutdowns. The proposed model substantially improves operational flexibility but results in a challenging nonlinear fractional program. Based upon this model, a data-driven RAJIT scheme is developed for the real-time rolling optimization of AHMGs. Unlike conventional one-size-fits-all schemes using one optimization method throughout, the data driven RAJIT intelligently switches between cost-effective deterministic optimization and risk-averse online-learning distributionally robust optimization depending on actual risk profiles, thus capitalizing on the respective strengths of these two optimization methods. Numerical simulations demonstrate that the proposed scheme guarantees safety and yields an overall cost reduction up to 14.6% compared with several state-of-the-art methods.

Introduction

Decarbonizing remote industrial sites requires robust off-grid energy solutions. Ammonia-Hydrogen-based Microgrids (AHMGs) represent a promising frontier, leveraging renewable energy to power electrolyzers for hydrogen ($H_2$) production and Haber-Bosch (HB) reactors for ammonia ($NH_3$) synthesis. However, these systems are plagued by the inherent volatility of wind and solar power. Traditional operational strategies often fall into two extremes: overly optimistic deterministic models that risk system failure during energy shortages, or excessively conservative robust models that incur prohibitive operational costs. Furthermore, the complex interplay between chemical processes and power generation creates significant mathematical hurdles for real-time optimization.

AHMG System Architecture

The proposed AHMG model enhances operational flexibility through advanced hardware modeling. Central to this is a multi-mode Haber-Bosch process and a dual-fuel gas turbine (DGT) capable of operating with tunable feed-in ratios of hydrogen and ammonia. This flexibility allows the system to treat chemical production as a controllable load, effectively acting as a secondary "buffer" alongside traditional battery storage.

Schematic of the proposed Ammonia-Hydrogen-based Micro-Grid (AHMG) architecture.

To manage the chemical reactors efficiently, a state-behavior mapping strategy is employed. By linking hydrogen storage levels directly to specific HB operation modes, the system avoids abrupt, cost-ineffective shutdowns that can damage catalysts and waste energy.

The RAJIT Operational Scheme

The core innovation of this research is the Risk-Averse Just-In-Time (RAJIT) scheme. This "selective paranoia" approach monitors the system's safety state—specifically the predicted battery state-of-charge (SOC)—and dynamically switches its optimization strategy based on real-time risk profiles.

The Risk-Averse Just-In-Time (RAJIT) operational framework.

When the system is operating within safe margins, it utilizes Deterministic Optimization to maximize cost-efficiency. However, if a potential safety violation is detected (indicated by a "flag"), the system switches "just-in-time" to Online-Learning Distributionally Robust Optimization (OL-DRO). The OL-DRO component uses a Dirichlet process mixture model (DPMM) and online variational inference to learn the actual probability distribution of renewable energy uncertainties from streaming data. This allows for a precise, data-driven safety margin that is far less conservative than traditional "worst-case" robust optimization.

Performance Evaluation

The RAJIT scheme was validated using modified IEEE 33-bus and 69-bus systems. Key findings include:

  • Cost Efficiency: The scheme achieved an overall cost reduction of 14.6% compared to traditional fixed-ratio operational methods.
  • Operational Safety: While deterministic methods exhibited a 23.8% constraint violation rate in volatile scenarios, RAJIT successfully maintained violations within predefined safety thresholds (e.g., <15%).
  • Computational Feasibility: Through mathematical reformulation using Glover’s linearization and constraint-tightening, the complex nonlinear problem was solved in an average of 26.1 seconds, making it suitable for real-time hourly rolling optimization.

Conclusion

The RAJIT scheme successfully balances the trade-off between economic efficiency and operational reliability in off-grid microgrids. By integrating flexible chemical modeling with a dynamic, learning-based optimization framework, it provides a scalable solution for green hydrogen and ammonia production. Future work will focus on increasing time resolution for finer-grained control and exploring integration with larger utility grids.

Summary updated

BibTeX
@article{li2025risk,
  author = {Longyan Li and Chao Ning and Guangsheng Pan and Leiqi Zhang and Wei Gu and Liang Zhao and Wenli Du and Mohammad Shahidehpour},
  title = {{A Risk-Averse Just-In-Time Scheme for Learning-Based Operation of Microgrids with Coupled Electricity-Hydrogen-Ammonia under Uncertainties}},
  journal = {IEEE Transactions on Sustainable Energy},
  year = {2025},
  doi = {10.1109/tste.2025.3561067},
}
Figure