Gretchen Bakke thinks a lot about power—the kind that sizzles through a complex grid of electrical stations, poles, lines and transformers, keeping the lights on for tens of millions of Californians who mostly take it for granted.

They shouldn’t, says Bakke, who grew up in a rural California town regularly darkened by outages. A cultural anthropologist who studies the consequences of institutional failures, she says it’s unclear whether the state’s aging electricity network and its managers can handle what’s about to hit it.

California is casting off fossil fuels to become something that doesn’t yet exist: a fully electrified state of 40 million people. Policies are in place requiring a rush of energy from renewable sources such as the sun and wind and calling for millions of electric cars that will need charging—changes that will tax a system already fragile, unstable and increasingly vulnerable to outside forces.

“There is so much happening, so fast—the grid and nearly everything about energy is in real transition, and there’s so much at stake,” said Bakke, who explores these issues in a book titled simply, “The Grid.”

The state’s task grew more complicated with this week’s announcement that Pacific Gas and Electric, which provides electricity for more than 5 million customer accounts, intends to file for bankruptcy in the face of potentially crippling liabilities from wildfires. But the reshaping of California’s energy future goes far beyond the woes of a single company.

The 19th-century model of one-way power delivery from utility companies to customers is being reimagined. Major utilities—and the grid itself—are being disrupted by rooftops paved with solar panels and the rise of self-sufficient neighborhood mini-grids. Whole cities and counties are abandoning big utilities and buying power from wholesalers and others of their choosing.

With California at the forefront of a new energy landscape, officials are racing to design a future that will not just reshape power production and delivery but also dictate how we get around and how our goods are made. They’re debating how to manage grid defectors, weighing the feasibility of an energy network that would expand to connect and serve much of the West and pondering how to appropriately regulate small power producers.

“We are in the depths of the conversation,” said Michael Picker, president of the state Public Utilities Commission, who cautions that even as the system is being rebooted, there’s no real plan for making it all work.

Such transformation is exceedingly risky and potentially costly. California still bears the scars of having dropped its regulatory reins some 20 years ago, leaving power companies to bilk the state of billions of dollars it has yet to completely recover. And utility companies will undoubtedly pass on to their customers the costs of grid upgrades to defend against natural and man-made threats.

Some weaknesses are well known—rodents and tree limbs, for example, are common culprits in power outages. A gnawing squirrel squeezed into a transformer on Thanksgiving Day three years ago, shutting off power to parts of Los Angeles International Airport. The airport plans to spend $120 million to upgrade its power plant.

But the harsh effects of climate change expose new vulnerabilities. Rising seas imperil coastal power plants. Electricity infrastructure is both threatened by and implicated in wildfires. Picker estimates that utility operations are related to one in 10 wildland fires in California, which can be sparked by aging equipment and winds that send tree branches crashing into power lines, showering flammable landscapes with sparks.

California utilities have been ordered to make their lines and equipment more fire-resistant as they’re increasingly held accountable for blazes they cause. Pacific Gas and Electric reported problems with some of its equipment at a starting point of California’s deadliest wildfire, which killed at least 86 people in November in the town of Paradise. The cause of the fire is under investigation.

Control room at the California Independent System Operator. Photo by Renée C. Byer/Sacramento Bee

New and complex cyber threats are more difficult to anticipate and even more dangerous. Computer hackers, operating a world away, can—and have—shut down electricity systems, toggling power on and off at will, and even hijacked the computers of special teams dispatched to restore control.

Thomas Fanning, CEO of Southern Co., one of the country’s largest utilities, recently disclosed that his teams have fended off multiple attempts to hack a nuclear power plant the firm operates. He called grid hacking “the most important under-reported war in American history.”

However, if you’ve got what seems like an insoluble problem requiring a to-the-studs teardown and innovative rebuild, California is a good place to start. After all, the first electricity grid was built in San Francisco in 1879, three years before Thomas Edison’s power station in New York City. (Edison’s plant burned to the ground a decade later.)

California’s energy-efficiency regulations have helped reduce statewide energy use, which peaked a decade ago and is on the decline, somewhat easing pressure on the grid. The major utilities are ahead of schedule in meeting their obligation to obtain power from renewable sources.

California’s universities are teaming with national research labs to develop cutting-edge solutions for storing energy produced by clean sources. California is fortunate in the diversity of its energy choices: hydroelectric dams in the north, large-scale solar operations in the Mojave Desert to the east, sprawling windmill farms in mountain passes and heat bubbling in the Geysers, the world’s largest geothermal field north of San Francisco. A single nuclear-power plant clings to the coast near San Luis Obispo, but it will be shuttered in 2025.

