Cyber-Physical Systems Series

Smart Grids and Energy Systems

The power grid is the largest machine humans have built. Software, sensors, and batteries are turning it into a cyber-physical system.

From One-Way Grid to Smart Grid

For a century, electricity flowed one way: from large power plants, over transmission lines, to homes and businesses. Today, homes have solar panels and batteries, cars plug in, and wind and solar farms rise and fall with the weather. A smart grid adds sensors, communication, and software so power and information can flow both ways.

A traditional one-way grid from power plant to homes, compared with a smart grid where wind, solar, batteries, EVs, homes, and power plants all exchange power and data with the grid.
The smart grid turns millions of homes and devices into active participants.

The Balancing Act

The grid stores very little energy, so the power produced must match the power used every second. The grid's frequency, 60 cycles per second (60 Hz) in North America, is its heartbeat. If demand outruns supply, the frequency drops. If supply outruns demand, it rises. Automatic controls respond within seconds to keep it steady.

A balance scale with supply on one side and demand on the other, and a gauge showing the grid frequency at 60 hertz.
Grid operators keep supply and demand in balance around the clock.

The Grid in the News

Electrical grid infrastructure

A whole peninsula goes dark

In April 2025, Spain and Portugal lost power. Europe's grid operators found the core problem was voltage control: voltage spiked and power plants shut themselves off in a chain reaction.

PV Tech, March 2026
Emerald AI connecting a data center to the grid

A data center that eases off

In a Phoenix test with utility SRP, Emerald AI's software cut an AI computing cluster's power use 25% for three hours during peak demand, without hurting its work.

NVIDIA, July 2025
Technician installing a home battery

Home batteries join forces

Cheaper batteries are spreading through homes, and utilities in dozens of countries now pool them into virtual power plants to help balance the grid.

Yale Environment 360, July 2026

The Solar Challenge: The "Duck Curve"

Solar panels produce the most power at midday and none at night. As solar grows, the power the grid must supply from other sources dips at midday and then climbs steeply at sunset, just as people get home. Plotted over a day, the shape looks like a duck.

A day's electricity demand. Total demand is steady, but demand left after rooftop solar dips at midday and climbs steeply in the evening.
The steep evening climb is where batteries and flexible demand help most.

Virtual Power Plants

A virtual power plant is software that coordinates thousands of small devices, such as home batteries, smart thermostats, water heaters, and EV chargers, so they act together like one power plant. When the grid is stressed, they release stored energy or briefly use less.

A grid operator asks for power; a software platform coordinates batteries, thermostats, EV chargers, and water heaters in many homes so they act like one power plant.
Each home contributes a little; together they can match a real power plant.

Microgrids: Keeping the Lights On Locally

A microgrid is a small local grid, such as a hospital, campus, or military base, with its own power sources and controller. Normally it is connected to the main grid. During an outage it can disconnect and keep running on its own, which is called islanding.

A microgrid with solar panels, batteries, a backup generator, and a local controller disconnects from the main grid during an outage and keeps a hospital powered.
The switch and the local controller are what make islanding safe and automatic.

New Capabilities, New Risks

Rising demand

AI data centers, electric vehicles, and heat pumps are adding demand quickly, so flexibility matters more than ever.

Electronics everywhere

Solar panels and batteries connect through inverters controlled by software. Their settings can help steady the grid, or, as in Spain, they may disconnect when they are needed most.

More ways in

Every connected device is a possible target. Attackers hit Polish wind and solar farms in 2025. See Security Challenges.

Explore Further

EIA Real-Time Operating Grid

See hour-by-hour U.S. electricity demand and the mix of power sources by region, including the duck curve in action.

eia.gov

PyPSA

For programmers: free, open-source Python software for modeling power grids, renewables, and storage.

pypsa.org

Further Reading