Abstract
This paper presents a comprehensive multi-stage system designed to improve the accuracy of energy load forecasts and evaluate the effectiveness of both forecast models and demand response (DR) strategies. Using the REFIT dataset, a comparative analysis of a hierarchy of forecast models was conducted, including linear regression, random forest, SVR, k-NN, LSTM, and a hybrid encoder-decoder with an attention mechanism. The results of the study indicated that the developed hybrid encoder-decoder model with an attention mechanism achieved the best accuracy (R² = 0.91, MAPE = 2.39%), demonstrating excellent ability to capture complex temporal patterns in the data. Rigorous multi-stage testing confirmed the stability and high generalizability of this deep learning model. The highly accurate forecast was incorporated into a mixed integer linear programming (MILP)-based model for home energy management system (HEMS) optimization. The results indicated that this complex framework significantly reduced energy costs by 28.7% and reduced peak load by 37.1% through optimal appliance scheduling. This work demonstrates how to effectively combine state-of-the-art artificial intelligence (AI)-based forecasting with formal energy optimization in a single, comprehensive system. This method not only allows for more accurate consumption forecasting, especially during peak hours, but also demonstrates that AI can significantly improve the flexibility of energy networks and the energy efficiency of smart homes.