But more renewable energy, accessible at the whims of weather, can throw the grid off balance. Renewables lack the characteristic that power planners most prize: dispatchability, ready when called on and turned off when not immediately needed. Wind and sun don’t behave that way; their power is often available in great hunks—or not at all, as when clouds cover solar panels or winds drop.

In the case of solar power, it is plentiful in the middle of the day, at a time of low demand. There’s so much in California that most days the state pays its neighbors to siphon some off, lest the excess impede the grid’s constant need for balance—for a supply that consistently equals demand.

So getting to California’s new goals of operating on 100 percent clean energy by 2045 and having 5 million electric vehicles within 12 years will require a shift in how power is acquired and managed. Consumers will rely more heavily on stored power, whose efficiency must improve to meet that demand.

“Large-scale renewables are disrupting the conventional paradigm of how the grid has been constructed,” said Lorenzo Kristov, who is retired from a long career designing markets and planning the state’s grid. “Wind and solar—you can’t tell them what to do. They are challenging just about every aspect of how the electricity system has worked for decades. We need a lot of new thinking.”

Electricity may be governed by the immutable laws of physics, but it is managed by the California Independent System Operator, known as CAISO.

Electricity is bought and sold in a market, in five- and 15-minute increments. Until a national wave of deregulation in the 1990s, electricity markets functioned as they always had: Monolithic power companies operated as regulated monopolies. Utilities did everything: produced power, sold it and delivered it across lines and poles they owned.

California became one of the first states to deregulate electricity in 1996, and established CAISO to run the grid and the wholesale power market. That turned out to be a short-lived policy resulting in market manipulation by Enron and other energy companies and speculators, who created phony shortages and jacked up prices. Those factors and others eventually plunged parts of the state into periodic darkness; rolling blackouts shocked and panicked consumers and officials alike.

Regulation was suddenly back in fashion. Collateral damage: Pacific Gas and Electric filed for bankruptcy after going $9 billion into debt buying that expensive power for its customers, and Gov. Gray Davis was recalled.

“Could it happen again? It could happen in a flash,” said Loretta Lynch, who was president of the state Public Utilities Commission during the energy crisis. She said state and federal regulators should assert more control over the market and, ultimately, rein in costs to consumers.

The Independent System Operator’s complicated name is in keeping with the profundity of the service it provides: in addition to its role as grid custodian, it’s also a regional transmission operator, shuffling about a third of the power demand in the West.

The state is dominated by three major utilities, PG&E, Southern California Edison and San Diego Gas & Electric. Publicly owned utilities in Sacramento and Los Angeles operate their own systems, as do dozens of smaller districts and cooperatives. But even the community groups that are no longer customers of the big utilities are plugged into the same wires and poles.

Much of the interconnection for a Western-wide grid already exists: California is tethered to its neighbors, who buy and sell power from and to each other. They all grab energy as it spins around a 120,000-mile distribution system known as the Western Doughnut, which is fed by more than 500 power companies. And, while some officials worry that regionalization would cede control to other states, there are already 38 regional authorities managing the network.

“Things are moving faster than ever before,” said Mark Rothleder, a CAISO vice president who plans for how renewables and other innovations might affect the grid. It’s critical, he says, to proceed thoughtfully.

“We’re in the middle of change, and because of that … you run the risk of missing something. We don’t have the luxury of just being able to miss it. Because if we miss it, the lights go off. That’s why we look ahead, study what this change is going to do and how do we maintain reliability.”

Help is expected to come, like next-generation storage capacity, from technology. Some of the possible advances resemble souped-up science projects: pumping compressed air underground to store for later use, harnessing tidal energy in the San Francisco Bay, collecting the water that flows through hydroelectric dams and, with that middle-of-the-day solar power, pumping it back up to the facility’s turbines.

Gretchen Bakke. Photo by Julie Cart/CALmatters

Some experts have said the new demands on the grid could collapse it. Bakke and others say those dire predictions aren’t being borne out—so far.

“I would have expected more problems, and I think the reason there haven’t been more is that the electrical engineers are now extremely interested,” she said. After a century of sameness, “they have a good problem to work on.”

As California chews on the problem, other states and even the federal government are watching—as they do many developments that emerge first in California—to see what arises.

“California must try to provide a model that other jurisdictions can copy,” said Matthew Freedman, staff attorney at The Utility Reform Network, a watchdog group. “It will require trial and error and a willingness to experiment. If everything you try succeeds, that means you are not taking enough risks.”

“We are out there now on the skinny branches,” Freedman said, “and that’s where the state excels.”

This is the first in a series of articles, published in partnership with The Sacramento Bee, to explore California’s need to modernize the electricity network that powers the state.