Energy Management | May 01, 2026

Multi-Energy Building Community Energy Trading

Achieving NetZero is one of the greatest challenges of this century and it is plagued with many challenges. To reduce emissions, the energy system must be able to integrate renewable energy sources on a large scale. Renewable energy sources (RES) provide carbon-free electricity generation. However, the energy generated depends on rapidly varying weather conditions. This leads to intermittency and uncertainty, which risk grid stability. Grid stability refers to the ability of the grid to keep its operating frequency at 50Hz (in Europe) by balancing the demand and supply of electricity. The ability of the energy system to achieve balance is called flexibility. As the penetration of renewable energy increases, balancing power supply and demand becomes more challenging leading to potential blackouts.

Two great sources of flexibility can come from multi-energy systems and buildings energy consumption. By looking at the energy system as one holistic system integrated by different energy vectors such as gas, electricity, hydrogen, thermal, we can increase the amount of supply options to serve the energy demand.  If we modify the energy usage patterns of buildings, we can reduce the periods of time where the grid can become under stress and also take advantage of the times when renewable energy is abundant. Buildings account for 59% of total electricity consumption in the UK. They are also responsible for 17% of direct and 6% of indirect greenhouse gas emissions [1]. This flexibility of the load can improve the overall performance of the energy system by improving resilience and stability. Furthermore, the UK building energy systems is undergoing a transformation promoted by the UK government to make use of existing energy resources in combination with new heating systems [2]. When we look at buildings as a multi-energy system (as shown in Figure 1), we can leverage flexibility from the usage of hybrid heating systems with different fuel types (such as gas and electric). This makes studying buildings energy management a key aspect of the transition to Net Zero, offering significant potential for reducing both energy usage and carbon emissions.

However, there are still significant challenges that come from the increasing penetration of renewable energy and an energy system that transitions from treating energy vectors and sectors separately to a whole integrated system.

Building energy management systems have been extensively studied for the last few decades, but recent advances in control algorithms have brought renewed attention to this field. BEMS control strategies encompass both model-based approaches and data-driven methods, including machine learning techniques. However, the study of multi-energy buildings is only just getting started.

Although single buildings have the flexibility necessary to improve the cost of energy for individual users, the effect they can have on the balance of the grid and the capacity on a larger scale is negligible. By leveraging multiple buildings and coordinating the energy usage and resources among them, flexibility can be aggregated, reducing stress during peak times on the grid. However, if each building operates autonomously without coordination, peak demand can be shifted rather than flatten. To mitigate this, a multi-agent system can be used to coordinate energy consumption and energy sharing among buildings.


A multi-agent system represents a group of autonomous agents that interact with the environment and that have their own objectives and goals. In our case, each building represents a single agent whose individual goal is to minimise energy costs. When multiple building agents interact, a common goal can be established. In a building community, a common goal can be to reduce cost by utilising energy resources shared across the building, thus being able to use energy surplus and exploit individual flexibility by selling it to other agents locally instead of importing it from the distribution network. To illustrate this coordination, we can use the following building community in Figure 2 as an example.

Case Study: Centralised Optimisation of building community

Problem Formulation

In this case study, we explore the study of how a centralised optimisation can work to reduce the overall cost of the community without coordination across buildings. This process aims to minimise cost controlling the output of the heat pump and gas boiler, how much a BESS can charge and discharge, and how much energy needs to be imported from the grid at each time step to keep thermal comfort constraints. Showing the potential individual benefit of moving away from rule-based control. The objective function of this problem can therefore be defined as follows.

The objective function minimises the total operating cost across all buildings and time steps. It consists of three terms. The first is the electricity cost, given by the product of the time-varying electricity price λ(t), the grid import power Pgrid(b,t), and the time step duration t. The second is the gas cost, given by the gas price gas multiplied by the boiler gas consumption gboiler(b,t) and t. The third is an occupancy-weighted dead-band comfort penalty, where ω(t)∈[0,1] is the occupancy profile at time t, and are asymmetric penalty weights for cold and warm violations respectively, and Tbelow(b,t) and  Tabove(b,t)are the magnitudes by which the indoor temperature falls below the lower bound or exceeds the upper bound of the acceptable temperature band. Scaling the comfort penalty by occupancy ensures that thermal violations during unoccupied periods contribute less to the objective, allowing the optimiser to relax temperature constraints when no occupants are present and recover additional cost savings without penalising comfort where it is irrelevant.


Results

As shown in Figure 3, by optimising the battery charge and thermal output of the heating devices, the overall energy costs can be significantly reduced for each building.


However, as shown in Figure 6, while peak demand is reduced by optimisation, it must be noted that the timing of the peak gets shifted from the evening to 13-14h in most buildings. This is due to peak load reduction not being coordinated and energy sharing not being considered in this scenario.


Conclusion

In this example, we explored the benefits when multiple buildings optimise to energy costs by leveraging the different sources of flexibility within each building. While the optimisation can guarantee cheaper energy at individual level, the peak load is shifted to periods of time where electricity is cheaper.  Therefore, we can conclude that to improve renewable energy absorption and reduce peak demand, coordination in energy communities is required to avoid these peak shifts. This can be done by modifying objective the function to create a local energy market between buildings to encourage local energy usage where the building community can take sell the excess energy among themselves at a reduced cost compared to the distribution network, thus reducing both dependency and strain on the network, increasing the ability to increase renewable energy penetration.

Ada Mode is working with the University of Southampton to accelerate the decarbonisation of the grid through smart coordination of buildings energy consumption. For more information please get in touch.

References

[1] Committee on Climate Change, “Sector Summary: Buildings,” Committee on Climate Change, 2020.

[2] House of Commons Business, Energy and Industrial Strategy Committee, Energy pricing and the future of the UK Energy Market, UK Parliament Report HC 453, 2024.

Recent blog posts