Analysis of Local Electricity Markets as a Platform to Modernise Consumer and Grid Interaction

Mukund Wadhwa’s thesis, ‘Analysis of Local Electricity Markets in Germany using Simulation’, completed in June 2020 in the scope of a Masters program in sustainable systems engineering at the University of Freiburg, explores local electricity markets using Grid Singularity’s D3A simulation tool, within the bounds of the German energy and regulatory system. This article explains the Local Electricity Market (LEM) concept and its benefits to the broader, interested public by discussing Mukund’s research results, in an interview led by Grid Singularity’s Colin Andrews.

Evaluating the Impact of Local Electricity Markets

The grid as it exists today was designed for energy to flow in one direction — from large producers to final consumers like you and me. Local electricity markets (LEMs) empower the consumer to take control of their energy footprint, allowing the exchange of locally produced energy among members of a community, improving community self-sufficiency (share of locally procured energy) and reducing energy bills.

Without LEMs, surplus energy produced by a solar panel (PV) on a rooftop is sent back to the grid, and the producer receives a relatively small fixed feed-in tariff (financial reward for providing excess energy) based on multiple year contracts with a single energy retailer. Switching electricity providers can be a hassle, taking significant time and effort for the consumer relative to any potential cost savings, and therefore doesn’t happen often. This makes it difficult for consumer choice to reflect price and energy preferences, for example by choosing an energy retailer that uses a higher mix of renewable sources.

Local energy markets can be designed to grant consumers the choice of the source and price of their electricity. In such a marketplace, prosumers (energy consumers who also produce some electricity) can buy and sell energy in an open marketplace, where their neighbours, nearby communities, and the energy retailer compete to provide and consume energy at a market price. To illustrate this open marketplace, Mukund asks us to imagine a community of ten houses, four of which have rooftop PVs. Under the current grid structure, each house buys electricity from the energy retailer at a fixed price (30 EURcents per kWh) and the prosumers would sell their excess generation to the grid at a fixed feed-in tariff (12 EURcents per kWh). With a LEM, prosumers have the ability to sell that excess generation to their neighbours at a price higher than the fixed feed-in tariff but lower than the energy retailer rate (for example, 18 EURcents per kWh). Ultimately, prosumers receive more value for the energy they produce, and local consumers receive energy at a price lower than the energy retailer’s rate, reducing the energy bill for both parties, even generating additional revenue for the prosumer.

Energy retailers and grid operators also stand to benefit from LEMs. The introduction of distributed energy resources (DERs) like solar panels and electric vehicles has introduced complexity to grid management. Energy retailers and grid operators rely on standard load profiles to model home energy usage and estimate the amount of energy required to supply and balance the grid. The less predictable generation of home solar panels, demand of electric vehicles and needs of other DERs can cause wild swings in demand, from a high demand at night when there is no natural light, to a negative demand during the day when there is excess production from solar. This can require energy retailers to ramp up or down production of energy quickly to balance supply to demand, or grid operators to invest in grid infrastructure such as extra transmission line capacity, just to meet the higher usage peaks. LEMs help to solve this problem for energy retailers and other grid management entities by offering flexibility services and the opportunity for new business models. Excess production that would cause a negative peak in the grid can instead fulfil local demand first, smoothing the grid demand curve and reducing the need to adjust production (operational costs) or invest in grid infrastructure (capital costs).

Mukund’s research focuses on evaluating different structures of LEMs and the factors that influence the success of individual market participants and the electricity market as a whole. As Mukund explains:

“Variables such as the production and consumption ratio, the trading strategies of market participants, and various pricing and regulatory scenarios can impact the effectiveness of local electricity markets. By incorporating these factors, you can create markets which are highly efficient and fair for all the participants.”

