Modeling Wind Energy Production Forecasting using Machine Learning: An In-depth Analysis of Wind Farms in Morocco
Mohamed Bousla, M. Belfkir, Omar elharrouss, Ahmed Sadki, Ali Haddi, Youness El Mourabit, Badre Bossoufi, Abderrahman Mouradi, Abderrahman Elkharrim
Abstract
Accurate forecasting of wind energy production is essential for the stable integration of renewable energy sources into power grids, especially given the inherent variability of wind conditions. This study evaluates the effectiveness of Transformer-based models for improving wind energy forecasting accuracy, compared to traditional methods such as Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM), and Gated Recurrent Units (GRUs). Unlike the conventional sequential models, the Transformer models leverage an advanced attention mechanism, which processes all time steps simultaneously rather than sequentially, thereby efficiently capturing complex, long-term dependencies within the data. To conduct this analysis, we utilized a dataset collected from an operational wind farm located in Tetouan, northern Morocco, covering the period from 2019 to 2020. The experimental results show that the Transformer model consistently outperformed the traditional methods, achieving Mean Squared Error (MSE) of 0.275, 0.234, and 0.221, and Mean Absolute Error (MAE) of 0.305, 0.296, and 0.284 for daily, weekly, and monthly forecasting horizons, respectively. Specifically, the Transformer model achieved approximately a 10% reduction in Mean Absolute Percentage Error (MAPE) compared to the LSTM model. These findings demonstrate the substantial advantage of Transformer-based approaches in wind energy forecasting and underline their potential to significantly enhance the reliability of renewable energy integration into modern power grids.