IDEAS home Printed from https://ideas.repec.org/a/gam/jsusta/v17y2025i19p8655-d1758763.html
   My bibliography  Save this article

Enhancing Wind Power Forecasting in the Spanish Market Through Transformer Neural Networks and Temporal Optimization

Author

Listed:
  • Teresa Oriol

    (ICADE, Faculty of Economics and Business Administration, Department of Quantitative Methods, Comillas Pontifical University, 28015 Madrid, Spain)

  • Jenny Cifuentes

    (ICADE, Faculty of Economics and Business Administration, Department of Quantitative Methods, Comillas Pontifical University, 28015 Madrid, Spain
    Institute for Research in Technology (IIT), ICAI School of Engineering, Comillas Pontifical University, 28015 Madrid, Spain)

  • Geovanny Marulanda

    (Escuela Politécnica Superior, Universidad Francisco de Vitoria, Ctra. Pozuelo-Majadahonda Km 1.800, 28223 Pozuelo de Alarcón, Madrid, Spain)

Abstract

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.

Suggested Citation

  • Teresa Oriol & Jenny Cifuentes & Geovanny Marulanda, 2025. "Enhancing Wind Power Forecasting in the Spanish Market Through Transformer Neural Networks and Temporal Optimization," Sustainability, MDPI, vol. 17(19), pages 1-21, September.
  • Handle: RePEc:gam:jsusta:v:17:y:2025:i:19:p:8655-:d:1758763
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2071-1050/17/19/8655/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2071-1050/17/19/8655/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Chaves-Ávila, J.P. & Fernandes, C., 2015. "The Spanish intraday market design: A successful solution to balance renewable generation?," Renewable Energy, Elsevier, vol. 74(C), pages 422-432.
    2. Kavasseri, Rajesh G. & Seetharaman, Krithika, 2009. "Day-ahead wind speed forecasting using f-ARIMA models," Renewable Energy, Elsevier, vol. 34(5), pages 1388-1393.
    3. Hyndman, Rob J. & Koehler, Anne B., 2006. "Another look at measures of forecast accuracy," International Journal of Forecasting, Elsevier, vol. 22(4), pages 679-688.
    4. Flores, Benito E, 1986. "A pragmatic view of accuracy measurement in forecasting," Omega, Elsevier, vol. 14(2), pages 93-98.
    5. Goodwin, Paul & Lawton, Richard, 1999. "On the asymmetry of the symmetric MAPE," International Journal of Forecasting, Elsevier, vol. 15(4), pages 405-408, October.
    6. Paweł Piotrowski & Inajara Rutyna & Dariusz Baczyński & Marcin Kopyt, 2022. "Evaluation Metrics for Wind Power Forecasts: A Comprehensive Review and Statistical Analysis of Errors," Energies, MDPI, vol. 15(24), pages 1-38, December.
    7. Shahram Hanifi & Xiaolei Liu & Zi Lin & Saeid Lotfian, 2020. "A Critical Review of Wind Power Forecasting Methods—Past, Present and Future," Energies, MDPI, vol. 13(15), pages 1-24, July.
    8. Shahid, Farah & Zameer, Aneela & Muneeb, Muhammad, 2021. "A novel genetic LSTM model for wind power forecast," Energy, Elsevier, vol. 223(C).
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Shahram Hanifi & Saeid Lotfian & Hossein Zare-Behtash & Andrea Cammarano, 2022. "Offshore Wind Power Forecasting—A New Hyperparameter Optimisation Algorithm for Deep Learning Models," Energies, MDPI, vol. 15(19), pages 1-21, September.
    2. Liu, Xiaolei & Lin, Zi & Feng, Ziming, 2021. "Short-term offshore wind speed forecast by seasonal ARIMA - A comparison against GRU and LSTM," Energy, Elsevier, vol. 227(C).
    3. Philippe St-Aubin & Bruno Agard, 2022. "Precision and Reliability of Forecasts Performance Metrics," Forecasting, MDPI, vol. 4(4), pages 1-22, October.
    4. Santamaría-Bonfil, G. & Reyes-Ballesteros, A. & Gershenson, C., 2016. "Wind speed forecasting for wind farms: A method based on support vector regression," Renewable Energy, Elsevier, vol. 85(C), pages 790-809.
    5. Crone, Sven F. & Hibon, Michèle & Nikolopoulos, Konstantinos, 2011. "Advances in forecasting with neural networks? Empirical evidence from the NN3 competition on time series prediction," International Journal of Forecasting, Elsevier, vol. 27(3), pages 635-660.
    6. Manisha Sawant & Rupali Patil & Tanmay Shikhare & Shreyas Nagle & Sakshi Chavan & Shivang Negi & Neeraj Dhanraj Bokde, 2022. "A Selective Review on Recent Advancements in Long, Short and Ultra-Short-Term Wind Power Prediction," Energies, MDPI, vol. 15(21), pages 1-24, October.
    7. Rahman A. Prasojo & Karunika Diwyacitta & Suwarno & Harry Gumilang, 2017. "Transformer Paper Expected Life Estimation Using ANFIS Based on Oil Characteristics and Dissolved Gases (Case Study: Indonesian Transformers)," Energies, MDPI, vol. 10(8), pages 1-18, August.
    8. Maria Tzitiridou-Chatzopoulou & Georgia Zournatzidou & Michael Kourakos, 2024. "Predicting Future Birth Rates with the Use of an Adaptive Machine Learning Algorithm: A Forecasting Experiment for Scotland," IJERPH, MDPI, vol. 21(7), pages 1-13, June.
    9. Guo, Nai-Zhi & Shi, Ke-Zhong & Li, Bo & Qi, Liang-Wen & Wu, Hong-Hui & Zhang, Zi-Liang & Xu, Jian-Zhong, 2022. "A physics-inspired neural network model for short-term wind power prediction considering wake effects," Energy, Elsevier, vol. 261(PA).
    10. Yitian Xing & Fue-Sang Lien & William Melek & Eugene Yee, 2022. "A Multi-Hour Ahead Wind Power Forecasting System Based on a WRF-TOPSIS-ANFIS Model," Energies, MDPI, vol. 15(15), pages 1-35, July.
    11. Spiliotis, Evangelos & Assimakopoulos, Vassilios & Nikolopoulos, Konstantinos, 2019. "Forecasting with a hybrid method utilizing data smoothing, a variation of the Theta method and shrinkage of seasonal factors," International Journal of Production Economics, Elsevier, vol. 209(C), pages 92-102.
    12. Davydenko, Andrey & Fildes, Robert, 2013. "Measuring forecasting accuracy: The case of judgmental adjustments to SKU-level demand forecasts," International Journal of Forecasting, Elsevier, vol. 29(3), pages 510-522.
    13. Seyma Caliskan Cavdar & Alev Dilek Aydin, 2015. "An Empirical Analysis for the Prediction of a Financial Crisis in Turkey through the Use of Forecast Error Measures," JRFM, MDPI, vol. 8(3), pages 1-18, August.
    14. Makridakis, Spyros & Spiliotis, Evangelos & Assimakopoulos, Vassilios, 2020. "The M4 Competition: 100,000 time series and 61 forecasting methods," International Journal of Forecasting, Elsevier, vol. 36(1), pages 54-74.
    15. Evgeny A. Antipov & Elena B. Pokryshevskaya, 2017. "Are box office revenues equally unpredictable for all movies? Evidence from a Random forest-based model," Journal of Revenue and Pricing Management, Palgrave Macmillan, vol. 16(3), pages 295-307, June.
    16. Kolassa, Stephan, 2016. "Evaluating predictive count data distributions in retail sales forecasting," International Journal of Forecasting, Elsevier, vol. 32(3), pages 788-803.
    17. Gaetano Perone, 2022. "Comparison of ARIMA, ETS, NNAR, TBATS and hybrid models to forecast the second wave of COVID-19 hospitalizations in Italy," The European Journal of Health Economics, Springer;Deutsche Gesellschaft für Gesundheitsökonomie (DGGÖ), vol. 23(6), pages 917-940, August.
    18. Fu, Wenlong & Fang, Ping & Wang, Kai & Li, Zhenxing & Xiong, Dongzhen & Zhang, Kai, 2021. "Multi-step ahead short-term wind speed forecasting approach coupling variational mode decomposition, improved beetle antennae search algorithm-based synchronous optimization and Volterra series model," Renewable Energy, Elsevier, vol. 179(C), pages 1122-1139.
    19. Semenoglou, Artemios-Anargyros & Spiliotis, Evangelos & Makridakis, Spyros & Assimakopoulos, Vassilios, 2021. "Investigating the accuracy of cross-learning time series forecasting methods," International Journal of Forecasting, Elsevier, vol. 37(3), pages 1072-1084.
    20. Fabrizio De Caro & Jacopo De Stefani & Gianluca Bontempi & Alfredo A. Vaccaro & Domenico D. Villacci, 2020. "Robust Assessment of Short-Term Wind Power Forecasting Models on Multiple Time Horizons," ULB Institutional Repository 2013/314435, ULB -- Universite Libre de Bruxelles.

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jsusta:v:17:y:2025:i:19:p:8655-:d:1758763. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.