A Case for Flexibility Markets Enabled by Local Peer-to-Peer Exchanges

Grid Singularity
11 min readFeb 21, 2020

The commitment made to the energy transition resulted in numerous incentive schemes, spurring growth in renewable power capacity in the European Union and globally. In 2019, the production of wind and solar energy was higher than energy produced with coal in Germany for the first time. This positive trend, however, also created a challenge in that the installed capacity of renewable energy outgrew the capacity of the distribution grid, impeding the systems operators to effectively transmit the energy to the final consumer. As a result, they have called for innovative tools to enable, “market-based activation of explicit flexibilities that are able to alter power flows.” Energy asset owners, from individual households to communities, could also use such tools for more optimal energy consumption, while contributing to wider market flexibility. If equipped with a decision-making agency, the distributed energy resources would become the medium to solve the challenge they have inadvertently created, while further enhancing the system sustainability.

This article discusses the current approaches to grid management, discerning benefits in replacing or at least complementing the traditional, centralised solutions by a distributed, bottom-up market approach. Most specifically, the proposal is to implement flexibility markets based on local peer-to-peer exchanges as a means to incentivise grid participants to actively partake in optimisation.

Current Approaches to the Energy Grid Management

Currently, congestion caused by the physical transmission limitation in the energy market is managed by satisfying the energy demand through other means, namely forced re-dispatching of energy generation. By combining the clearing schedule of the day ahead energy markets and the physical limits of the power grid, the system operators engage in power flow calculations that predict the feasibility of meeting the energy schedule. If it becomes apparent that transmission lines would become congested, the Transmission Systems Operator (TSO) will take action to balance the energy loads. The TSO may curtail excess power plant production, curtail excess renewables production, or ramp up under-utilised power plant production. These approaches facilitate an unconstrained flow of power in the energy market, allowing a single electricity market to offer a uniform energy price to all consumers regardless of location.

However, while forced re-dispatch is a relatively simple mechanism, implemented between the TSO and the power plants that have been pre-assigned to re-dispatch duty, it also results in additional costs to the grid management and the end consumer. In Germany, energy demand in the industrial south is often supplemented by northern wind power, and causes frequent north-south transmission congestion (330 days of the year in 2014). Through re-dispatch, the TSO forces a number of wind turbines to shut-off, and the conventional power plants in the south to ramp-up generation. As power plants in the south have higher marginal cost for producing energy than the wind turbine installations, the costs of energy generation increase overall. In addition, the TSO has to reimburse the affected wind turbine operators for lost earnings. Consequently, the re-dispatch costs in Germany are significant, and continue to rise, surpassing a billion euros in 2018. Since these costs are mostly absorbed by the end consumer, this is becoming an increasingly important economic and political question, even described as “the north-south divide.”

There are two main ways grid operators currently curtail grid congestion management costs:

  1. Manage Grid Capacity: Increase the grid’s energy transmission capacity where needed
  2. Coordinate Consumption: Deploy solutions to coordinate power generation and consumption more efficiently.

In Germany, the required investment in grid infrastructure expansion to solve the congestion problem solely by increasing grid capacity is an estimated 35 billion euros for 7000 km of new High Voltage Direct Current (HVDC) lines. This price tag encourages a search for a solution to congestion through coordinating consumption, such that grid expansion can be kept to a minimum.

European energy policy makers have acknowledged that assuming unconstrained power flow is not a viable approach considering the energy transmission capacity limitations. They consequently recommended implementing bidding zones, defined as “the largest geographical areas within which market participants are able to exchange energy without capacity re-allocation.” A bidding zone represents one single energy market with a uniform price for energy for all market participants. This region is thus considered copperplate; the market does not constrain power flow between the location of a buyer or seller within the region due to congestion. However, separate bidding zones lead to electricity price differences among regions, meaning further measures need to be taken to economically align disparate markets, especially if they are within a single country.

An assessment of the available capacity among bidding zones in a zonal electricity market requires a translation of physical transmission constraints, such as power loss due to transmission, into commercial transaction constraints. The most relevant market-based methods to economically account for physical transmission can be classified into two categories:

  • Implicit Auctions: the right to use the transmission cable is integrated in the price for energy for energy trade between bidding zones;
  • Explicit Auctions: the right to use the transmission cable between bidding zones is auctioned separately from the energy itself.

For both categories, capacity constraints among the bidding areas result in decoupled energy prices. The available transmission capacity among the bidding areas is determined by an algorithm. The two allocation algorithms used by TSOs in the European energy market are:

To inform these algorithms, power flow calculations are undertaken to determine a reasonable configuration of available power generation to satisfy demand. The power flow algorithms process the following inputs:

  • Grid Topology: The map of the grid infrastructure (i.e. the network of power lines, and the physical constraints on these lines).
  • Market Constraints: A set of predefined supply and demand constraints which define the fixed and flexible consumption and generation in the grid according to the predicted market schedule.

