Reverse Power Flow Protection in Microgrids Using Time-Series Neural Network Models
Abstract
1. Introduction
2. Materials and Methods
2.1. Experimental Environment
2.2. System Configuration
2.3. Data Characteristics and Preprocessing
2.4. Time-Series Forecasting Model Design
3. Experimental Results and Analysis
3.1. Loss Function and Metric Analysis
3.2. Control Performance Evaluation
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Qazi, A.; Hussain, F.; Rahim, N.A.; Hardaker, G.; Alghazzawi, D.; Shaban, K.; Haruna, K. Towards Sustainable Energy: A Systematic Review of Renewable Energy Sources, Technologies, and Public Opinions. IEEE Access 2019, 7, 63837–63851. [Google Scholar] [CrossRef]
- Balobaid, A.; Abd-Elhafiez, W.M.; Nagy, S.M.; Trabay, D.W. Integrating Multi-Criteria Decision-Making Techniques in Assessing Renewable Energy Potential: A Case Study of Egypt. IEEE Access 2024, 12, 103594–103605. [Google Scholar] [CrossRef]
- Sani, G.D.; Ibrahim, A.; Sahabi, S.; Lailaba, B.B. Renewable Energy: Environmental Impacts and Economic Benefits for Sustainable Development. Int. J. Eng. Res. 2019, 8, IJERTV8IS080224. [Google Scholar] [CrossRef]
- Bialasiewicz, J.T. Renewable Energy Systems with Photovoltaic Power Generators: Operation and Modeling. IEEE Trans. Ind. Electron. 2008, 55, 2752–2758. [Google Scholar] [CrossRef]
- Electrical Safety Management Act, Article 22. Available online: https://www.lawnb.com/Info/ContentView?sid=L000013718_22_20220831 (accessed on 13 September 2024).
- Hatta, H.; Asari, M.; Kobayashi, H. Study of Energy Management for Decreasing Reverse Power Flow from Photovoltaic Power Systems. In Proceedings of the 2009 IEEE PES/IAS Conference on Sustainable Alternative Energy (SAE), Valencia, Spain, 28–30 September 2009; pp. 1–5. [Google Scholar] [CrossRef]
- Kim, J.-S.; Cho, G.-J.; Song, J.-S.; Shin, J.-Y.; Kim, D.-H.; Kim, C.-H. Development of Protection Method for Power System Interconnected with Distributed Generation Using Distance Relay. J. Electr. Eng. Technol. 2018, 13, 2196–2202. [Google Scholar] [CrossRef]
- Enforcement Rule of the Electrical Safety Management Act, Article 30. Available online: https://www.law.go.kr/LSW/lsInfoP.do?lsiSeq=230921#0000 (accessed on 14 September 2024).
- Park, C.-Y.; Hong, S.-H.; Lim, S.-C.; Song, B.-S.; Park, S.-W.; Huh, J.-H.; Kim, J.-C. Inverter Efficiency Analysis Model Based on Solar Power Estimation Using Solar Radiation. Processes 2020, 8, 1225. [Google Scholar] [CrossRef]
- Liu, R.; Peng, Y.; He, M.; Deng, T.; Wang, G.; Cao, Q.; Li, X.; Yu, J.; Yu, D. Research on Smooth Switching Control Technology between Grid-Connected Operation and Off-Grid Operation of Micro-Grid. In Proceedings of the 2023 Panda Forum on Power and Energy (PandaFPE), Chengdu, China, 27–30 April 2023; pp. 2244–2251. [Google Scholar] [CrossRef]
- Durán, F.; Pavón, W.; Minchala, L.I. Forecast-Based Energy Management for Optimal Energy Dispatch in a Microgrid. Energies 2024, 17, 486. [Google Scholar] [CrossRef]
- Ghasemi Naraghi, S.; Karecka, T.; Jiang, Z. Multi-Objective Optimization of Steam Cracking Microgrid for Clean Olefins Production. Syst. Control Trans. 2025, 4, 837–843. [Google Scholar] [CrossRef]
- Ullah, F.U.M.; Ullah, A.; Haq, I.U.; Rho, S.; Baik, S.W. Short-Term Prediction of Residential Power Energy Consumption via CNN and Multi-Layer Bi-Directional LSTM Networks. IEEE Access 2020, 8, 123369–123380. [Google Scholar] [CrossRef]
- Renold, A.P.; Sinha, N.; Gao, X.-Z. Hybrid Machine Learning Approach for Improved Short-Term PV Power Forecasting Accuracy. Results Eng. 2025, 28, 107374. [Google Scholar] [CrossRef]
- Khan, Z.A.; Hussain, T.; Ullah, W.; Baik, S.W. A Trapezoid Attention Mechanism for Power Generation and Consumption Forecasting. IEEE Trans. Ind. Inform. 2024, 20, 5750–5762. [Google Scholar] [CrossRef]
- Piotrowski, P.; Kopyt, M. Short-Term Forecasts of Energy Generation in a Solar Power Plant Using Various Machine Learning Models, along with Ensemble and Hybrid Methods. Energies 2024, 17, 4234. [Google Scholar] [CrossRef]
- Cho, K.; Eo, I. A Study on the Voltage Rise of the Inverter Output Terminal According to the Low Voltage Grid Connection of Solar Power Generation. J. Korea Acad.-Ind. Coop. Soc. 2020, 21, 746–752. [Google Scholar] [CrossRef]
- Rules on Technical Standards for Electrical Installations, Article 283. Available online: https://www.ulex.co.kr/ (accessed on 14 September 2024).
- Qureshi, M.; Arbab, M.A.; Rehman, S.U. Deep Learning-Based Forecasting of Electricity Consumption. Sci. Rep. 2024, 14, 6489. [Google Scholar] [CrossRef]
- Rivero-Cacho, A.; Sanchez-Barroso, G.; Gonzalez-Dominguez, J.; Garcia-Sanz-Calcedo, J. Long-Term Power Forecasting of Photovoltaic Plants Using Artificial Neural Networks. Energy Rep. 2024, 12, 2855–2864. [Google Scholar] [CrossRef]
- Wu, Y.-K.; Phan, Q.-T.; Zhong, Y.-J. Overview of Day-Ahead Solar Power Forecasts Based on Weather Classifications and a Case Study in Taiwan. IEEE Trans. Ind. Appl. 2024, 60, 1409–1423. [Google Scholar] [CrossRef]
- Gong, F.; Han, N.; Li, D.; Tian, S. Trend Analysis of Building Power Consumption Based on Prophet Algorithm. In Proceedings of the 2020 Asia Energy and Electrical Engineering Symposium (AEEES), Chengdu, China, 29–31 May 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1002–1006. [Google Scholar] [CrossRef]
- Renewable Energy Monitoring System (REMS). Available online: https://rems.energy.or.kr/pub/view/archive (accessed on 14 September 2024).
- Li, S.; Huang, H.; Lu, W. A Neural Networks Based Method for Multivariate Time-Series Forecasting. IEEE Access 2021, 9, 63915–63924. [Google Scholar] [CrossRef]
- Lim, S.-C.; Huh, J.-H.; Hong, S.-H.; Park, C.-Y.; Kim, J.-C. Solar Power Forecasting Using CNN-LSTM Hybrid Model. Energies 2022, 15, 8233. [Google Scholar] [CrossRef]
- Zhong, Y.-J.; Wu, Y.-K. Short-Term Solar Power Forecasts Considering Various Weather Variables. In Proceedings of the 2020 International Symposium on Computer, Consumer and Control (IS3C), Taichung City, Taiwan, 13–16 November 2020; pp. 432–435. [Google Scholar] [CrossRef]
- Sakib, M.; Siddiqui, T.; Mustajab, S.; Alotaibi, R.M.; Alshareef, N.M.; Khan, M.Z. An Ensemble Deep Learning Framework for Energy Demand Forecasting Using Genetic Algorithm-Based Feature Selection. PLoS ONE 2025, 20, e0310465. [Google Scholar] [CrossRef]
- Hamberg, L. Photovoltaic System Performance Forecasting Using LSTM Neural Networks. Master’s Thesis, Department of Information Technology, Uppsala University, Uppsala, Sweden, 2021. Available online: https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1601739&dswid=-5388 (accessed on 18 October 2024).
- Luo, X.; Zhang, D.; Zhu, X. Deep Learning Based Forecasting of Photovoltaic Power Generation by Incorporating Domain Knowledge. Energy 2021, 225, 120240. [Google Scholar] [CrossRef]
- Jannah, N.; Gunawan, T.S.; Yusoff, S.H.; Hanifah, M.S.A.; Sapihie, S.N.M. Recent Advances and Future Challenges of Solar Power Generation Forecasting. IEEE Access 2024, 12, 168904–168924. [Google Scholar] [CrossRef]
- Nelega, R.; Greu, D.I.; Jecan, E.; Rednic, V.; Zamfirescu, C.; Puschita, E.; Turcu, R.V.F. Prediction of Power Generation of a Photovoltaic Power Plant Based on Neural Networks. IEEE Access 2023, 11, 20713–20724. [Google Scholar] [CrossRef]
- Aouidad, H.I.; Bouhelal, A. Machine Learning-Based Short-Term Solar Power Forecasting: A Comparison between Regression and Classification Approaches Using Extensive Australian Dataset. Sustain. Energy Res. 2024, 11, 28. [Google Scholar] [CrossRef]
- Erbani, J.; Portier, P.-É.; Egyed-Zsigmond, E.; Nurbakova, D. Confusion Matrices: A Unified Theory. IEEE Access 2024, 12, 181372–181419. [Google Scholar] [CrossRef]





















