Deploying Local Electricity Markets to Optimise PV Integration; A Study of Three LEM Scenarios in Germany

This article describes the main results of a University of Freiburg master thesis, which deployed Grid Singularity’s D3A software to prove the hypothesis that Local Electricity Markets (LEMs) bring economic benefits to individuals in energy communities, while lowering dependence on the wholesale market, reducing grid transmissions and balancing local consumption and generation.

Two different market mechanisms, namely Pay-as-Bid and Pay-as-Clear, are discussed and compared with respect to the self-consumption, traded energy and net electricity costs of the community in producer-centred and prosumer-centred LEMs. Three use case scenarios are simulated, based on the C/sells project to integrate and optimise different photovoltaic (PV) systems in LEMs and data provided by OLI Systems GmbH.

The Context

LEMs are trading platforms where electricity is sold and purchased by market participants based on the espoused market matching and pricing mechanisms. Local Energy Community (LEC) members exchange locally generated electricity among each other, often at a more favourable price than when purchasing from the utility. This only happens if LEMs have Peer-to-Peer (P2P), community-based structures where all LEC members cooperate with each other to benefit from locally generated energy. In order to provide a successful P2P energy trading system, LEM implementation requires innovative and secure information and communication technology. Notably, blockchain, as a distributed, digital transaction technology would provide automated, transparent ordering of collected trades and market clearance based on the established market matching mechanism.

Local markets may be designed by using two main market matching mechanisms: Pay-as-Clear (also called market clearing pricing) and Pay-as-Bid. In the Pay-as-Clear mechanism, all bids and offers are collected and the clearing price is computed based on a formula. At discrete market closing time slot t (15-minute time slot), each bid and offer received is sent to the market, cleared at the end of t, and energy is delivered in the next time slot t+1. The clearing mechanism is operated by a double auction, which results in a single uniform clearing price to be paid by consumers and received by the prosumers/producers for the traded electricity in each time slot. In contrast, the Pay-as-Bid market mechanism matches interconnected LEC bids and offers as soon as possible within the market slot, directly with each other. Each consumer order is paired with a prosumer/producer order iteratively until the consumer electricity need is met according to its bid, or until each prosumer/producer sells according to its ask. The market pairing continues until a consumer’s bid price is greater than or equal to a prosumer’s/producer’s offer price. Randomised consumer and prosumer/producer pairing may result in different individual prices for each trade since the Pay-as-Bid trade involves one-to-one transactions based on Pay-as-Bid pricing. If the pricing preferences are not satisfied, the unmatched demand would be procured from the wholesale market at the grid’s market maker electricity price for both market mechanisms.

The two energy trading market mechanisms can be selected in the Grid Singularity’s D3A software to digitally configure, simulate and eventually deploy scalable LEMs in different use case scenarios. The consumer bids and the prosumer/producer’s offers are represented by respective digital trading agents, which trade according to a configurable strategy within the pre-set market price boundaries.

LEM Configuration Scenarios

In this study, three use case scenarios are based on the C\sells project in Southern Germany, representing PV system integrations into the grid/market for diverse community structures, with different sizes and types of market actors but with PV representing the only source of energy generation within the community. Each LEC member in the select communities is connected to the same distribution network which is connected to a transmission line in order to either generate or consume electricity and partake in local electricity trading.

Since there was no available data from the C\sells project at the time of the study, the conducted one day simulations using Grid Singularity’s D3A software relied on residential load and PV profiles provided by OLI Systems (measurements taken on a slightly cloudy day), while the commercial load profile was taken from the standard load profile G1, corresponding to general commercial entities on a working day from 8 am to 6 pm.

Since electricity is traded within the community at the local level, the Customer System (German abbr.: Kundenanlage) can be employed in favour of the LEC members, reducing transaction prices due to exemptions for network and network-related fees. Pursuant to §12b Electricity Tax Act, an additional electricity tax exemption is applied for generating plants with a nominal electrical output of up to 2MW in the Customer System. Therefore, in Scenarios I and III, each commercial and residential prosumer and consumer is only charged with the renewable surcharge, metering fees, and value-added tax. In Scenario II, which includes a large producer, a concession fee, and the network and network-related fees are also included in the total electricity price.

The total sum of feed-in tariff, taxes and fees forms the lower boundaries of LEM in a set scenario (18.61, 25.19 and 23.09 cent/kWh, respectively), while the gross electricity price of 29.18 cent/kWh (the market maker rate) is assumed as the upper boundary for all.

Scenario I: PV Systems on Commercial Buildings

This scenario focuses on the market/grid integration of rooftop PV systems for commercial prosumers. The aim is primarily to meet the electricity needs of commercial properties, and then participate in LEM trading to sell the surplus electricity to community members. Any remaining community surplus is then sold to the wholesale market, which also covers any electricity shortage in the community. The use case scenario features 3 commercial prosumers and 12 residential consumers.

