Developing effective control strategies for behind-the-meter energy storage to coordinate peak shaving and stacked services is essential for reducing electricity costs and extending battery lifetime in commercial buildings. This work proposes an end-to-end, two-stage framework for coordinating peak shaving and energy arbitrage with a theoretical decomposition guarantee. In the first stage, a non-parametric kernel regression model constructs state-of-charge trajectory bounds from historical data that satisfy peak-shaving requirements. The second stage utilizes the remaining capacity for energy arbitrage via a transfer learning method. Case studies using New York City commercial building demand data show that our method achieves a 1.3 times improvement in performance over the state-of-the-art forecast-based method, achieving cost savings and effective peak management without relying on predictions.
The rapid growth of electricity demand, along with limited grid infrastructure, has intensified the need for effective demand-side management. Large commercial and industrial consumers are facing significant electricity costs, including both real-time electricity charges and monthly peak demand charges, with the latter being the more substantial. Behindthe-meter battery energy storage systems (BESS) have thus become an attractive solution for peak shaving and electricity cost reduction, while also mitigating grid stress [1], [2].
Peak shaving is challenging, as it requires decision-making under uncertainty over monthly horizons. Many existing methods rely on demand and price forecasting and uncertainty models such as regression [3], neural-networks [4], and chanceconstrained models [5]. However, reliable forecasting or uncertainty models at a monthly resolution remain computationally intensive [6]- [8]. The complexity increases significantly when peak shaving is integrated with other grid services, such as energy arbitrage and frequency regulation [9], requiring careful coordination to balance the competing objectives. Other approaches, including dynamic programming [10] and portfolio optimization [11], have also been employed to optimize stacked storage services, but these methods primarily focus on daily peak shaving and struggle with computational burden when adapting to real-time uncertainties or extending to monthly horizons. This limits their practicality for smaller businesses and non-profits, where costs may exceed the potential savings.
We propose an end-to-end, two-stage framework to coordinate peak shaving with stacked services such as energy arbitrage. Unlike conventional methods that rely on forecasting or computationally intensive optimization, we propose a lightweight online optimization method to jointly predict a dynamic peak demand target and state-of-charge (SoC) reserve trajectory for peak shaving. This enables real-time adaptive control under evolving demand conditions, resulting in faster and more efficient battery operation. The key contributions of this work are summarized as follows:
- Decoupled Control Formulation: We show that the stacked service control problem can be reformulated as a two-stage optimization by determining the SoC reserve required for peak shaving first, and then the remaining battery capacity is subsequently allocated to other services. 2) Kernel Regression-Based Prediction: We develop a data-driven kernel regression algorithm that jointly predicts peak-shaving targets and SoC reserve requirements directly from historical demand and battery characteristics. 3) Joint Peak Shaving and Arbitrage: We integrate the kernel regression predictions with an arbitrage optimization algorithm, enabling decoupled management of peak shaving and energy arbitrage, reducing total electricity costs and mitigating unnecessary battery cycling. 4) Validating Performance through Simulation: The proposed framework is evaluated using 6 years of electricity demand data from a 35-story commercial building in New York City, demonstrating improved peak shaving and cost savings compared to a state-of-the-art method. The remainder of the paper is organized as follows. Section II introduces the formulation, and Section III details the training and the real-time control algorithm. Section IV shows the simulation and Section V concludes the paper.
We consider a commercial building with a co-located, behind-the-meter BESS operating under a time-varying electricity tariff. The objective is to minimize the overall electricity cost by leveraging both energy arbitrage and peak shaving arXiv:2602.16586v1 [math.OC] 18 Feb 2026 strategies. The deterministic version of the joint peak shaving and arbitrage problem is listed as follows:
E ≤ e t+1 ≤ E, ∀t = 1, . . . , T
The decision variables include the discharge energy per timestep (d t ), charge energy per timestep (q t ), and peak demand within the optimization horizon (p). The battery’s maximum energy capacity and energy capacity per timestep are denoted by E and P , respectively. E denotes the minimum SoC bound and η denotes the efficiency for charging and discharging. The objective function in (1a) minimizes total cost by balancing peak demand charges (κ), real-time energy price (λ), and battery degradation cost (c). The model includes constraints for battery behavior and peak shaving. (1b) defines p as the maximum net demand. SoC dynamics are updated by (1c), and (1d) and (1e) enforce power and energy limits.
The deterministic formulation of the problem in ( 1) is impractical to solve in practice, as both demand and electricity prices are uncertain, while the peak demand charge is typically settled on a monthly basis. Solving the problem over such a long uncertainty horizon is therefore computationally intractable. To address this challenge, based on the fact that the peak penalty κ is much larger than the energy cost coefficients c and λ t
This content is AI-processed based on open access ArXiv data.