Oriol, TeresaCifuentes, JennyMarulanda, Geovanny2025-11-252025-11-252025-10Oriol, T, Cifuentes, J & Marulanda, G 2025, 'Enhancing Wind Power Forecasting in the Spanish Market Through Transformer Neural Networks and Temporal Optimization', Sustainability (Switzerland), vol. 17, no. 19, 8655. https://doi.org/10.3390/su171986552071-1050https://hdl.handle.net/10641/6543Publisher Copyright: © 2025 by the authors.La creciente penetración de las energías renovables, y de la eólica en particular, requiere una previsión a corto plazo precisa para garantizar la estabilidad de la red, reducir la incertidumbre operativa y facilitar la integración a gran escala de recursos intermitentes. Este estudio evalúa arquitecturas basadas en Transformer para la previsión de la generación eólica utilizando datos horarios de generación de España (2020-2024). Las series temporales se segmentaron en ventanas de entrada de 12, 24 y 36 horas, y se probaron sistemáticamente múltiples configuraciones de modelos. Para la comparación, se entrenaron modelos LSTM y GRU bajo protocolos idénticos. Los resultados muestran que el Transformer superó de manera consistente a los modelos recurrentes de referencia en todos los horizontes. La mejor configuración, con una secuencia de entrada de 36 horas, dimensionalidad moderada y profundidad reducida, alcanzó un RMSE de 370,71 MW, un MAE de 258,77 MW y un MAPE del 4,92%, reduciendo el error por un margen significativo respecto a los modelos LSTM y GRU, cuyos mejores rendimientos alcanzaron RMSE superiores a 395 MW y MAPE superiores al 5,7%. Más allá de la precisión predictiva, los mapas de atención revelaron que el Transformer capturaba eficazmente las fluctuaciones a corto plazo al tiempo que atendía a dependencias de mayor alcance, ofreciendo un mecanismo transparente para interpretar la contribución de la información histórica a las predicciones. Estos hallazgos demuestran el rendimiento superior de los modelos basados en Transformer en la previsión a corto plazo de la generación eólica, subrayando su capacidad para ofrecer predicciones más precisas e interpretables que respaldan la integración fiable de la energía renovable en los sistemas eléctricos modernos. [Traducción automática al español; idioma original: inglés.]The increasing penetration of renewable energy, and wind power in particular, requires accurate short-term forecasting to ensure grid stability, reduce operational uncertainty, and facilitate large-scale integration of intermittent resources. This study evaluates Transformer-based architectures for wind power forecasting using hourly generation data from Spain (2020–2024). Time series were segmented into input windows of 12, 24, and 36 h, and multiple model configurations were systematically tested. For benchmarking, LSTM and GRU models were trained under identical protocols. The results show that the Transformer consistently outperformed recurrent baselines across all horizons. The best configuration, using a 36 h input sequence with moderate dimensionality and shallow depth, achieved an RMSE of 370.71 MW, MAE of 258.77 MW, and MAPE of 4.92%, reducing error by a significant margin compared to LSTM and GRU models, whose best performances reached RMSEs above 395 MW and MAPEs above 5.7%. Beyond predictive accuracy, attention maps revealed that the Transformer effectively captured short-term fluctuations while also attending to longer-range dependencies, offering a transparent mechanism for interpreting the contribution of historical information to forecasts. These findings demonstrate the superior performance of Transformer-based models in short-term wind power forecasting, underscoring their capacity to deliver more accurate and interpretable predictions that support the reliable integration of renewable energy into modern power systems.212319118enghttp://creativecommons.org/licenses/by-nc-nd/4.0/deep learningrenewable energy integrationshort-term forecastingsustainable energy systemstransformer modelswind power forecastingDeep learningTransformer modelsSustainable energy systemsWind power forecastingRenewable energy integrationShort-term forecastingComputer Science (miscellaneous)Geography, Planning and DevelopmentRenewable Energy, Sustainability and the EnvironmentEnvironmental Science (miscellaneous)Energy Engineering and Power TechnologyHardware and ArchitectureComputer Networks and CommunicationsManagement, Monitoring, Policy and LawSDG 7 - Affordable and Clean EnergyYesyesEnhancing Wind Power Forecasting in the Spanish Market Through Transformer Neural Networks and Temporal OptimizationMejora de la predicción de la energía eólica en el mercado español mediante redes neuronales Transformer y optimización temporaljournal articleopen access10.3390/su17198655https://www.scopus.com/pages/publications/105019105944https://www.scopus.com/pages/publications/105019105944#tab=citedBy