End to end prediction of optimal power flow in sustainable power system using physics-informed spatiotemporal graph neural network
DOI:
https://doi.org/10.64470/elene.2026.33Keywords:
alternating current optimal power flow, renewable energy, reconfiguration, physics-informed loss function, spatiotemporal graph neural networkAbstract
This paper proposes a physics-informed spatiotemporal graph neural network (PIStGNN) for end-to-end ACOPF prediction in sustainable power systems. The proposed framework embeds physical power flow constraints, grid topology, and temporal dynamics of renewable generation. The model is validated on IEEE 33-, 57-, and 118-bus systems using time-series 60,048 datasets generated in Pandapower. All experiments are implemented in Python and performance are evaluated using prediction accuracy, physical feasibility, and computational efficiency. The results show that system voltage profiles remain within acceptable operational limits of 0.96–1.04 p.u. across all scenarios. The system efficiency analysis reveals that moderate renewable penetration reduces transmission losses, while excessive penetration increases losses due to reverse power flow and congestion in larger systems. The proposed PIStGNN achieves prediction errors on the order of 10⁻² p.u. for voltage magnitude and angle while delivering speedups of up to 10,135× compared with Newton–Raphson-based solvers. Furthermore, physics-informed recurrent graph models achieve minimum uncertainty values of 1.06 × 10⁻³, 2.88 × 10⁻³, and 1.19 × 10⁻³ for the IEEE 33-, 57-, and 118-bus systems, respectively. The results demonstrate that integrating physics-informed learning with spatiotemporal graph modeling provides an efficient surrogate for ACOPF prediction in sustainable power systems.
Downloads
References
Abdi, H. (2021). Profit-based unit commitment problem: A review of models, methods, challenges, and future directions. Renewable and Sustainable Energy Reviews, 138, 1-28. doi:https://doi.org/10.1016/j.rser.2020.110504
Aravena, I., Molzahn, D., Zhang, S., Petra, C., Curtis, F., Tu, S., . . . Veeramany, A. (2023). Recent Developments in Security-Constrained AC Optimal Power Flow: Overview of Challenge 1 in the ARPA-E Grid Optimization Competition. Operation Research, 71(6), 1-43. doi:https://doi.org/10.1287/opre.2022.0315
Colm Lowery and Mark O’Malley. (2012). Impact of Wind Forecast Error Statistics Upon Unit Commitment. IEEE Transactions on Sustainable Energy, 760-769. doi:https://doi.org/10.1109/TSTE.2012.2210150
Gao, M., Yu , J., Yang , Z., & Zhao , J. (2024). A Physics-Guided Graph Convolution Neural Network for Optimal Power Flow. IEEE Transactions on power Systems,, 39(1), 380-390. doi:https://doi.org/10.1109/TPWRS.2023.3238377
Halilbasic, L., Thams, F., Venzke, A., Chatzivasileiadis, S., & Pinson, P. (2018). Data-driven Security-Constrained AC-OPF for Operations and Markets. 2018 power systems computation conference (PSCC). doi:https://doi.org/10.23919/PSCC.2018.8442786
Hasan, F., Kargarian, A., & Mohammadi, A. (2020). A Survey on Applications of Machine Learning for Optimal Power Flow. 2020 IEEE Texas Power and Energy Conference (TPEC). College Station, TX, USA. doi:https://doi.org/10.1109/TPEC48276.2020.9042547
Hentenryck, P. V. (2021). Machine Learning for Optimal Power Flows. Informs Tutorials in Operations Research, 62-82. doi:https://doi.org/10.1287/educ.2021.0234
Hmida, J. B., Morshed , M. J., Lee , J., & Chambers , T. (2018). Hybrid Imperialist Competitive and Grey Wolf Algorithm to Solve Multiobjective Optimal Power Flow with Wind and Solar Units. Energies, 11(11), 1-23. doi:https://doi.org/10.3390/en11112891
Huang, B., & Wang, J. (2023). Applications of Physics-Informed Neural Networks in Power Systems - A Review. IEEE Transactions on Power Systems, 38(1), 572-588. doi:https://doi.org/10.1109/TPWRS.2022.3162473
Jalving, J., Eydenberg, M., Blakely, L., Castillo, A., Kilwein, Z., Skolfield, J., . . . Laird, C. (2024). Physics-informed machine learning with optimization-based guarantees: Applications to AC power flow. International Journal of Electrical Power and Energy Systems, 157, 109741. doi:https://doi.org/10.1016/j.ijepes.2023.109741
Jordehi, A. R. (2018). How to deal with uncertainties in electric power systems? A review. Renewable and Sustainable Energy Reviews, 96, 145-155. doi:https://doi.org/10.1016/j.rser.2018.07.056
Kaffash, M. (2022). Data-Driven Uncertainty Representation for Scheduling Flexibility in Energy Systems. KU Leuven – Faculty of Engineering Science. Retrieved from https://lirias.kuleuven.be/3750267?&lang=en
Kilwein, Z., Boukouvala, F., Laird, C., Castillo, A., Blakely, L., Eydenberg, M., . . . Batsch-Smith, L. (2021). AC-Optimal Power Flow Solutions with Security Constraints from Deep Neural Network Models. 31st European Symposium on Computer Aided Process Engineering. doi:https://doi.org/10.1016/B978-0-323-88506-5.50142-X
Lei, X., Yang , Z., Yu , J., Zhao , J., Gao , Q., & Yu, H. (2021). Data-Driven Optimal Power Flow: A Physics-Informed Machine Learning Approach. IEEE Transactions on Power Systems, 36(1), 346-354. doi:https://doi.org/10.1109/TPWRS.2020.3001919
Lin, Q., Wu,, Q., Huang,, G., & Zhai, M. (2014). An interval parameter optimization model for sustainable power systems planning under uncertainty. Electrical Power and Energy Systems, 54, 631–641. doi:https://doi.org/10.1016/j.ijepes.2013.08.018
Roald, L. A., Pozo, D., Papavasiliou, A., Molzahn, D., Kazempour, J., & Conejo, A. (2023). Power systems optimization under uncertainty: A review of methods and applications. Electric Power Systems Research, 214, 1-25. doi:https://doi.org/10.1016/j.epsr.2022.108725
Saffari, M., & Khodayar, M. (2024). Spatiotemporal Deep Learning for Power System Applications: A Survey. IEEE Access, 12,, 1-35. doi:https://doi.org/10.1109/ACCESS.2024.3424854
Singh, R., & Powar, V. (2024). The Future of Generation, Transmission, and Distribution of Electricity. In A. Lakhtakia, C. M. Furse, & T. G. Mackay, The Advancing World of Applied Electromagnetics (pp. 349-383). Springer, Cham. doi:https://doi.org/10.1007/978-3-031-39824-713
Wang, Y. (2023). Advances in spatiotemporal graph neural network. International Journal of Digital Earth, 16(1), 2034–2066. doi:https://doi.org/10.1080/17538947.2023.2220610
Xie, R., Wei , W., Li, M., Dong, Z., & Mei, S. (2023). Sizing capacities of renewable generation, transmission, and energy storage for low-carbon power systems: A distributionally robust optimization approach. Energy, 263, 1-15. doi:https://doi.org/10.1016/j.energy.2022.125653
Y. Zhou, Li , Y., & Huang, G. (2015). Planning sustainable electric-power system with carbon emission abatement through CDM under uncertainty. Applied Energy, 140, 350–364. doi:https://doi.org/10.1016/j.apenergy.2014.11.057
Yang, Z., Zhong, H., Xia,, Q., & Kang, C. (2017). Fundamental Review of the OPF Problem: Challenges, Solutions, and State-of-the-Art Algorithms. Journal of Energy Engineering, 144(1), 1-12. doi:https://doi.org/10.1061/(ASCE)EY.1943-7897.0000510
Yaniv, A., Kumar, P., & Beck, Y. (2023). Towards adoption of GNNs for power flow applications in distribution systems. Electric Power Systems Research, 216, 1-8. doi:https://doi.org/10.1016/j.epsr.2022.109005
Zhou, D., Zhang, Y., Wang, Q., & Ding, H. (2024). How do uncertain renewable energy induced risks evolve in a two-stage deregulated wholesale power market. Applied Energy, 353, 122-140. doi:https://doi.org/10.1016/j.apenergy.2023.122140
Zideh, M. J., Paroma , C., & Srivastava , A. K. (2024). Physics-Informed Machine Learning for Data Anomaly Detection, Classification, Localization, and Mitigation: A Review, Challenges, and Path Forward. IEEE ACCESS, IEEE Power & Energy Society Section, 12, 4597-4617. doi:https://doi.org/10.1109/ACCESS.2023.3347989
Downloads
Published
Data Availability Statement
The source code and dataset are publicly available on GitHub repository; https://github.com/MajidMalori/Optimal-Power-Flow-Prediction-Using-Physics-Informed-Spatiotemporal-Graph-Neural-Network-
Issue
Section
License
Copyright (c) 2026 Abdul-Majid Issah Malori, Emmanuel Asuming Frimpong, Francis Effah Boafo , Elvis Twumasi, Peter Asigri, Bernard Marfo Adjei

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors retain copyright of their work and grant the journal the right to publish it under the Creative Commons Attribution 4.0 International License (CC BY 4.0). This allows for maximum dissemination and reuse with appropriate citation.
ORCID 