EventsThe 1st International Online Conference on Forecasting
Published
This submission belongs to the session S1. Energy Forecasting and Analytics of the event The 1st International Online Conference on Forecasting
Published date
16 Sep, 2026
Academic Editor
author-avatarAlessandro Niccolai
Citation
Marios Saleptsis, Marco Mussetta, Sonia Leva, A Receding-Horizon Decision-Focused Learning Framework for Cost-Optimal Battery Scheduling in Microgrids, in Proceedings of The 1st International Online Conference on Forecasting, 21 September–22 September 2026, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

A Receding-Horizon Decision-Focused Learning Framework for Cost-Optimal Battery Scheduling in Microgrids

Marco Mussetta 1
image
1. Department of Energy, Politecnico di Milano, Italy
Abstract

The increasing penetration of renewable energy sources in microgrids demands accurate day-ahead
forecasting to support optimal battery energy storage system (BESS) scheduling. Yet the
conventional predict-then-optimize (PtO) paradigm trains forecasters on statistical accuracy
metrics that are agnostic to the asymmetric and time-varying cost impacts of forecast errors.
This work compares two training paradigms for day-ahead load forecasting in a grid-connected
microgrid integrating photovoltaic (PV) generation, a BESS, and a grid connection: conventional
PtO and decision-focused learning (DFL). Both use an identical gated recurrent unit (GRU) network
mapping historical load and calendar features to a 48-hour, 15-minute-resolution trajectory.
The PtO baseline minimizes mean-squared error, whereas DFL trains end-to-end to minimize
realized operational cost, learning to commit prediction errors that are economically inexpensive
rather than merely statistically small. Dispatch is handled by a receding-horizon controller
partitioned into 24 hourly cycles; each solves an economic-dispatch linear program over a 24-
hour look-ahead via a differentiable convex-optimization layer (cvxpylayers), committing only
the first hour. An analytical real-time layer balances residual demand against measured load,
accruing true cost. The summed daily cost forms the DFL loss, with gradients propagated to
the GRU. The framework is validated on the MG2Lab experimental microgrid testbed at Politecnico
di Milano, emulating the operation of a charging station with a BESS of 60 kWh and
a PV plant of 23.5 kWp. The results illustrate that the DFL-trained pipeline reduces operational
cost by 4.08% relative to the accuracy-optimized baseline, while nearly eliminating load-shedding
events. Notably, the DFL forecasters exhibit higher statistical errors than their accuracy-trained
counterparts yet achieve consistently lower operational costs, confirming that forecast accuracy
and decision quality do not share a monotonic relationship in microgrid scheduling.

Keywords
Decision-focused Learning
Forecasting
End-to-end Learning
Microgrid
Optimal Scheduling
Predict-then-Optimze
Forecasting Severe Cyclone Amphan (2020) over the Bay of Bengal Using a High-Resolution ICON Model Driven by ERA5 Reanalysis
Forecast-Ready Cyber Threat Salience Signals from Global Cybersecurity News Metadata