Inside the software running Sunrun’s home solar-battery fleets

Virtual power plants are only as good as the software that controls them. Here’s how Lunar Energy is making the most of Sunrun’s grid potential.
By Jeff St. John

  • Link copied to clipboard
Suburban homes with solar panels on their roofs
Sunrun has tapped Lunar Energy’s Gridshare software to operate its virtual power plants made up of solar-and-battery-equipped homes like these in California. (Sunrun)

Rooftop solar systems, backup batteries, electric-vehicle chargers and smart thermostats and appliances make up the building blocks of virtual power plants. But developing the software that can turn thousands of these home energy devices into reliable power grid resources isn’t easy. In fact, it can take decades to perfect.

Just ask Chris Wright, senior vice president of software technology and product at Lunar Energy. As co-founder of Moixa, the U.K.-based startup that was acquired by Lunar Energy in 2021, he’s spent nearly 20 years working on batteries and the software that can optimize their value for the buildings where they are installed and the grids they’re connected to.

The Gridshare software developed by Moixa and now owned by Lunar Energy is currently managing tens of thousands of battery-equipped homes providing grid services in Japan and Europe. That puts Lunar Energy in league with a handful of large-scale virtual power plant operators, including Tesla and sonnen. We come from a world where we’re very used to [having] tens of thousands of things” to manage, Wright said — not just batteries, but solar panels and household electricity loads.

Now Lunar Energy is deploying the finely tuned software in the U.S. via its recently revealed partnership with Sunrun, the residential solar and battery company with virtual power plants across the country. Over the past year, Gridshare has taken over operations of 12 of Sunrun’s virtual power plants (VPPs), including a project in Hawaii that’s delivering grid-stabilizing energy on a second-by-second basis and California aggregations that have seen performance improve since it took charge.

Sunrun’s VPPs have maintained 100 percent performance and uptime throughout this test period, Wright noted. That’s not a simple task, considering that Gridshare is handling thousands of home batteries. Hitting its performance targets requires understanding what’s online and what’s not online, what’s the state of charge and capacity of each battery, what the customer constraints are for each one, and understanding across the aggregated fleet what you can actually get delivered,” he said.

But meeting these minimum service-level agreements is just the start, he noted. Making the most of a fleet of battery- and solar-equipped homes also means optimizing for the maximum savings for the customer in their home, and at the same time enabling the most amount of energy for delivery of grid services,” he said.

That requires not just knowing the solar outputs, battery capacities and energy demands of homes and the grid at any given moment, but forecasting these into the future, he said. What’s the value of sending energy to the grid right now versus storing it and sending it an hour from now, or an hour after that? What are the risks that incoming weather will cause grid outages that require home batteries to bank their electricity for backup power? And are homeowners willing to bear that risk in exchange for getting paid to send power to a grid that’s facing its own weather-driven reliability pressures?

And, finally, it’s vital to remember that the value of a VPP to the grid is more than the sum of its individual parts, he said. Some homes have more battery and solar power available than others; some use more power than others; and some are located in places with a higher risk of grid outages. Less sophisticated approaches to VPPs may simply program every home to do the same thing in the same way — charge up the battery during the day, sit around waiting, and discharge it for grid service,” as Wright put it.

But that’s a sure way to miss out on the extra value that can be unlocked by software that knows just what each home is capable of delivering and how to add that all up to the most valuable aggregate outcome, he said.

Defining what makes VPP software that can perform at scale

Lunar Energy isn’t the only software provider focused on solving the complexities of optimizing virtual power plants. Notably, its two biggest VPP competitors have software of their own. Tesla, which operates large-scale VPPs in Australia and the U.S., has developed a software suite that applies similar machine-learning, forecasting and real-time controls to reducing utility bills and maximizing grid revenues. Sonnen, the German company owned by Shell which has VPPs in Europe and the U.S., uses its sonnenVPP software to control thousands of home batteries for participation in wholesale energy markets via the internet.

Other companies have acquired software to enable their VPP deployments. California-based startup Swell Energys GridAmp platform, which manages hundreds of megawatts’ worth of VPPs in development in California, Hawaii and New York, is built around software it acquired from startup AMS. Generac, which sells generators, batteries and smart thermostats, bought VPP software provider Enbala and is now putting its technology to use in projects in Arizona and other markets.

Still other companies provide software platforms being used by utilities and solar and battery vendors to manage VPPs. AutoGrid, the Silicon Valley startup bought by global electrical giant Schneider Electric last year, provides software that manages more than 6 gigawatts of distributed energy resources, including VPPs of thousands of homes. Alarm.com subsidiary EnergyHubs software is used by utilities across the country to control solar-charged batteries, EV chargers and smart thermostats. Startup Virtual Peaker is providing VPP software to utilities including Green Mountain Power, one of the first U.S. utilities to make solar-plus-battery systems a central part of its business strategy.

