Microgrid Energy Production Prediction System Using Explainable Machine Learning for Intelligent Energy Management

Authors

  • Zhang Jianying Department of Electrical Engineering, School of Physics and Electronic Engineering, Hanjiang Normal University, Shiyan 442000, Hubei, People’s Republic of China

Keywords:

Microgrid Energy Production, Machine Learning, Explainable Artificial Intelligence (XAI), Renewable Energy Forecasting, SHAP and LIME

Abstract

The increasing adoption of renewable energy in modern microgrids requires accurate energy production forecasting to support intelligent energy management, grid stability, battery scheduling, and economic dispatch. However, the intermittent nature of renewable energy and the black-box behavior of many machine learning models reduce forecasting reliability and operator trust. This study proposes an Explainable Machine Learning framework for predicting microgrid energy production while providing transparent interpretations of prediction results. Historical meteorological, operational, and temporal data were preprocessed through missing value handling, normalization, feature engineering, feature selection, and K-Fold cross-validation. Four machine learning algorithms Random Forest, XGBoost, LightGBM, and Long Short-Term Memory (LSTM) were evaluated using Bayesian hyperparameter optimization. Model performance was measured using RMSE, MAE, MAPE, and R², while Explainable Artificial Intelligence techniques, including SHAP and LIME, were applied to interpret predictions. Experimental results showed that the Random Forest model achieved the best performance with an RMSE of 8.74, MAE of 6.51, MAPE of 4.32%, and R² of 0.972. Explainability analysis identified solar irradiance, photovoltaic output, cloud cover, battery State of Charge, ambient temperature, and electricity load demand as the most influential variables. The proposed framework enhances forecasting accuracy, transparency, and decision support for intelligent microgrid management.

References

Adhikari, D., Jiang, W., Zhan, J., He, Z., Rawat, D. B., Aickelin, U., & Khorshidi, H. A. (2022). A comprehensive survey on imputation of missing data in internet of things. ACM Computing Surveys, 55(7), 1–38.

Agarwal, V., Walker, C. M., Manjunatha, K. A., Mortenson, T. J., Lybeck, N. J., Hall, A. C., Hill, R. A., & Gribok, A. V. (2022). Technical basis for advanced artificial intelligence and machine learning adoption in nuclear power plants. Idaho National Laboratory (INL), Idaho Falls, ID (United States).

Albarakati, A. J., Boujoudar, Y., Azeroual, M., Eliysaouy, L., Kotb, H., Aljarbouh, A., Khalid Alkahtani, H., Mostafa, S. M., Tassaddiq, A., & Pupkov, A. (2022). Microgrid energy management and monitoring systems: A comprehensive review. Frontiers in Energy Research, 10, 1097858.

Alom, M. Z., Taha, T. M., Yakopcic, C., Westberg, S., Sidike, P., Nasrin, M. S., Hasan, M., Van Essen, B. C., Awwal, A. A. S., & Asari, V. K. (2019). A state-of-the-art survey on deep learning theory and architectures. Electronics, 8(3), 292.

Bayle, P., Bayle, A., Janson, L., & Mackey, L. (2020). Cross-validation confidence intervals for test error. Advances in Neural Information Processing Systems, 33, 16339–16350.

Bodner, K., Fortin, M., & Molnár, P. K. (2020). Making predictive modelling ART: accurate, reliable, and transparent. Ecosphere, 11(6), e03160.

Jane, R., Parker, G., Vaucher, G., & Berman, M. (2020). Characterizing meteorological forecast impact on microgrid optimization performance and design. Energies, 13(3), 577.

Ji, S., Wang, X., Lyu, T., Liu, X., Wang, Y., Heinen, E., & Sun, Z. (2022). Understanding cycling distance according to the prediction of the XGBoost and the interpretation of SHAP: A non-linear and interaction effect analysis. Journal of Transport Geography, 103, 103414.

Jiayi, H., Chuanwen, J., & Rong, X. (2008). A review on distributed energy resources and MicroGrid. Renewable and Sustainable Energy Reviews, 12(9), 2472–2483.

Kabeyi, M. J. B., & Olanrewaju, O. A. (2022). Sustainable energy transition for renewable and low carbon grid electricity generation and supply. Frontiers in Energy Research, 9, 743114.

