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

TL;DR

This paper introduces RAJIT (Risk-Averse Just-In-Time), a novel operation scheme for off-grid microgrids that couple electricity with green hydrogen and ammonia production. By intelligently switching between aggressive cost-optimization and cautious risk-averse learning based on real-time safety profiles, the system achieves up to a 14.6% cost reduction while maintaining strict operational safety under renewable energy uncertainty.

What Problem Does This Paper Address?

Off-grid Ammonia-Hydrogen-based Microgrids (AHMGs) are a promising solution for decarbonizing remote industrial sites. These systems use renewable energy to power electrolyzers (for $H_2$) and Haber-Bosch (HB) reactors (for $NH_3$). However, they face three major hurdles:

  1. Rigid Modeling: Most existing models treat ammonia synthesis as a binary "on/off" process with fixed fuel ratios, which limits operational flexibility.
  2. The Uncertainty Trap: Wind and solar power are volatile. If a microgrid is too "optimistic" (deterministic optimization), it risks battery depletion and system crashes. If it is too "paranoid" (robust optimization), it becomes prohibitively expensive to run.
  3. Computational Complexity: Modeling the interplay between tunable gas turbines, chemical reactors, and power flow results in a "Mixed-Integer Nonlinear Fractional Program" (MINLFP)—a mathematical nightmare that is notoriously difficult to solve in real-time.

Methods

The authors tackle these problems through a three-pronged approach:

  • Flexible Hardware Modeling: They develop a multi-mode HB process model and a dual-fuel gas turbine (DGT) with tunable feed-in ratios. This allows the system to adjust the $H_2:N_2$ mix in synthesis and the $H_2:NH_3$ mix in power generation, providing a "buffer" during energy scarcity.
  • State-Behavior Mapping: A novel strategy that links hydrogen storage levels directly to HB operation modes. This prevents "cost-ineffective shutdowns"—sudden stops that damage chemical catalysts and waste energy.
  • The RAJIT Scheme: This is the "brain" of the system. It monitors a "flag" based on predicted battery levels.
  • Safe Mode: If the system is well within safety bounds, it uses standard deterministic optimization to minimize costs.
  • Risk-Averse Mode: If the system predicts a potential safety violation, it switches "just-in-time" to Online-Learning Distributionally Robust Optimization (OL-DRO). This method uses a Dirichlet process mixture model to learn the actual "shape" of uncertainty from streaming data, allowing for a more precise, less conservative safety margin.
  • Mathematical Reformulation: To make the MINLFP solvable, they use Glover’s linearization and a "tube-based" constraint-tightening technique to transform the problem into a tractable conic program.

Datasets

The researchers evaluated their scheme using two primary benchmarks:

  • Modified IEEE 33-bus system: Used for initial benchmarking and comparing RAJIT against five other state-of-the-art optimization methods.
  • Modified IEEE 69-bus system: Used to demonstrate the scalability of the approach in a larger microgrid with three hydrogen-ammonia plants and eight battery systems.
  • Uncertainty Data: The model was tested against fluctuating wind, solar, and load profiles to simulate real-world volatility.

Key Insights and Ideas

  • Selective Paranoia: The core "aha moment" is that you don't need to be risk-averse all the time. By only being "cautious" when the battery state-of-charge (SOC) approaches unsafe boundaries, the system captures the economic benefits of deterministic methods without the associated risks.
  • Chemical Flexibility as a Battery: By allowing the Haber-Bosch process to operate at variable feed-in ratios (Mode 2), the chemical plant itself acts as a flexible load that can ramp up or down to balance the grid, reducing the need for massive battery arrays.
  • Learning on the Fly: Unlike traditional robust optimization, which assumes a "worst-case" scenario that might never happen, the OL-DRO component learns the specific probability distribution of the local wind and solar patterns in real-time.

Key Results

  • Cost Efficiency: Case studies showed an overall cost reduction of 14.6% compared to traditional fixed-ratio methods.
  • Safety Performance: In simulations where deterministic methods had a 23.8% constraint violation rate (leading to potential blackouts), the RAJIT scheme successfully kept violations within the user-defined safety threshold (e.g., <15%).
  • Speed: Despite the complexity, the reformulated model solved in an average of 26.1 seconds, making it well-suited for real-time rolling optimization (which typically operates on an hourly window).

Limitations and Future Work

  • Time Resolution: The current study focuses on an hourly resolution. The authors note that finer-grained control (minutes or seconds) would be necessary to handle very high-frequency power fluctuations.
  • Grid Integration: The paper focuses on off-grid "islanded" microgrids. While the authors suggest the logic applies to grid-connected systems, the added complexity of market prices and grid stability constraints remains for future research.
  • Parameter Sensitivity: The "flag" that triggers the switch to risk-averse mode relies on a manually specified look-ahead horizon ($l_{ET}$). Automating the tuning of this sensitivity parameter could further optimize the balance between safety and cost.

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},
}

Loading related content...

Figure