A major variable that Mukund considered is how LEMs can scale and connect to the broader grid, by prioritising self-sufficiency and relying on their grid connectedness for any mismatch in supply and demand. There have been many pilot projects with isolated LEMs to prove their value to the community, but limited studies of the impact of LEMs connected with the broader grid due to regulatory hurdles and the cost of setting up large live experiments. It is important to understand how LEMs and the grid may interact in various scenarios, and sophisticated simulations are therefore a valuable tool. Established markets must adapt to added production, such as the installation of a nearby solar farm, or changes to demand patterns, such as newly built residences. It is highly valuable for grid and market operators to know ahead what would be the most effective approach to adapt an individual market in the broader grid structure.

While existing regulations were not designed to cultivate LEMs, the European Union (EU) has recently laid the legal foundations for the development of the community energy model. To inform the individual EU member implementation of these EU directives, it is necessary to understand how LEMs function in different scenarios. The limitation of many current pilot experiments is that they consider almost exclusively the interaction of residential houses in LEMs, when in reality small businesses, manufacturing facilities, and other diverse actors will ultimately play roles in the energy compositions of different types of communities. “It is necessary to consider the diverse compositions of LEMs and how they interact with one another to understand the impact on the energy grid,” underscored Mukund. Moreover, the pilot projects need to be analysed in terms of how they impact the neighbouring communities and the wider grid, with learnings collected and compared across different regulatory experiments.

Simulating Local Electricity Markets

To analyse the complex interactions of various configurations of production and consumption profiles of different types of energy communities, Mukund uses Grid Singularity’s D3A to design, simulate, and analyse various configurations of local electricity markets. For highly configurable simulations, Mukund deploys Grid Singularity’s open source backend codebase where he configures the hierarchical structure of the grid, the physical properties of the distributed energy resources such as the energy storage potential of batteries, the parameters of the market mechanism, and uploads custom load and generation profiles generated for each device based on the specifications of the experiment he is conducting.

Once the simulation is configured, one year of the exchange of energy among different energy resources, storages and household demand is simulated in a few hours of runtime. Each device issues bids or offers to the market based on the selected trading strategy, in an attempt to buy or sell the energy they require at the best price. When a bid from a consumer and an offer from a producer match, the trade is cleared and the energy transferred (for more on market mechanics, see D3A’s Wiki). All trade details and market interactions are stored as a dataset to aid analysis.

A core part of Mukund’s research is to evaluate how different trading strategies affect the market performance metrics. The template trading strategy of devices in the D3A are designed as proof of concepts and do not take into account the history or predicted future state of the market, which could be used to further inform an intelligent trading strategy. In the basic template strategies, loads try to buy at a very low price, then ramp up slowly to the energy retailer’s rate before the end of the trading slot. Producing devices try to sell high, then slowly reduce their price. When prices match, trades execute. Although this strategy does reduce the cost of electricity for the community as a whole, it is not as effective as intelligent strategies.

Mukund has implemented intelligent strategies that use the reinforcement learning method of Q-learning to predict the price of electricity and intelligently inject bids or offers into the market. These strategies take as input information about the market such as the last clearing prices, the amount of energy that has been traded, and the specific parameters of the device, and are able to learn over time how these different variables interact and influence the price of electricity. Using what it learns from its experience, the intelligent strategy can predict the price of electricity based on different combinations of these variables. The strategy then creates bids and offers in the market based on these predictions.

The implemented trading strategies are trained on many iterations of different simulation configurations, enabling enhanced adaptation to different grid and market conditions. They can also be trained to optimise for different outcomes. For example, one strategy may try to minimise a community’s energy bill, and purely consider cost in its decision making. Another may represent a community which prefers to buy green electricity, with less focus on reduction of cost. This agent would trade in a way that maximises a community’s self-sufficiency from the grid or that maximises the use of renewable sources, rather than at the cheapest price of electricity. There are trade-offs among these different approaches which must be considered as the varied energy consumption preferences of consumers are expressed in the market.

Measuring Performance of Local Electricity Markets

