Open Access
ARTICLE
An Integrated Forecasting and Optimization Framework for Battery Energy Storage Participation in Spanish Electricity Markets
Pol Torres1,*, Alejandro Clavera1, Carlos Molina1, Giulia Zarpellon1, Marcelus Fabri1, Diego Gallego2, Pau Plana2, Lluís Millet2
1 Eurecat, Technology Centre of Catalonia, Cerdanyola, Spain
2 One Hub Energy, Barcelona, Spain
* Corresponding Author: Pol Torres. Email:
(This article belongs to the Special Issue: Science, Engineering, and Policy Innovations Driving the Global Energy Transition)
Energy Engineering https://doi.org/10.32604/ee.2026.084810
Received 29 April 2026; Accepted 26 June 2026; Published online 29 July 2026
Abstract
Battery energy storage systems can capture stacked revenue by placing bids in the energy markets, arbitraging day-ahead prices, correcting positions in intraday auctions, and providing ancillary services such as secondary regulation, either as a standalone power plant or collocated with photovoltaic or wind generation. However, profitable participation requires (i) accurate short-term price forecasting across coupled market products and (ii) an optimization model that enforces market rules, grid connection limits and state-of-charge feasibility under uncertainty. This paper presents an end-to-end decision-support framework for the Spanish electricity market that combines machine-learning forecasting with a mixed-integer linear programming scheduler and an adjustable robust optimization extension. The forecasting layer relies on XGBoost models using publicly available data from the Spanish system operator, meteorological observations and gas prices, including calendar and event features. The scheduling layer explicitly models the market coupling, point-of-connection limits and two imbalance settlement options (priced and penalized). The adjustable robust optimization formulation uses budgeted uncertainty sets and strong duality to produce tractable robust counterparts that trade expected profit for improved downside protection. A redispatch simulator sequentially re-optimizes as markets clear, preserving committed trades while updating remaining degrees of freedom. Results demonstrate that forecast quality and the robustness budget Γ jointly shape bidding decisions and imbalance exposure. These findings provide practical guidance for operating BESS or collocated portfolios in multi-settlement electricity markets.
Keywords
Battery energy storage systems; photovoltaics; electricity markets; price forecasting; machine learning; robust optimization