Power flow algorithms provide system operators with sophisticated configurations used to shape the energy market schedule to best reflect the actual supply and demand. Fine tuning of the market schedule is undertaken passively by encouraging additional flexibility through location-based incentives such as network tariff design, or actively by the initiation of flexibility markets that reward optimal use of flexible energy assets.

Power flow algorithms attempt to optimise energy generation and consumption according to a utility function (often cost of generation, but could also include, for instance, the welfare of consumers) while adhering to the defined constraints. Constraints include maintaining grid parameters (voltage levels, line temperatures, etc.) within the bounds of grid and market requirements. Leveraging the decision-making agency of distributed energy assets, the optimisation could be broken into sub-problems that could be solved collaboratively, using emerging methods such as the Alternating Direction Method of Multipliers.

Deploying Distributed Energy Resources for Congestion Management

In practice, due to difficulties in maintaining uniform pricing among separate bidding zones, some countries opt to operate as a single bidding zone. This is the case in Germany currently, citing “equal conditions regarding grid access, power production, and power use across the country.” Effective re-dispatch is essential to solve frequent congestion within this large bidding zone, supported by power flow calculations and market schedule predictions. However, as noted above, this solution comes with a rising cost, challenging its medium and long-term feasibility. The answer lies in engaging the increasingly numerous and complex distributed small-scale energy generation to balance market forces, as deduced by the United States Association for Energy Economics and the EU regulatory task force.

The flexibility potential of a market is the amount of supply and demand that can be increased or decreased, driven by a function aggregating the flexibility of individual energy assets in the network. An asset is considered flexible if it is able to change its energy production/consumption behaviour in reaction to an external variable. Within a market, various sources of flexibility could be installed:

  • Flexible Demand (generally known as Demand Response): energy resources or assets that can increase or decrease their energy consumption (e.g. cooling, heating, high power household applications such as. washing machines, electric vehicles, or pumps);
  • Storage: assets that can store energy for future use (e.g. batteries, electric vehicles, electrolysers, or power-to-gas-to-power); and
  • Flexible (upwards and/or downwards) Production: assets that can increase or decrease their energy production (e.g. wind turbines with controllable blade rotation or PV power control).

A flexibility market aims to unify these options to optimise usage of the energy produced by the local grid and align energy prices across connected markets. Notably, flexible edge devices such as community energy storage technologies can be programmed to optimise a utility function (e.g. price or energy efficiency) for their home area (e.g. house, community, or city), rewarding community members for valuable behaviour and decentralising capacity management. System operators benefit by leveraging the decentralised market to procure flexibility services such as re-dispatch, decreasing the cost against owning and operating flexibility resources themselves.

Investment in flexibility market-based congestion management strategies must be justified by a benefit such as a return on investment or energy affordability, whose assessment requires a high degree of accuracy in modelling and predicting the flow of energy supply and demand. Researchers, including the Florence School of Regulation (FSR), have acknowledged that this assessment commands an understanding of the behaviour of the energy grid from the discrete level of potentially hundreds of millions of balancing actors and individual energy assets to an abstraction of the grid as a whole, which can only be supplied by an exchange platform that connects the digital energy resources and enables them to act upon preset preferences.

There is a set of platforms built to model and deploy market-based approaches to congestion management that are either currently available or in development, including those discussed by the Universal Smart Energy Framework (USEF) and the Florence School of Regulation (FSR), such as Enera, developed by EPEX SPOT Local Flexibility Markets, IDCONS, developed by Electricity Trading Platform Amsterdam (ETPA), Engene, developed by NODES, GOPACS, developed by Dutch grid operators and Piclo Flex developed by Piclo. However, each of these solutions mandates system operators to host grid management services on their own operational platforms with proprietary licensing required for deployment.

As underscored by the USEF report, existing closed commercial platforms do not offer the functionality required for TSOs and DSOs to effectively acquire flexibility, referring to coordination between grid operators and end users, and open access to the market and market information. Neither do they offer full interoperability with vendor IoT solutions and implementation across different markets, or facilitate the simulation and comparative analysis of market, structural or regulatory experiments versus incumbent approaches in today’s grid, or facilitate the simulation and comparative analysis of market, structural or regulatory experiments versus incumbent approaches in today’s grid. Grid Singularity’s D3A instead espouses an open source approach to innovation, as an open, equal access platform where full peer-to-peer market functionality can be implemented, based on coordination of all market actors and integration of beneficial third party solutions, including smart hardware devices or applications that enhance the grid sophistication.

The D3A Flexibility Service

