In homes, the cost of electricity can vary by time of day. In buildings with renewable energy, it also matters whether surplus power is stored or shared with a nearby building. A research team at the University of Málaga has designed an algorithm to coordinate energy management a day in advance for smart buildings, shared self-consumption communities and urban electricity networks. It calculates when it may be best to use, store, buy or sell electricity, with the aim of reducing costs and making better use of available renewable energy.

The researchers report that combining these resources improves energy management compared with conventional scenarios in which buildings have no renewable generation, storage or intelligent control systems. For example, the system could schedule one building to charge its batteries during a solar surplus, another to use that electricity during a period of higher demand, or an electric vehicle to return some stored electricity when appropriate.

ADVERTISEMENTIn-article placement

The proposed system coordinates three levels: smart buildings equipped with sensors and control systems; energy communities that bring together buildings able to share resources; and the distribution network that carries electricity from the main grid to consumers. The researchers say that most studies focus on just one level, while their approach considers all three together.

In simulations, adding photovoltaic generation reduced buildings’ operating costs by about 29% compared with a system without photovoltaic generation or batteries. Including factors such as heating and hot water raised the reported savings to as much as 45.65%. Using electric vehicles as an energy resource provided a further reduction of 8.59%.

The tool is intended for smart-building managers, energy-community coordinators and distribution network operators. It can schedule electricity use, battery charging and discharging, and the sharing of solar surpluses between buildings; coordinate electric vehicles as a source of stored energy; and help reduce purchases during the most expensive hours. Participants could coordinate their decisions without sharing all of their internal data.

The model also accounts for uncertainty, including possible changes in demand, electricity prices and renewable generation. It uses real historical data on electricity consumption, prices and renewable output to build representative scenarios, such as days with low solar production, high prices or greater demand, and produce a schedule for the following day. University of Málaga researcher Sebastián Martín said that the exact values for consumption, prices and renewable production are not known until the system is operating. Researcher Mohammad Nasir said the model can help network operators plan the grid’s operation for the next day.

The findings were published in *Sustainable Energy, Grids and Networks*. The University of Málaga’s Electrical Energy Systems group says its next steps include studying hydrogen systems, new forms of storage and artificial intelligence techniques.