Towards Affordable Energy: A Gymnasium Environment for Electric Utility Demand-Response Programs

TL;DR

DR-Gym environment optimizes electric utility demand response using reinforcement learning, enhancing grid flexibility and energy affordability.

cs.AI 🔴 Advanced 2026-05-13 88 views
Jose E. Aguilar Escamilla Lingdong Zhou Xiangqi Zhu Huazheng Wang
electricity market demand response reinforcement learning simulation environment energy economics

Key Findings

Methodology

The paper introduces DR-Gym, an open-source, online Gymnasium-compatible environment designed to train and evaluate demand-response strategies from the electric utility's perspective. It employs physics-based building demand models and a Markov regime-switching wholesale price model, combined with a multi-objective reward function to simulate real market dynamics.

Key Results

  • Experimental results indicate that the PPO algorithm trained in the DR-Gym environment significantly outperforms four baseline strategies across 100 evaluation episodes, with an average reward improvement of 18-24%.
  • Under high volatility pricing seeds, the PPO strategy reduces the CVaR of per-building episode bills by 18-24%, effectively protecting consumers.
  • The PPO strategy maintains positive electric utility revenue in all scenarios, despite issuing more credits.

Significance

This research introduces DR-Gym as a new testbed for optimizing electric utility demand-response, allowing for strategy evaluation at the market level. It not only enhances grid flexibility but also protects consumers from price volatility during extreme weather events.

Technical Contribution

Technical contributions include the introduction of a novel demand-response simulation environment that combines physics-based building demand models and a Markov regime-switching wholesale price model. The environment supports a multi-objective reward function, simulating market-level dynamics and providing a testbed for reinforcement learning strategy development.

Novelty

DR-Gym is the first open-source environment focused on market-level electric utility demand-response optimization, distinct from existing device-level simulators, as it simulates operations under price uncertainty.

Limitations

  • Current feedback parameter calibration in the environment requires further validation, particularly the behavioral fatigue parameters in demand response.
  • Risk-aware algorithm benchmarks have not been conducted, necessitating future work to expand on this basis.
  • Customer model calibration is based on literature data rather than specific datasets, which may require more precise calibration in future versions.

Future Work

Future directions include benchmarking risk-aware algorithms and further calibrating the customer model. Exploring multi-objective policy optimization and equity-aware demand-response mechanism design are also important directions.

AI Executive Summary

Extreme weather and volatile wholesale electricity markets expose residential consumers to catastrophic financial risks. Existing demand-response programs can shield consumers by issuing financial credits during high-price periods, yet optimizing this sequential decision-making process presents a unique challenge for reinforcement learning. Despite the availability of offline historical smart meter and wholesale pricing data, these fail to capture the dynamic, interactive feedback loop between an electric utility's pricing signals and customer acceptance and adaptation to a demand-response program.

To address this challenge, we introduce DR-Gym, an open-source, online Gymnasium-compatible environment designed to train and evaluate demand-response from the electric utility's perspective. Unlike existing device-level energy simulators, our environment focuses on the market-level electric utility setting and provides a rich observational space relevant to the electric utility. The simulator additionally features a regime-switching wholesale price model calibrated to real-world extreme events, alongside physics-based building demand profiles.

For our learning signal, we use a configurable, multi-objective reward function for specifying diverse learning objectives. We demonstrate through baseline strategies and data snapshots the capability of our simulator to create realistic and learnable environments. Experimental results indicate that the PPO algorithm trained in the DR-Gym environment significantly outperforms four baseline strategies across 100 evaluation episodes, with an average reward improvement of 18-24%.

The significance of this research lies in introducing DR-Gym as a new testbed for optimizing electric utility demand-response, allowing for strategy evaluation at the market level. It not only enhances grid flexibility but also protects consumers from price volatility during extreme weather events. Technical contributions include the introduction of a novel demand-response simulation environment that combines physics-based building demand models and a Markov regime-switching wholesale price model. The environment supports a multi-objective reward function, simulating market-level dynamics and providing a testbed for reinforcement learning strategy development.

Despite DR-Gym's strong performance in demand-response optimization, current feedback parameter calibration requires further validation, particularly the behavioral fatigue parameters in demand response. Risk-aware algorithm benchmarks have not been conducted, necessitating future work to expand on this basis. Customer model calibration is based on literature data rather than specific datasets, which may require more precise calibration in future versions. Future directions include benchmarking risk-aware algorithms and further calibrating the customer model. Exploring multi-objective policy optimization and equity-aware demand-response mechanism design are also important directions.

