Consider the electric grid. It blankets most of the world. Its existence and reliability have defined the modern world for far longer than most of us have been alive. We owe most, if not all, of a century’s worth of new technology to the grid.

The grid can only operate today thanks to millions of sophisticated, interconnected devices working together in complex patterns. Yet it is built for centralized generation with minimal points of control, and it relies on fossil fuels—concepts that are all rooted in the 20th century.

What would the electric grid look like if it were redesigned today from the ground up? That’s a question that Tesla engineers Colin Breck and Percy Link recently tackled. Their answer involves building immense resiliency through open source technologies and digital twins. They shared their insights at a recent conference in the U.K.

As more renewable energy comes online in the existing grid, the complex calculations of supply and demand become more difficult to make with the required precision. A degree of control is lost, and generation becomes more difficult to forecast.

In places where wind and solar power is already common, batteries have helped mitigate these issues. They can respond very quickly to unexpected usage peaks and valleys, charging and discharging as necessary.

“This rapid response is actually even an innovation, an opportunity to be better than the old grid,” Link says. “It’s not just a compromise.”

Batteries are key to these engineers’ re-imagining of the grid. In addition to creating giant batteries the size of existing coal or natural gas plants, they also proposed harnessing the power of smaller batteries installed in homes and businesses—batteries more typically used in service of private solar generation or backup power.

“We can aggregate homes and businesses with these smaller batteries and solar into virtual power plants,” Link says.

Virtual power plant (VPP) architecture relies on distributed energy resources — batteries would be one example, but wind and solar are frequently used as well. A network of these resources pools together to generate power with increased flexibility and higher availability.

In Tesla’s virtual power plant, digital twin models represent various Internet of Things (IoT) assets in the system, as well as their current states and relationships. The digital twin modeling software relies on two key open source projects: Kubernetes and Akka.

“The pairing of Akka and Kubernetes is really fantastic,” Breck says. “Kubernetes can handle coarse-grained failures and scaling, so that would be things like scaling pods up or down, running liveness probes, or restarting a failed pod with an exponential back off. Then we use Akka for handling fine-grained failures like circuit breaking or retrying an individual request and modeling the state of individual entities, like the fact that a battery is charging or discharging.”

When modeling a digital twin in Akka, each modeling site is represented by an actor. As TechRepublic explains, “The programmer worries about modeling an individual site in an actor, and then the Akka runtime handles scaling this to thousands or millions of sites. It’s a very powerful abstraction for IoT in particular, essentially removing the worry about threads, or locks, or concurrency bugs.”

Through digital twin models, an engineer can interact with near real-time representations of extremely complex relationships and states within systems, even when the complete picture isn’t available.

Uncertainty is inherent in distributed IoT systems, so we need to just embrace this in the data model, in the business logic, and even in the customer experience, rather than trying to escape it,” Breck says. “Representing physical and virtual relationships among IoT devices, especially as they change over time, is the hardest problem in IoT, trust me, but essential for creating a great product.”

Co-optimizing local and global objectives was another challenge. Smaller batteries owned by individuals shouldn’t deplete themselves, in case the owner needs to use them unexpectedly, but the real-time balancing needs of the grid must always be met.

“Distributed optimization is only possible because Tesla builds its own hardware and has full control over firmware and software,” Link says. “This enables quick iteration across the local and central intelligence and how they relate to each other, and this collaboration is cross-team rather than cross-company.” Vertical integration of hardware, firmware, and software laid the framework for a more resilient solution with a distributed algorithm to help devices act reasonably during inevitable communication failures.

#iot #iiot #tesla #power and energy

Tesla's Virtual Power Plant: Re-Envisioning the Electric Grid
1.10 GEEK