## 4 Proposed Hybrid Model of NLMPC and Data-Driven Approach
### Implementation
For future studies, the scalability of the proposed method will be evaluated on larger test networks such as IEEE 14-bus, IEEE 39-bus, IEEE 118-bus, and IEEE 300-bus systems to further validate its real-time applicability in large-scale power systems. Additionally, parallel computing techniques and hardware acceleration, such as GPU-based computation, will be explored to optimize real-time execution for larger networks. ## 6 Conclusions

Dynamic demand fluctuations, system limitations including input saturation, communication delays, and unmeasurable feedforward disturbances pose a growing threat to real-world power systems. Sophisticated control algorithms that maximize system performance in real-world scenarios are needed to address these problems. In order to address physical contingencies, such as cyber-physical attacks, AGC of synchronous generators is the focus of this work, which presents a real-time nonlinear hybrid NLMPC and data-driven technique. The suggested method is unique in that it simultaneously addresses the technical and financial components of power systems, an aspect that other studies have frequently ignored. The integration of a thorough dynamic thermo-mechanical model of the turbine and its related parts, such as the governor and turbine dynamics within the synchronous generator, is a noteworthy breakthrough of this research. The controller can successfully manage complex dynamic interactions, like local and interregional power oscillations, which develop during cyber-physical attacks, and optimize performance under normal conditions thanks to extensive modeling. The authors present a unique thermo-electrical control approach that balances technical and economic requirements while being adaptable enough for online and real-time applications, even in the face of unforeseen disturbances. The strategy is based on a real-time hybrid of NLMPC and data-driven methods. The hybrid method accommodates both reduced and preserved network topologies and is flexible enough to operate with a variety of network models by combining data-driven methods with nonlinear MPC. With this method, power managers may operate economically and safely at the same time, even in intricate and dynamic situations. The controller's ability to quickly and accurately identify safe and economical operating points, control power flow, and maintain transient stability during real-time simulations, including scenarios like generator and line outages, was tested on the IEEE 9-bus and two-area Kundur test systems. Additionally, the approach prevents thermal stresses by effectively controlling turbine temperature and is both user-friendly and computationally economical, which makes it ideal for online and real-time applications. Beyond the scope of this study, future research will focus on enhancing the scalability of the proposed methodology for larger power systems, including IEEE 14-bus, IEEE 39-bus, IEEE 118-bus, and IEEE 300-bus networks, to further validate its real-world applicability. To improve computational efficiency, future developments will explore parallel computing techniques and hardware acceleration, such as GPU-based computation, to optimize real-time execution. Additionally, integrating this method into renewable energy-based power grids will be a key area of study to ensure adaptability to modern energy infrastructures with high penetration of solar and wind power. Cybersecurity considerations will also be explored, focusing on improving resilience against cyber-attacks and unpredictable disturbances. Experimental validation using hardware-in-the-loop (HIL) simulations will be conducted to assess real-world feasibility and ensure robustness in practical power system applications. By offering a reliable, effective, and adaptable method for optimizing power system operations in the increasingly complex cyber-physical environment, this research significantly contributes to the field and provides a strong foundation for further advancements in power system control and stability. Conceptualization, A.K. and H.A.