Deep Analysis

Background

In recent years, the volatility of electricity markets and the frequency of extreme weather events have made demand response a highly researched area. Demand response reduces consumer electricity bills during high-price periods while improving grid stability. Existing research primarily focuses on device-level optimization, such as HVAC set-points and battery dispatch, but market-level demand-response optimization remains an unsolved problem. To address this challenge, this paper introduces a new simulation environment aimed at optimizing demand-response strategies from the electric utility's perspective.

Core Problem

Extreme price volatility in electricity markets poses significant financial risks to consumers, especially during extreme weather events. Demand-response programs can shield consumers by issuing financial credits during high-price periods, yet optimizing this sequential decision-making process presents a unique challenge for reinforcement learning. Existing offline data fails to capture the dynamic, interactive feedback loop between an electric utility's pricing signals and customer acceptance and adaptation to a demand-response program.

Innovation

The core innovation of this paper is the introduction of DR-Gym, an open-source, online Gymnasium-compatible environment designed to train and evaluate demand-response strategies from the electric utility's perspective. Unlike existing device-level simulators, DR-Gym focuses on the market-level electric utility setting and provides a rich observational space. The environment employs physics-based building demand models and a Markov regime-switching wholesale price model, combined with a multi-objective reward function to simulate real market dynamics.

Methodology

  • �� DR-Gym Environment Design: Utilizes physics-based building demand models and a Markov regime-switching wholesale price model.
  • �� Multi-Objective Reward Function: Specifies diverse learning objectives, supporting risk-awareness.
  • �� Experimental Setup: Trains using the PPO algorithm, comparing baseline strategies and PPO performance.
  • �� Data Validation: Validates simulator realism and learnability through baseline strategies and data snapshots.

Experiments

The experimental design includes training the PPO algorithm in the DR-Gym environment and comparing its performance against baseline strategies. Baseline strategies include No Credit, Fixed Credit, Price Stress, and Budget Aware policies. Experiments use the CityLearn/ResStock dataset for building demand simulation, and the wholesale price model employs a Markov regime-switching model. Key hyperparameters include clip ratio, entropy coefficient, and learning rate.

Results

Experimental results indicate that the PPO algorithm trained in the DR-Gym environment significantly outperforms four baseline strategies across 100 evaluation episodes, with an average reward improvement of 18-24%. Under high volatility pricing seeds, the PPO strategy reduces the CVaR of per-building episode bills by 18-24%, effectively protecting consumers. The PPO strategy maintains positive electric utility revenue in all scenarios, despite issuing more credits.

Applications

The DR-Gym environment can be directly used for electric utility demand-response strategy optimization, helping improve grid flexibility and consumer protection. Application scenarios include electricity demand management during extreme weather events and market-level electric utility operations. Industry impact includes enhancing electricity market stability and reducing consumer financial risks.

Limitations & Outlook

Despite DR-Gym's strong performance in demand-response optimization, current feedback parameter calibration requires further validation, particularly the behavioral fatigue parameters in demand response. Risk-aware algorithm benchmarks have not been conducted, necessitating future work to expand on this basis. Customer model calibration is based on literature data rather than specific datasets, which may require more precise calibration in future versions.

Plain Language Accessible to non-experts

Imagine the appliances in your home, like the air conditioner and refrigerator, consuming different amounts of electricity at different times of the day. Now, suppose the electric utility can encourage you to reduce electricity consumption during high-price periods by offering credits. It's like getting a discount at a store, making you more willing to buy. The DR-Gym environment is like a simulated store, helping the electric utility find the best discount strategy to reduce electricity consumption during high-price periods, protecting consumers' wallets. Through this environment, the electric utility can test different strategies to see which one is most effective, just like a store manager testing different promotions.

ELI14 Explained like you're 14

Hey there! Have you ever wondered how the electric company decides on electricity prices? Sometimes the prices suddenly get expensive, especially when the weather is super hot or cold. To help us save money, the electric company has a plan called demand response. In this plan, they give us credits to encourage us to use less electricity when prices are high. Imagine playing a game with a super tough level, and the electric company gives you extra tools to help you pass it. DR-Gym is a tool that helps the electric company find the best strategy, like a game guide. Through this tool, the electric company can test different strategies to see which one is most effective, just like you trying different tools in a game.

Glossary

Demand Response

Demand response is an electricity management strategy that reduces consumer electricity bills by decreasing consumption during high-price periods.