| LSTM | Bi-LSTM | CNN-LSTM | GRU | |
|---|---|---|---|---|
| Input sequence length | 24 | |||
| Prediction horizon | 1 | |||
| Number of hidden units | 32 | |||
| Batch size | 32 | |||
| Loss function | MSE | |||
| Optimizer | Adam | |||
| Activation function | tanh | |||
| Normalization method | MinMaxScaler (0~1, scikit-learn v1.6.1) | |||
| Training epochs | 10/50/100/200/500/1000 | |||
| Model | Power Generation | Power Consumption | ||||||
|---|---|---|---|---|---|---|---|---|
| Epochs | MAE (W) | nRMSE (%) | R2 | Epochs | MAE (W) | nRMSE (%) | R2 | |
| LSTM | 10 | 1860.82 | 18.8426 | 0.9483 | 100 | 8578.16 | 8.7820 | 0.9558 |
| Bi-LSTM | 10 | 1838.21 | 18.7770 | 0.9487 | 50 | 8891.37 | 8.9863 | 0.9538 |
| CNN-LSTM | 10 | 1902.13 | 19.6575 | 0.9437 | 50 | 8705.41 | 8.9520 | 0.9541 |
| GRU | 10 | 1748.91 | 18.4580 | 0.9504 | 50 | 8915.67 | 8.9646 | 0.9540 |
| Model | Epochs | Epochs | Forecasting Method | MAE (W) | nRMSE (%) | R2 |
|---|---|---|---|---|---|---|
| LSTM | 100 | 100 | P–P (SESM) | 13,865.84 | 13.9369 | 0.9526 |
| Bi-LSTM | 50 | 50 | 14,047.30 | 14.0993 | 0.9515 | |
| CNN-LSTM | 50 | 50 | 14,133.18 | 14.1880 | 0.9508 | |
| GRU | 50 | 50 | 14,215.49 | 14.1543 | 0.9511 |
| Model | Epochs | Epochs | Forecasting Method | MAE (W) | nRMSE (%) | R2 |
|---|---|---|---|---|---|---|
| LSTM | 100 | 100 | P–P (SESM) | 13,865.84 | 13.9369 | 0.9526 |
| Bi-LSTM | 50 | 50 | 14,047.30 | 14.0993 | 0.9515 | |
| CNN-LSTM | 50 | 50 | 14,133.18 | 14.1880 | 0.9508 | |
| GRU | 50 | 50 | 14,215.49 | 14.1543 | 0.9511 | |
| * LSTM/LSTM | 10 | 100 | P–P | 13,864.92 | 13.9364 | 0.9526 |
| * LSTM/Bi-LSTM | 10 | 50 | 14,033.12 | 14.1003 | 0.9514 | |
| * LSTM/CNN-LSTM | 10 | 50 | 14,138.32 | 14.1902 | 0.9508 | |
| * LSTM/GRU | 10 | 50 | 14,318.78 | 14.2045 | 0.9507 | |
| * Bi-LSTM/LSTM | 10 | 100 | 13,861.14 | 13.9456 | 0.9525 | |
| * Bi-LSTM/Bi-LSTM | 10 | 50 | 14,010.12 | 14.0964 | 0.9515 | |
| * Bi-LSTM/CNN-LSTM | 10 | 50 | 14,145.16 | 14.2026 | 0.9507 | |
| * Bi-LSTM/GRU | 10 | 50 | 14,315.58 | 14.2062 | 0.9507 | |
| * CNN-LSTM/LSTM | 10 | 100 | 13,858.81 | 13.9373 | 0.9526 | |
| * CNN-LSTM/Bi-LSTM | 10 | 50 | 14,024.67 | 14.0987 | 0.9515 | |
| * CNN-LSTM/CNN-LSTM | 10 | 50 | 14,168.96 | 14.2270 | 0.9506 | |
| * CNN-LSTM/GRU | 10 | 50 | 14,321.35 | 14.2017 | 0.9507 | |
| * GRU/LSTM | 10 | 100 | 13,812.83 | 13.9376 | 0.9526 | |
| * GRU/Bi-LSTM | 10 | 50 | 14,107.40 | 14.1598 | 0.9510 | |
| * GRU/CNN-LSTM | 10 | 50 | 14,097.12 | 14.1835 | 0.9509 | |
| * GRU/GRU | 10 | 50 | 14,150.31 | 14.1396 | 0.9512 | |
| LSTM | 100 | - | N–P | 15,051.26 | 15.0891 | 0.9444 |
| Bi-LSTM | 100 | - | 15,115.39 | 15.1372 | 0.9440 | |
| CNN-LSTM | 50 | - | 15,206.84 | 15.3376 | 0.9426 | |
| GRU | 100 | - | 15,075.06 | 15.1506 | 0.9439 |
| Model | Forecasting Method | k | TP | TN | FP | FN |
|---|---|---|---|---|---|---|
| * GRU/CNN-LSTM | P–P | 0.0 | 15,202 | 928 | 314 | 157 |
| * CNN-LSTM/CNN-LSTM | 15,211 | 916 | 326 | 148 | ||
| * GRU/LSTM | 15,214 | 913 | 329 | 145 | ||
| * LSTM/Bi-LSTM | 1.5 | 14,862 | 1126 | 116 | 497 | |
| Bi-LSTM | 14,865 | 1123 | 119 | 494 | ||
| * LSTM/GRU | 2.0 | 14,770 | 1127 | 115 | 589 | |
| Bi-LSTM | N–P | 0.0 | 15,189 | 977 | 265 | 170 |
| CNN-LSTM | 1.5 | 14,824 | 1125 | 117 | 535 | |
| CNN-LSTM | 2.0 | 14,708 | 1142 | 100 | 651 |
| Model | Forecasting Method | k | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|---|---|
| * GRU/CNN-LSTM | P–P | 0.0 | 0.9716 | 0.9798 | 0.9898 | 0.9847 |
| * CNN-LSTM/CNN-LSTM | 0.9714 | 0.9790 | 0.9904 | 0.9847 | ||
| * GRU/LSTM | 0.9714 | 0.9788 | 0.9906 | 0.9847 | ||
| * LSTM/Bi-LSTM | 1.5 | 0.9631 | 0.9923 | 0.9676 | 0.9798 | |
| Bi-LSTM | 0.9631 | 0.9921 | 0.9678 | 0.9798 | ||
| * LSTM/GRU | 2.0 | 0.9576 | 0.9923 | 0.9617 | 0.9767 | |
| Bi-LSTM | N–P | 0.0 | 0.9738 | 0.9829 | 0.9889 | 0.9859 |
| CNN-LSTM | 1.5 | 0.9607 | 0.9922 | 0.9652 | 0.9785 | |
| CNN-LSTM | 2.0 | 0.9548 | 0.9932 | 0.9576 | 0.9751 |
| Model | Forecasting Method | k | Actual Energy Loss (kWh) | Forecasting Energy Loss (kWh) | Energy Savings (kWh) | Energy Savings (%) |
|---|---|---|---|---|---|---|
| * GRU/CNN-LSTM | P–P | 0.0 | 32,203.37 | 9414.51 | 22,788.86 | 70.7655 |
| * CNN-LSTM/CNN-LSTM | 9167.07 | 23,036.31 | 71.5338 | |||
| * GRU/LSTM | 9152.07 | 23,051.31 | 71.5804 | |||
| * LSTM/Bi-LSTM | 1.5 | 13,418.39 | 18,784.98 | 58.3323 | ||
| Bi-LSTM | 13,337.95 | 18,865.42 | 58.5821 | |||
| * LSTM/GRU | 2.0 | 14,054.85 | 18,148.53 | 56.356 | ||
| Bi-LSTM | N–P | 0.0 | 27,964.42 | 9781.19 | 18,183.23 | 65.0227 |
| CNN-LSTM | 1.5 | 13,722.17 | 14,242.25 | 50.9299 | ||
| CNN-LSTM | 2.0 | 14,619.27 | 13,345.15 | 47.7219 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bae, C.-H.; Song, Y.-S.; Park, C.-Y.; Hong, S.-H.; Lee, S.-H.; Cho, B.-L. Reverse Power Flow Protection in Microgrids Using Time-Series Neural Network Models. Energies 2025, 18, 5901. https://doi.org/10.3390/en18225901
Bae C-H, Song Y-S, Park C-Y, Hong S-H, Lee S-H, Cho B-L. Reverse Power Flow Protection in Microgrids Using Time-Series Neural Network Models. Energies. 2025; 18(22):5901. https://doi.org/10.3390/en18225901
Chicago/Turabian StyleBae, Chan-Ho, Yeoung-Seok Song, Chul-Young Park, Seok-Hoon Hong, So-Haeng Lee, and Byung-Lok Cho. 2025. "Reverse Power Flow Protection in Microgrids Using Time-Series Neural Network Models" Energies 18, no. 22: 5901. https://doi.org/10.3390/en18225901
APA StyleBae, C.-H., Song, Y.-S., Park, C.-Y., Hong, S.-H., Lee, S.-H., & Cho, B.-L. (2025). Reverse Power Flow Protection in Microgrids Using Time-Series Neural Network Models. Energies, 18(22), 5901. https://doi.org/10.3390/en18225901
