Modern smart power grids dynamically coordinate distributed renewable generation, energy storage, and flexible loads across interconnected alternating current transmission lines. The swing equation governs synchronous rotor angle dynamics and frequency stability by balancing mechanical input power against electrical power transfer. AC active and reactive power flows obey the nonlinear power flow equations.