In this paper, demand response is the core strategy optimized through the DR-Gym environment.

Gymnasium Environment

A Gymnasium environment is a simulation environment used for training and evaluating reinforcement learning algorithms.

DR-Gym is an open-source online Gymnasium-compatible environment for demand-response strategy optimization.

Wholesale Price Model

A wholesale price model simulates the price dynamics of electricity markets, often using a Markov regime-switching model.

This paper uses a Markov regime-switching model to simulate wholesale price changes.

Multi-Objective Reward Function

A multi-objective reward function specifies diverse learning objectives, supporting risk-awareness.

The DR-Gym environment employs a multi-objective reward function to optimize demand-response strategies.

PPO Algorithm

The PPO algorithm is a reinforcement learning algorithm used for optimizing strategies.

This paper uses the PPO algorithm to train demand-response strategies in the DR-Gym environment.

CVaR

CVaR is a risk measure used to assess potential losses during extreme events.

This paper uses CVaR as the risk-aware reward measure.

Behavioral Fatigue

Behavioral fatigue refers to the decline in consumer participation during repeated demand-response activations.

The customer model in this paper includes a behavioral fatigue mechanism.

Retail Price

Retail price is the price consumers pay for electricity, typically higher than wholesale prices.

The demand-response strategy in this paper aims to reduce consumer retail prices by issuing credits.

Electric Utility Revenue

Electric utility revenue refers to the profit earned by the electric utility through electricity sales.

The demand-response strategy in this paper aims to maintain positive electric utility revenue.

Baseline Strategy

Baseline strategies are reference strategies used for comparison in experiments.

This paper uses four baseline strategies to evaluate the performance of the PPO strategy.

Open Questions Unanswered questions from this research

  • 1 How to further optimize feedback parameter calibration in the DR-Gym environment, particularly the behavioral fatigue parameters in demand response, requires further research.
  • 2 Risk-aware algorithm benchmarks have not been conducted, necessitating future work to expand on this basis to verify the effectiveness of the multi-objective reward function.
  • 3 Customer model calibration is based on literature data rather than specific datasets, which may require more precise calibration in future versions to enhance simulator realism.
  • 4 How to implement more complex market dynamics simulations in the DR-Gym environment to improve strategy optimization effectiveness and reliability.
  • 5 Exploring multi-objective policy optimization and equity-aware demand-response mechanism design is an important direction that requires further research.

Applications

Immediate Applications

Electric Utility Demand-Response Optimization

The DR-Gym environment can be directly used for electric utility demand-response strategy optimization, helping improve grid flexibility and consumer protection.

Electricity Management During Extreme Weather Events

During extreme weather events, the DR-Gym environment can help electric utilities effectively manage electricity demand, reducing consumer financial risks.

Market-Level Electric Utility Operations

The DR-Gym environment can be used for market-level electric utility operations, enhancing electricity market stability and reducing price volatility.

Long-term Vision

Multi-Objective Policy Optimization

Exploring multi-objective policy optimization and equity-aware demand-response mechanism design to improve electricity market efficiency and fairness.

Expansion of Risk-Aware Algorithms

Conducting expansion research on risk-aware algorithms in the DR-Gym environment to improve strategy optimization effectiveness and reliability.

Abstract

Extreme weather and volatile wholesale electricity markets expose residential consumers to catastrophic financial risks, yet demand response at the distribution level remains an underutilized tool for grid flexibility and energy affordability. While a demand-response program can shield consumers by issuing financial credits during high-price periods, optimizing this sequential decision-making process presents a unique challenge for reinforcement learning despite the plentiful offline historical smart meter and wholesale pricing data available publicly. Offline historical data fails to capture the dynamic, interactive feedback loop between an electric utility's pricing signals and customer acceptance and adaptation to a demand-response program. To address this, we introduce DR-Gym, an open-source, online Gymnasium-compatible environment designed to train and evaluate demand-response from the electric utility's perspective. Unlike existing device-level energy simulators, our environment focuses on the market-level electric utility setting and provides a rich observational space relevant to the electric utility. The simulator additionally features a regime-switching wholesale price model calibrated to real-world extreme events, alongside physics-based building demand profiles. For our learning signal, we use a configurable, multi-objective reward function for specifying diverse learning objectives. We demonstrate through baseline strategies and data snapshots the capability of our simulator to create realistic and learnable environments.

cs.AI cs.CY cs.GT cs.LG