CNN-Attention-Based Renewable Energy Generation and Load Forecasting Method for Stable Operation of Smart Grids
Abstract
High renewable penetration increases source-load uncertainty and challenges the stable operation of smart grids. This paper proposes a prediction-driven framework that integrates CNN-Attention-based joint renewable generation and load forecasting with rolling optimization of a battery–supercapacitor hybrid energy storage system. The main innovation lies in coupling source-load forecasting with hybrid energy storage dispatch, so that predicted renewable generation and load trajectories can directly support rolling scheduling decisions. Multi-source temporal inputs, including wind power, photovoltaic power, load demand, meteorological variables, electricity price, and periodic time encodings, are used to characterize source-load coupling. One-dimensional convolution extracts local fluctuation features, while temporal attention assigns adaptive weights to informative historical periods. In the dispatch stage, the battery mainly undertakes low-frequency energy balancing, whereas the supercapacitor suppresses high-frequency power fluctuations. The optimization objective jointly considers grid purchase cost, storage degradation cost, renewable curtailment penalty, load shedding penalty, and grid power fluctuation penalty. Experiments were conducted on one-year operational data from a regional wind–photovoltaic–storage microgrid, with a 15-min sampling interval and 35,040 time steps. Compared with LSTM, GRU, CNN, CNN-LSTM, and Transformer baselines, the proposed model achieved the lowest forecasting errors, with MAE/RMSE/MAPE of 6.692 kW/8.322 kW/3.288% for renewable generation and 3.747 kW/4.490 kW/0.406% for load forecasting. At the dispatch level, the proposed strategy reduced the total operating cost index to 360, decreased grid power fluctuation to 3.4%, improved renewable accommodation to 90.6%, and lowered curtailment to 2.8%.