system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:Is the electric grid balanced at all times in terms of power plant output and consumption? If yes, how is this achieved? If no, then how are blackouts prevented and how are the excess power dispensed safely?
gpt
For the most part, yes, it's balanced. When something draws current from the grid it actually causes more current to flow out of the generators at the power plant. That in turn causes them to slow down. A change in speed decelerates the physical motor, that takes energy, so it will instantly provide extra power if demanded as it's storing energy by rotating, but it won't last long, and that's where the control systems kick in and provide extra energy after detecting the change in speed to bring it back to where it's suppose to be.

Also, if one motor is spinning at a different speed than a different one on the grid energy will flow out of one and into the other, in effect, they force each other to run at the same speed. The result is that all power plants on the grid operate as one giant motor, and the grid has something like inertia, an instant bump takes a while to actually slow down the grid, and during that timeframe they can adjust the power inputs into the grid. It can cause voltage fluctuations as well, the voltage will drop and it causes many devices to draw less power (making the grid as a whole matched).

There are also power factor correction circuits throughout the grid that will smooth the sub-cycle bumps in current and voltage using capacitors and inductors (which also store energy).

In the end, very short term spikes are met with magnetic and electric fields that store energy small amounts of energy, moderate spikes cause minor changes in grid frequency, and long term they match the overall output by controlling power put into the generators.

If you have really big spikes, like a power line goes down and drops a huge load off the grid, well that bit of the grid will get disconnected, if that results in a power plant getting disconnected they will usually have some way of doing a quick shutdown (a load on site they can transfer all power to while they shut down). That does result in a blackout, but input is still equal to output.