Abstract:
Renewable generation and electricity demand are variable, which makes short-term forecasting difficult for smart-microgrid energy management. This thesis develops and evaluates a hybrid Long Short-Term Memory (LSTM) and XGBoost forecasting model for solar generation, wind generation, and load demand. The implementation was completed in Google Colab using hourly Open Power System Data (OPSD). The data-processing pipeline includes quality checking, timebased feature engineering, lagged and rolling features, normalization, and chronological separation into training, validation, and test sets. LSTM is used to learn temporal dependencies from sequential observations, while XGBoost learns nonlinear relationships among the engineered features and the LSTM representation. The mean absolute error (MAE), root mean squared error (RMSE), and coefficient of determination (R 2 ) are used to compare the proposed hybrid model to standalone XGBoost, standalone LSTM and persistence or statistical baselines. The findings indicate that hybrid model offers the best forecasting performance compared to the models considered. The thesis hence provides an assessable predictive element toward an energymanagement system of the future through AI.