Fig. 1 shows the simulation results for the average overall and local electricity prices based on the Pay-as-Bid and Pay-as-Clear market mechanisms. The average local electricity price represents the mean price of the community members’ transactions without considering wholesale market interactions. The average overall electricity price represents the mean price of the transactions between the community members and the wholesale market in addition to the average local electricity price, including excess energy sold from the community to the broader grid. All transaction prices remain in the range of 18.61 and 29.18 cent/kWh market limits. At midday when the PV generation is the highest, transactions are made at the lowest prices. The changes in the overall price may occur due to low electricity generation or a high demand within the community.

Fig. 2 shows the profiles of the traded energy in LEM and the traded energy within the community during the day for the Pay-as-Bid market mechanism. The energy profile in LEM consists of the overall traded energy between the community and the wholesale market. The traded energy profile within the community includes each community member’s electricity profile. The positive and negative traded energy represent the purchased and the sold energy, respectively.

Electricity trading occurs when PV systems are able to generate, between 06:15 to 18:45. From 12:15 to 16:00, there is surplus electricity that can be sold to the grid at the price of 18.61 cent/kWh. At 12:00, the community has the highest peak energy consumption of 22.58 kWh and the majority, 17.64 kWh, is met by the local commercial prosumers while the rest is purchased from the grid at the price of 29.18 cent/kWh.

As shown in Table 2, the community sold 59.6 kWh of locally generated 469.8 kWh to the wholesale market through the Pay-as-Bid market mechanism (12.7%) and 48.3 kWh of 409.3 kWh (11.8%) through the Pay-as-Clear mechanism. Hence, the community consumed 410.2 kWh by using the Pay-as-Bid market mechanism and 361 kWh for the Pay-as-Clear mechanism which is the amount of local use of PV energy.

The community self-consumption, which indicates the amount of locally generated electricity that is either directly consumed by prosumers or traded locally among community members, is hence slightly higher when applying the Pay-as-Clear mechanism.

Importantly, all commercial prosumers and residential consumers are shown to profit from participating in the LEM, regardless of the applied trading mechanism. The cost of the one-day energy bill for the community in the LEM is €135.7 using the Pay-as-Bid market mechanism and €134.6 using the Pay-as-Clear market mechanism, compared to the cost of €155.1 if the community were not participating in the LEM.

Scenario II: Open-Area PV Installations

In this scenario, large-scale PV producers are connected at the transmission level and able to feed their surplus electricity into the distribution level of the grid network for the residential consumers to purchase. It is assumed that 2 MWp power capacity generated by an open-area PV system is dedicated to industrial and commercial firms according to the renewable power purchasing agreements (PPAs). Any surplus electricity over the PPA fixed volume is traded with up to 13 residential consumers. Fig. 3 shows the amount of power generated by the producer, the agreed fixed delivery power sold via PPA and the remaining power sold by the LEM.

Fig. 4 depicts the simulation results where all transaction prices drop at midday for the same reason discussed in Scenario I. However, there is a more limited energy volume available for trading. Between 12:15 and 14:15 is the only period when consumers can buy electricity from the local producer. Outside this period, they purchase electricity from the wholesale market through the aggregator at the price of 29.18 cent\kWh using both market mechanisms.

Table 3 shows the same results for both market mechanisms in Scenario II, where there are no prosumers and the community is highly dependent on the duration and the amount of supplied electricity by the single producer. Yet even with this limitation, LEM participation brings some benefits to the community.

Scenario III: Residential Buildings with PV systems

The third scenario considers integration of PV systems on residential buildings into the LEM and relies on small-scale consumers and prosumers connected to the same distribution network on the public grid. Energy trading is simulated for the LEM consisting of 7 residential prosumers and 8 residential consumers. All transactions are occurring within 23.09 to 29.18 cent/kWh price range for both market mechanisms as shown in Fig. 6.

Fig.7 shows that a significant part of the energy demand is covered by prosumers during midday, as expected, due to high PV generation, like in previous scenarios.

Table 4 shows that the community self-consumed 102 kWh by using Pay-as-Bid market mechanism (81.8%), feeding 18.2% of the surplus electricity into the wholesale market. Using the Pay-as-Clear market mechanism, the community self-consumed 53.7 kWh (82.1%), selling 17.9% of the locally generated PV energy to the wholesale market.

In Scenario III, electricity prices are similar in the two LEM trading mechanisms and hence the difference in the community’s energy bill is also very small. Nonetheless, the Pay-as-Clear mechanism leads to increased community self-consumption as in Scenario I. The self-consumption and the cost of energy bill are both improved with LEM regardless of the applied market mechanism.


The study of three diverse energy communities in Germany demonstrated that all community members, be it consumers, prosumers or producers, strongly benefit from actively participating in local electricity markets. The local electricity market efficiency further depends on the individual demand and on the available energy generation by producers and prosumers within the community.

When comparing two main market matching mechanisms, deploying the Pay-as-Clear mechanism for local trading is shown in this study to be slightly more favourable than the Pay-as-Bid mechanism since it resulted in lower electricity prices and higher community self-consumption. Nevertheless, as the analysis of the impact of smart trading strategies lay beyond the scope of this study, this specific conclusion may be reviewed. Importantly, any future research and development of intelligent digital trading agents, improved by learning algorithms, would only further corroborate the significance of local electricity markets for energy market system efficiency.

Authored by Sanem Yagmur Kement.

Written by

Engineering, 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