Mukund’s thesis studies a varied set of local electricity market configurations and levels of interaction with the grid. The results presented in this section are a representative subset of his broader findings, based on an analysis of a community with a mix of residential and commercial buildings, representing a diverse set of energy consumption profiles generated using the Renewables Ninja tool. Other classes of communities are considered in his thesis, and are intentionally designed to test different LEM aspects. Mukund deduces:

“Simulation results show that LEM performance is highly dependent on market design factors. The level of savings or revenue accrued by participants also changes significantly as market design factors evolve.”

To focus experimental outcomes, Mukund set boundary conditions for the LEMs modelled in his thesis, as follows:

  • A single LEM is modelled at a time. The only external LEM trading party is the retailer.

Community Energy Bill

The outcomes of Mukund’s research are quantified by using several performance metrics. A traditional performance indicator that is examined in Mukund’s research is the impact of LEMs on community members’ energy bills. As shown in Figure 1, the average buying rate in a community under current regulatory niches that allow the formation of operationally limited LEMs (‘Current Day Scenario’) is approximately 25 EURcents per kWh. The introduction of LEMs (‘Post EEG Scenario’ reflects the change in German legislation that enables open market LEMs while reducing subsidies to renewables, such as eliminating the 12 EURcents per kWh feed-in tariff for PVs) reduces the average buying rate over the one year period to between 16 and 18 EURcents. As more local production is introduced (along the x-axis), causing more competition to supply energy, there is a corresponding reduction in the electricity price.

Image for post
Image for post
Figure 1. Average buying rate reduction with the introduction of open market LEMs (“Post-EEG Scenario” in yellow) vs. the current regulatory scenario (in red). Blue sections indicate different tiers of production.

Community Self-Sufficiency

Although cost is a core metric, Mukund’s research also examines broader impact, such as self-sufficiency. Self-sufficiency is defined as the percentage of the community’s total energy need that is supplied by participants in the community instead of being imported from the broader grid. As seen in Figure 2, self-sufficiency increases with diminishing returns to a threshold level as a function of the amount of production vs. consumption in the community. To break past this threshold, storage devices or production other than solar would need to be introduced, as solar can only provide energy directly during the day. There is little difference in the ‘Current Day’ vs. ‘Post EEG’ scenarios because only a single grid-connected LEM is modelled in Mukund’s research, instead of modelling trade among multiple grid-connected LEMs which would likely show a more significant variation.

Image for post
Image for post
Figure 2. Self-sufficiency increase due to the increase of the production to consumption ratio

Community Social Welfare

The social welfare of a community is also considered. Mukund’s thesis defines social welfare as, “the share of savings or profits made by participating in the LEM, compared to the status quo,” calculated by dividing the savings by the total cost of energy in the base case. If some prosumers are strongly benefiting while others in the community receive very limited benefit, the social welfare can be considered to be low. However, if the benefit is more evenly distributed in the community, the social welfare would be considered to be higher. Figure 3 shows how social welfare increases for consumers as production is introduced to a community. As shown, consumers benefit most when open market LEMs are enabled (‘Post EEG Scenario’) and local generation can be sold and distributed in the community. The downwards ramp of social welfare for prosumers in each blue section indicates that the number of consumers and amount of production must be balanced in order for prosumers to receive benefit. This incentivises the optimisation of production instead of over-producing.

Image for post
Image for post
Figure 3. Social welfare increase due to the increase of the production to consumption ratio. Production must be balanced for prosumers to receive a benefit.

Intelligent Trading Agents

Mukund’s research also compares strategies with varying levels of intelligence, from intentionally suboptimal strategies that bid or offer completely at random (‘zero intelligence’) to attuned reinforcement learning strategies using Q-learning. This range of experimentation allows select key performance indicators to be compared in different LEM configurations. Figure 4 compares LEMs that use the reinforcement learning technique Q-learning (‘intelligent bidding’) to zero intelligence trading strategies. As shown, intelligent bidding can significantly reduce the average cost of electricity in the community, especially when open market LEMs are fully enabled (‘post-EEG’) and the production to consumption ratio (PtC) is high. Further research is required to expand upon the potential upside of intelligent agents, including what may happen with different agents with competing incentives (e.g. minimise energy bill vs. maximise community self-sufficiency) interact in the market.