Grid Singularity’s D3A is an energy exchange engine, a software that models and simulates an energy marketplace, automatically executing trades based on programmable energy asset trading strategies and reporting key performance indicators both for individual assets and the overall grid. Developed under open source licensing, the D3A exchange can be operated in a centralised or decentralised fashion. When deployed on a decentralised blockchain-based platform, namely the Energy Web Chain, the D3A ensures that all market actors, households, distribution and transmission operators have equal access to the energy market and act transparently.

Figure 1. Grid Singularity’s D3A hierarchical market structure

The D3A uses a hierarchical market structure abstracted at various voltage levels, which can be layered over existing sections of the power grid (see Figure 1). A core use-case of the D3A is establishing markets at the community or neighbourhood level and creating and optimising the interactions of designable market networks of such communities. This leads to improved self-sufficiency and reduced energy costs, as demonstrated in a proof-of-concept implemented by Grid Singularity and a local energy community in the Netherlands, the Groene Mient, as well as in related research.

Each individual energy asset or a group of assets such as a community may be programmed in the D3A to have their own utility functions, optimisation algorithms, and information they’re able to use, driven by their owners’ goals. These strategies can be as simple as a battery only purchasing energy below a set price, or as complex as a trained reinforcement learning agent deciding to purchase and distribute energy based on current market conditions, predicted market movements, and its past experiences.

To illustrate the benefit of a flexibility market, consider an example of a congestion management simulation using the D3A. The simulation would be configured with a simple grid topology of two communities, one containing a battery and a load, and the other a battery and a solar panel (PV). Both communities are part of one bidding zone, where all offers and bids can be matched in a spot market round.

Figure 2. Schematic example of Grid Singularity’s D3A spot market and flexibility market

In the spot market round depicted in Figure 2, the Load, representing a household’s energy demand, has purchased power from the solar generation device (PV) at 8 ct/kWh. Since the transmission line connecting these devices is predicted to be congested, the system operator offers a flexibility market round for market-based re-dispatch. It buys energy from the battery storage device named Battery1 in the same community as the Load at a premium of 9 ct/kWh and sells to the battery storage device named Battery2 in the same community as the PV at a discounted rate of 7 ct/kWh. Battery1 now provides the energy for the Load locally and receives 9 ct/kWh from the DSO. The energy produced by the PV is sold to Battery2 at 7 ct/kWh. Both batteries therefore receive the benefit of 1 ct/kWh against the market rate, while the Load and the PV still pay/receive the market rate of 8 ct/kWh. The difference in the prices is covered by the system operator at a total of 2 ct/kWh. This example demonstrates how all actors in the energy market can be rewarded for partaking in distributed market optimisation.

The D3A currently offers the means to simulate energy spot market trading, and allows for direct measurement and visualisation of key performance indicators, such as self-sufficiency of communities, energy waste, and capacity utilisation, critical to assess the return on investment in the design and deployment of renewable energy assets. Effectively testing flexibility and other congestion management techniques with the D3A requires two additional mechanics currently in development:

  • Power Flow Algorithm: Implement a power flow algorithm that calculates the power flow resulting from market trade activity.
  • Incentive-Based Congestion Management Mechanisms: Implement a flexibility market as a means to manage congestion predicted after the spot market, incentivizing distributed energy assets to assist in energy re-dispatch and grid optimization. The flexibility market will operate as an active control mechanism.

Other congestion management mechanisms such as the passive control mechanism of grid fees will also be available in the D3A.


Market-based congestion management mechanisms such as flexibility markets offer solutions for the grid to adapt to the growing number of energy assets, while benefiting from a more optimal use of renewable resources. As USEF research deduced, an open, equal access platform that enables flexibility market design and deployment would offer:

  • Lower transaction costs against the increasing cost of incumbent re-dispatch grid management methods;
  • Higher liquidity as open access to the platform encourages the emergence of a market standard and a development of more sophisticated, competing trading strategies offered by third party providers; and
  • Higher transparency and accessibility, which both enhances the market fairness and stimulate more investment in demand-side flexibility by diverse flexibility providers.

Grid Singularity’s D3A platform aims to deploy flexibility markets through an open source, peer-to-peer energy exchange, providing grid operators, local energy communities and hardware vendors and integrators with the means to maximise the financial benefits of interaction with the energy grid, while contributing to environmental sustainability. Equal access to an open market and the alignment of incentives across grid participants are critical requirements to build and optimise the policies and infrastructure of our future grid, fully leverage renewable energy assets, and more effectively plan and deliver energy services.

Authored by Colin Andrews, Sarah Hambridge and Ana Trbovich.



Grid Singularity

Engineering open source software that simulates and operates grid-aware energy exchanges, creating local marketplaces that interconnect to form a smart grid