Kalusivalingam, A. K., Sharma, A., Patel, N., & Singh, V. (2022). Leveraging random forests and gradient boosting for enhanced predictive analytics in operational efficiency. International Journal of AI and ML, 3(9).

Keim, D. A. (2002). Information visualization and visual data mining. IEEE Transactions on Visualization and Computer Graphics, 8(1), 1–8.

Klein, S. A., Hall, A., Norris, J. R., & Pincus, R. (2018). Low-cloud feedbacks from cloud-controlling factors: A review. Shallow Clouds, Water Vapor, Circulation, and Climate Sensitivity, 135–157.

Komorowski, M., Marshall, D. C., Salciccioli, J. D., & Crutain, Y. (2016). Exploratory data analysis. Secondary Analysis of Electronic Health Records, 185–203.

Kuhn, M., & Johnson, K. (2019). Feature engineering and selection: A practical approach for predictive models. Chapman and Hall/CRC.

Le, D. D., Pham, V., Nguyen, H. N., & Dang, T. (2019). Visualization and explainable machine learning for efficient manufacturing and system operations. Smart and Sustainable Manufacturing Systems, 3(2), 127–147.

Lehner, B., Czisch, G., & Vassolo, S. (2005). The impact of global change on the hydropower potential of Europe: a model-based analysis. Energy Policy, 33(7), 839–855.

Loh, D. R., Yeo, S. Y., Tan, R. S., Gao, F., & Koh, A. S. (2022). Explainable machine learning predictions to support personalized cardiology strategies. European Heart Journal-Digital Health, 3(1), 49–55.

Maharana, K., Mondal, S., & Nemade, B. (2022). A review: Data pre-processing and data augmentation techniques. Global Transitions Proceedings, 3(1), 91–99.

Nikolova, S., Causevski, A., & Al-Salaymeh, A. (2013). Optimal operation of conventional power plants in power system with integrated renewable energy sources. Energy Conversion and Management, 65, 697–703.

Pfenninger, S., & Staffell, I. (2016). Long-term patterns of European PV output using 30 years of validated hourly reanalysis and satellite data. Energy, 114, 1251–1265.

Rodríguez-Pérez, R., & Bajorath, J. (2019). Interpretation of compound activity predictions from complex machine learning models using local approximations and shapley values. Journal of Medicinal Chemistry, 63(16), 8761–8777.

Schober, P., Boer, C., & Schwarte, L. A. (2018). Correlation coefficients: appropriate use and interpretation. Anesthesia & Analgesia, 126(5), 1763–1768.

Singh, A. K., Ibraheem, S. K., Muazzam, M., & Chaturvedi, D. K. (2013). An overview of electricity demand forecasting techniques. Network and Complex Systems, 3(3), 38–48.

Tina, G. M., Ventura, C., Ferlito, S., & De Vito, S. (2021). A state-of-art-review on machine-learning based methods for PV. Applied Sciences, 11(16), 7550.

Van Essen, B., Macaraeg, C., Gokhale, M., & Prenger, R. (2012). Accelerating a random forest classifier: Multi-core, GP-GPU, or FPGA? 2012 IEEE 20th International Symposium on Field-Programmable Custom Computing Machines, 232–239.

Xu, C., Liao, Z., Li, C., Zhou, X., & Xie, R. (2022). Review on interpretable machine learning in smart grid. Energies, 15(12), 4427.

Xu, X., Wei, Z., Ji, Q., Wang, C., & Gao, G. (2019). Global renewable energy development: Influencing factors, trend predictions and countermeasures. Resources Policy, 63, 101470.

Xu, Y., & Goodacre, R. (2018). On splitting training and validation set: a comparative study of cross-validation, bootstrap and systematic sampling for estimating the generalization performance of supervised learning. Journal of Analysis and Testing, 2(3), 249–262.

Zhang, J., Mucs, D., Norinder, U., & Svensson, F. (2019). LightGBM: An effective and scalable algorithm for prediction of chemical toxicity–application to the Tox21 and mutagenicity data sets. Journal of Chemical Information and Modeling, 59(10), 4150–4158.

Downloads

Published

2025-10-30

How to Cite

Jianying, Z. (2025). Microgrid Energy Production Prediction System Using Explainable Machine Learning for Intelligent Energy Management. Journal Basic Science and Technology, 14(3), 105-118. Retrieved from https://iocscience.org/ejournal/index.php/JBST/article/view/7382