It’s hard to assess the comparative strengths and weaknesses of these different software platforms, given the widely varied settings in which they’re operating and the different tasks they’re being asked to perform. But Wright highlighted several factors that he thinks will spell the difference between success and failure as VPPs scale up.

Simply managing tens of thousands of systems can be hard for less sophisticated software platforms, he said. Gridshare is now controlling about 35,000 home batteries in its deployment with Itochu, a major Japanese trading house. Handling that many batteries requires software that can detect and diagnose any unexpected conditions” that may prevent batteries from being properly controlled, he said — and to do so in an automated fashion, so that troubleshooting problems doesn’t become an expensive and disruptive part of the process.

Performance at high speed is another necessity for successful VPP software, he said. In Hawaii, Gridshare has successfully controlled about 1,000 batteries from Tesla and LG Chem to provide fast frequency response, a type of grid service that requires batteries to charge or discharge within seconds of receiving a signal. That’s much more challenging than programming batteries to discharge at set hours, as most VPPs are operated today.

We took six-plus months to work on this,” said Lunar Energy CEO Kunal Girotra. But when the program with Hawaiian Electric went live in December, we performed all the functions with 100 percent uptime.” (It’s worth noting that both Swell and Tesla have demonstrated frequency response capability, Swell in the same Hawaiian Electric program that Sunrun is enrolled in and Tesla with Vermont utility Green Mountain Power.)

Finally, an effective VPP must be able to analyze and act on all the data that goes into optimizing the interplay of all those individual home batteries, solar systems and electricity loads to wring the most value out of their aggregated potential, Wright said. Doing that well can make a big difference, he said.

A snapshot of how to dispatch a home battery fleet the smart way

Take Lunar Energy’s test implementation for a VPP pilot project that Sunrun operates for utility Southern California Edison. For that project, Gridshare was able to squeeze about 60 percent more energy from its batteries than Sunrun had previously been sending to the grid, all while leaving enough juice in the batteries to provide backup power in case of emergencies.

Wright highlighted two key components that made this possible. First, Gridshare’s optimization engine uses weather forecasts to predict solar production and home heating and cooling electricity use — two factors that play a big role in how much juice each battery in each home will have available on an hour-to-hour basis — as well as real-time data from each home.

Without that data, Sunrun couldn’t be as certain about how much energy it would be safe to draw from each home’s battery without exceeding its backup requirements. But because we were predicting forward pretty accurately the state of charge and consumption and generation site by site, we don’t have to take that pessimistic view,” he said.

More data leads to less uncertainty and more headroom for grid services, in other words. This screenshot from Lunar Energy’s Gridshare platform shows how closely forecasts (the red line) match battery performance (the blue line) for an undisclosed VPP operated by Sunrun.

A screenshot of Lunar Energy’s GridShare software predicting the performance of a fleet of home batteries
A screenshot of Lunar Energy’s Gridshare software predicting the performance of a fleet of home batteries (Lunar Energy)

The second component that enabled Gridshare to draw more energy is its ability to use the entire fleet of batteries to best effect, Wright said. Battery inverters are more efficient when they’re discharging at close to their full capacity, rather than pumping out a fraction of their available power. That means it’s more efficient to dispatch like a relay race” — shifting commands for full output from one set of homes to another — rather than dispatching every home to provide half of its battery output in a peanut-butter-smear” method, he said.

Say that 100 homes need to deliver 250 kilowatts of battery power over the next two hours. A typical LG Resu10H battery, one of the models that Sunrun uses, has just under 10 kilowatt-hours of storage capacity and a maximum output of 5 kilowatts. Any single battery in the bunch can’t run at full power over two hours without tapping out its capacity.

But dispatching half of the batteries at full power for the first hour, and then the other half for the second hour, yields the same amount of grid power as does dispatching all the batteries to discharge at half their output capacity over the full two hours. And because of the inherent efficiency losses that come from discharging at half power, the former method saves a small, but significant, amount of electricity that would otherwise be wasted, Wright said.

This kind of fine-tuning might not be absolutely necessary for a VPP performing relatively simple tasks that don’t ask much of the participants. But it’s vital if solar-plus-battery systems are to become an integral part of how power grids are operated, he said.

It’s also vital for homeowners in places such as Hawaii and California, where the rules for what rooftop solar power is worth are changing in ways that make effective use of batteries far more important to solar economics, he said. California’s new net-metering regime, for instance, will dramatically reduce the value of solar power that homes export to the grid during most hours of the year, but it will increase the value during summer evenings when the state’s grid faces shortfalls.

That’s a transformation from a very simple model to a very complex model where the complexity and dynamism of pricing is being exposed for customers,” he said. Households becoming participants in the grid rather than passive billpayers is something we’re seeing around the world.”

Jeff St. John is director of news and special projects at Canary Media. He covers innovative grid technologies, rooftop solar and batteries, clean hydrogen, EV charging, and more.