Image for post
Image for post
Image for post
Image for post
Figure 4. The impact of intelligent trading strategies on the average buying rate

Taking Into Account Human Behaviour

By simulating and evaluating a diverse range of market designs, trading strategies, and grid hierarchies, we can better predict what would happen in a real-world deployment. However, other factors should also be taken into account, namely human behaviour. Non-ergodic changes in how people use electricity can significantly change the performance of LEMs, for example the trend of working from home emerging from the COVID-19 pandemic.

Mukund acknowledges that, “perfect predictions are not possible; there is a possibility that you have deviations from predicted behaviour which cannot be completely avoided”. However, they can be taken into account in market mechanism design. For example, small deviations in consumed vs. purchased demand in the 15-minute ahead market slots can be traded in a post-market slot balancing market, which allows the small deviations in either direction of different devices to balance each other out, rewarding those who participate in the balancing of the grid. These mechanisms must be designed and governed in a way that allows them to be transparent and adapt to the changing needs of the energy grid and its participants. To reach that functionality, local electricity market mechanism design and governance, as Mukund indicates, could benefit from blockchain technology. In addition to tracking and validating the source and exchange of energy among parties, governance systems can be implemented through the blockchain’s consensus mechanisms, granting community members a more distinct voice in how they organise their energy communities in relation to the broader grid.

From Simulation to Real-World Deployment

Mukund’s research has demonstrated that a local electricity market with appropriately balanced generation and consumption, optimised in experimental configurations, can significantly reduce cost, increase self-sufficiency, and improve social welfare of LEM participants. It also underscored the need for the balancing of production capability vs. demand and proper storage capabilities, which require further research to optimise for the varied energy requirements of different types of communities. Finally, Mukund’s research shows that the introduction of intelligent trading strategies can improve upon these metrics.

Mukund’s thesis outcomes answer several specific questions about LEMs, such as which market configurations are viable in various circumstances, how intelligent agents affect the performance of LEMs, and which metrics (such as self-sufficiency and social welfare) can be used to measure the effectiveness of different approaches. His study is part of C/sells, a larger project which intends to offer solutions towards a sustainable energy supply. Other members of C/sells consortium such as OLI Systems are conducting related research, such as evaluating the bidirectional trading between regional markets and LEMs, improving energy supply and demand predictions, evaluating the benefits of blockchain in the energy space and modifying the flow of power using dynamic grid tariffs to ease grid congestion.

To make fully connected energy communities a reality, further research is required to determine the regulatory and functional configurations for optimal operations and grid interaction. Hardware and software tools also need to adapt to better respond to the evolving demands of researchers and operational energy communities. Most poignantly, building upon the learnings from simulating a single community in isolation, the research focus should be placed on the interplay among different communities with different goals and scales of operation. After understanding the performance of a single intelligent trading algorithm, the impact to grid, financial, and social metrics should be evaluated for the chaotic input of multiple intelligent algorithms with competing incentives, as would occur in an operational energy market. In addition to artificial intelligence, other technologies such as blockchain should also be researched and developed to optimise energy exchange.

Effective market redesign requires clear and directed information and recommendations from experimental knowledge, as any new frameworks, rules, or regulations will govern how these energy communities function. The information gained from simulation experiments based on real market data can inform the expected regulatory changes, reduce the risk and costs of pilot deployment projects, and expedite a wider rollout of integrated local energy markets and their financial and social benefits.

Written by

Engineering d3a.io, open source software that simulates and operates custom energy exchanges, creating local marketplaces that interconnect to form a smart grid

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store