Local Markets for Flexibility Trading: Key Stages and Enablers

: The European energy transition is leading to a transformed electricity system, where Distributed Energy Resources (DERs) will play a substantial role. Renewable Energy Sources (RES) will challenge the key operational obligation of real-time balancing and the need for ﬂexibility will consequently increase. The introduction of a local ﬂexibility market (LFM) would allow the trading of ﬂexibility supplied by both producing and consuming units at the distribution level, providing market access to DERs, a support tool for Distribution System Operators (DSOs) and a value stream for energy suppliers. Aggregators and DSOs for different reasons can enhance the valuation of ﬂexible DERs. Several research papers have assumed aggregators fully interacting with the electricity markets and DSOs contracting services with power system actors. These interactions are still not allowed in many European countries. This article aims to analyze the European regulation to identify the most important enablers and pave the way towards the full exploitation of DER ﬂexibility, culminating in the establishment of an LFM. Therefore, three main stages, emerging from the progressive withdrawal of the current regulatory and market barriers, are identiﬁed: (1) enabling the aggregator’s trading, (2) evolution of the DSO’s role, and (3) key-design challenges of an LFM.


Introduction
The currently undergoing transformation of the electrical power system has the integration of renewable energy sources (RES) as one of its main pillars. The traditional, centralized way of producing and managing electrical power is being substituted by a decentralized manner with increased contribution from local resources. This will pose new challenges in keeping the real-time balance between electricity demand and supply while efficiently operating the entire system. RES, in particular, photovoltaics (PV) and wind power, are intermittent, and the difficulty of predicting their power production increases the need for system flexibility [1,2]. Currently, the Transmission System Operator (TSO) is responsible for the system balance, and this can be ensured by procuring reserve from the generation-side resources. While causing an increased need for flexibility, RES production also has dispatch priority and it is slowly pushing the fossil fuel-fired power plants out of the market, thus limiting one of the main sources of flexibility. This is the reason why, nowadays, more and more conventional power-plants are struggling to keep their market share and gain profit [3,4].
Other energy sectors are looking at electrification as the solution to energy transition, with electric vehicles from the transport sector and heat pumps from the heating and cooling sector being the most evident examples. Worldwide, the number of countries that have established renewable-related policies regarding the power sector is way higher than the other two aforementioned energy sectors [5], meaning that the main responsibility is with the power system itself. As a result, the integration of Distributed Energy Resources in the distribution network (DN) will be at the core of the shift from traditional to smart electricity networks. This includes Electric Vehicles (EVs), Dispatchable Loads Distributed Energy Resources (DERs) are shaping the future of the distribution network (DN), which was not originally designed to host a significant level of local generation, and Distribution System Operators (DSOs) need to reconsider the DN's operations and planning in the presence of distributed generation [6]. The traditional 'fit and forget' approach based on the expected long-term peak load will no longer be suitable, because the installation rate of distributed resources is growing substantially [7]. DERs are raising challenges from the operational point of view by introducing reverse flow, congestion problems, and voltage limit violations. DSOs are used to passively operate, maintain, and upgrade the DN based on a fixed remuneration set yearly by the regulator. The on-going discussion at the European level is focused on the modification of DSO's business model towards the role of an active manager of the grid, since both in the short-term planning and in the real-time phase, it will deal with the dynamics of renewable production and with the increased coincidence factor due to DERs. All these resources are also, in fact, capable of modifying their production or consumption pattern upon request (direct or indirect control) by the owner/energy supplier/network operator. This capability can be exploited to provide a flexibility service to different parties. Therefore, beside increasing technical problems, DERs can also offer a potential solution throughout their inherent controllability. The DSO should be enabled to use the potential benefits deriving from flexibility existing within the distribution network.
The flexibility potential offered by DERs is considerable [8], and it is suitable for tackling location-dependent problems (such as congestions) but also, if properly aggregated, for supporting the traditional flexibility sources at the transmission level. Its exploitation is currently limited for two reasons. Firstly, the flexibility of DERs cannot be used due to a lack of Information and Communication Technology (ICT) infrastructure and regulatory framework; secondly, the majority of the flexibility is disaggregated as it belongs to small and medium-sized customers and consequently it is unable to access the market.
In this context, the aggregator is emerging as a new figure: an energy utility taking care of directly or indirectly managing and operating the flexibility of DERs for small and medium-size prosumers which are otherwise disaggregated. The aggregators can potentially bridge the gap between the electricity markets and small-scale DERs. Consumers transform from passive grid users to active providers of various energy services to the grid, both consuming and producing on-site energy-becoming prosumers. Prosumers will potentially be able to interact in the energy markets and compete directly with traditional energy utilities [9] or indirectly through aggregators.
The European Commission, within the new proposal for a directive on common rules on the internal energy market released in November 2016 (part of the so-called "Clean Energy for All" package), underlines the importance of distribution-level flexibility and introduces new definitions of related concepts such as 'demand response', 'independent aggregator', 'active customer', and 'dynamic electricity price contracts'. When both wholesale and reserve markets were designed, product requirements and arrangements of access were tailored around the capabilities of traditional generating units. The system operators relied on the supply-side flexibility and there was no interest in procuring flexibility from the demand-side or from distributed resources. In the recent years, European institutions and policymakers have brought attention to this new unexploited flexibility potential alongside the willingness to move the electricity markets closer to the final user, resulting in a growing interest towards local markets [10][11][12]. In local energy markets, prosumers can (directly or via aggregators) gain more benefit from valuing their resources by offering energy or flexibility services at the local level.
The introduction of a local flexibility market (LFM) with the aim of trading flexibility supplied by both producing and consuming units would provide market access to DERs and would provide a support tool to allow DSOs to handle technical problems. Potentially, energy suppliers also could be enabled to participate in the process of adjusting their market imbalances, but the coexistence of market players and grid operators pursuing flexibility for different purposes is a key discussion point.
This article aims to define a pathway for reaching the appropriate regulatory context in which LFM could be integrated and thus enabling full exploitation of distribution level flexibility from different stakeholders. In particular, we focus on aggregators which are currently not regulated in most of the European countries and on the evolution of DSOs towards a more active role in managing the distribution grid.
The contribution of the paper is threefold: 1. Identification of three main stages to gradually enable the flexibility of DERs for full exploitation, eventually through the establishment of LFM; 2. Identification of the main stakeholders (aggregators and DSOs) of the small-scale flexibility and definitions of market and regulatory barriers to overcome for each of them. 3. Discussion of key challenges of the LFM design including the coupling of grid and market-service and the coordination with overlaying markets.
Section 2 introduces the definition and main characteristics of the flexibility concept focusing on DERs' service provision. Section 3 elaborates on the following three main stages, which will gradually enable the full-exploitation of flexibility at the distribution level, leading to the establishment of the LFM:
Discussion and conclusions will follow in Section 7, summing up significant findings and individuating future research trends.

Flexibility Provision by DERs
RES power output depends on the availability of the primary source. The uncertainty in forecasting, even in the short-term, of these primary sources (e.g., wind, irradiation) is the main obstacle in handling the variability of RES. The resulting technical difficulties increase the need for operational flexibility. TSOs procure this flexibility through two phases: firstly, long-term contracts or market mechanisms in place for the procurement of reserve from generation companies (ancillary services procurement markets) and secondly, market mechanisms for reserve activation (ancillary services activation markets). The regulatory efforts now are focused on re-designing the short-term markets to provide fair market access for all sources of flexibility, including distributed generation and active demand, namely DER flexibility. Many definitions are present in literature for 'flexibility' [13][14][15].
From a system perspective, it can be defined as the capability of the power system to adapt its production or consumption with respect to sudden changes, expected or not. At the individual level, it is often referred to as the modification of the consumption or injection pattern due to direct or indirect signals. As highlighted in [16], electric flexibility is a heterogeneous commodity with multiple attributes; these main attributes are reported in Figure 2 and are related to the deviation from a baseline, which corresponds to the usual consumption or production pattern. Flexibility cannot be characterized using a single metric. Several dimensions should be taken into account: capacity, duration, ramp rate, direction, energy content, response time, and location [17]. One type of DER might be efficient in one dimension and inefficient in another. For example, PV systems can provide only upward regulation via the curtailment of production, while battery storage can provide both upward and downward regulation. In terms of duration, a residential Thermostatically Controllable Load (TCL) can modify its consumption by up to a few hours; however, the change in power is not significant, because it is bound by the violation of the comfort constraints of the end-user. Extensive categorization of DER regarding different dimensions is conducted in [18]. The relevance of each attribute also depends on the service that the resource has to provide-the location is important if the problem to be solved is location-dependent (congestion, overvoltage), while it is irrelevant if the flexibility is used for adjusting market imbalances. One fundamental difference in the DER flexibility is between residential and industrial types. The exploitation of industrial flexibility for providing services is more convenient-bigger-sized loads imply a smaller amount of resources is required to reach the minimum size for bidding in the market. Furthermore, in the industry sector, the information and communication infrastructure is usually already installed for the purpose of energy management and a smaller investment is required to deploy industrial assets. On the contrary, residential demand flexibility introduces more complications, as follows [19]: • A layer of uncertainty is added when predicting and procuring the available flexibility from residential customers because these loads have direct relations with the users' behavior and comfort. For example, controlling the set-points of residential heat pumps for space heating and thus changing the power consumption will directly affect the internal temperature of the building; • Inter-temporal constraints of some resources, such as smart appliances, come in play. The flexibility that is available at time t depends on the flexibility offered and then activated at time t − 1; this makes the scheduling process of the flexibility available for a longer time-horizon more challenging; • The size of the loads and costs to be incurred for a single household make the choice of participating in the market unprofitable.
These drawbacks can be partially overcome by aggregating small resources together. The aggregation of small and medium-sized resources will shortcut the access to the market, with the aggregator acting as an intermediary. Flexibility from distribution level resources can be used for different purposes; specifically, the scope of these flexibility services is threefold [20]: The exploitation of flexibility from DERs will be fully enabled when the owner (or manager) is acknowledged as a market participant who is allowed to offer services in all organized markets with the only restriction of not jeopardizing the security of the power system. As an example, if the aggregator provides flexibility from distribution level DERs to the TSO, this service provision should not put the safe operation of the distribution network itself at risk. The regulation should consider this facet by harmonizing the provision of multiple flexibility services from DERs existing in the distribution network. In the following sections, we discuss the barriers which, in the current regulatory framework, do not allow the use of small-scale flexibility to interact with the electricity markets.

Three Stages towards the Full Exploitation of DERs' Flexibility
As previously said, the aggregator can bridge the gap between DERs and the electricity markets. Thus, the first step towards the use of bottom-up flexibility services is the definition of a regulation concerning the role and responsibilities of the aggregator, allowing him to offer services to available market mechanisms. Market access for aggregated small units remains critical, despite the willingness of the European Union to exploit demand response resources as a flexibility source in the power system. Regulatory changes are needed to allow interactions between the two levels, especially by means of enabling the aggregator's trading. With the aggregator being able to offer its flexibility from the distribution level up to short-term markets, both system-oriented and market-oriented service provision can be realized. This topic is elaborated in Section 4.
A parallel paradigm change will enable DSOs to evolve towards the role of active manager of their networks that is able to procure flexibility within the geographical area where they operate. DERs will then become the main flexibility source to handle local problems, giving DSOs an alternative to avoid or defer grid reinforcement [21]. In the context of a liberalized electricity market, the establishment of a market-based procedure to value DER flexibility is considered to be one of the possible solutions. DSO performs a grid-oriented use of the flexibility, deciding during the planning process whether to call for a market-based procurement or to proceed with grid reinforcement. This market mechanism is intended to be only for the grid-oriented use of flexibility without competition on the buyer side. Enhanced DSO-TSO coordination is required to allocate the services according to the priorities of the power system or at least to coordinate the operation of different system operators with flexible resources available at both levels. Section 5 focuses on the second stage. The regulatory change concerning the DSO's role is expected to happen over a longer term than the first one, since the aggregation service is already allowed in some European Countries, even if it is often provided by energy suppliers.
Once all the potential participants are enabled, a final step will be the establishment of an LFM where system actors can trade their flexibility for different purposes. At this stage, three types of players are expected to trade in the LFM:

•
The aggregators value the DERs' available flexibility; • The DSO requests flexibility for grid-oriented use; • BRPs trade flexibility for market-oriented use.
A fully-competitive LFM can be implemented, namely allowing competition on both the buyer and seller sides. The design of this market mechanism is complex, especially for the coexistence of parties requesting flexibility for different purposes (market and grid-oriented use); in other words, the DSO requests flexibility for managing the network while the BRPs request flexibility for market imbalances. At the same time, the market mechanism should be aligned with the already established markets, in particular, with the AS market managed by the TSO. The coordination is required because, e.g., aggregators are able to offer in different markets and the service offered in one market (reserve for the TSO) can worsen/improve the situation on the LFM (less/more flexibility requests from the DSO). These aspects are explored in more detail in Section 6.

Enabling Aggregator Trading
In the last European Directive on Energy Efficiency [22], the aggregator was essentially defined as a demand-response provider, i.e., as a means to gather short-duration customer load that is otherwise unable to participate in any organized energy market. The focus was on the demand-response as a tool to empower customers and promote energy efficiency. In [23], the aggregator is defined as "a market participant that combines multiple customer loads or generated electricity for sale, for purchase or auction in any organized energy market"; the definition has changed to include both consuming and producing units, thus considering all aspects of the DERs' flexibility.The aggregation is a commercial function of pooling decentralized generation and/or consumption to provide energy and services to actors within the system [24]. The aggregation service is the key enabler of investment and growth in the demand response and decentralized management of DERs [25]. Economies of scale can be realized since the fixed costs of market participation and communication infrastructure decrease as the number of providers increases [26]. Moreover, aggregation mitigates the risk for error forecasting in the availability of DER resources and thus limits the risk for not meeting market commitment [27]. Figure 3 indicates the possible interactions of the aggregator with existing wholesale markets. It can interact with the day-ahead (DA) market and intra-day (ID) market to providing market services and with AS markets to providing system services.  It is worth noting the difference between an aggregator and an independent aggregator. The aggregator role can also be carried out by an energy supplier that provides the aggregation service for DERs. The energy supplier can thus exploit the flexibility of the energy resources which normally involves supplying energy and offering the end-user a lower service fee for the availability of its resources. On the other hand, an independent (or third-party) aggregator is an energy utility that can manage DERs' flexibility without having any contract with an energy supplier-the aggregator in this case has a separate contract with the DERs' owner.

Barriers to Market Access
The role of the aggregator is not even defined in most European countries, and there is no legislation regarding how this new role will be embedded in the actual framework. The aggregation service is still not completely allowed for short-term markets. In Table 1, an overview of the aggregation service for the short-term markets for 19 European countries is reported based on data from [28][29][30]. Each MS has different settings for the DA (e.g., closure time) and ID markets (e.g., number and duration of market windows). The same holds for reserve procurement; thus, the number or existing type of mechanism (e.g., market-based, auction-based, contract-based) and the product definition (e.g., automatic, manual, emergency reserve) depend on the type of reserve (primary, secondary or tertiary) and on the national regulation. An affirmative answer in this table means that the aggregation service is allowed in at least one of the existing market/procurement mechanisms. It can be seen that the nordic countries (Denmark, Finland, Norway, Sweden) are front runners in promoting the aggregation service. Southern countries are still lagging in allowing the aggregation of small-scale resources (Greece, Italy, Portugal, Spain). Nevertheless, even if legally open for the aggregation service, impractical requirements limit the participation of aggregators. Only a few business cases exist for aggregators managing industrial loads and generation [31]. When it comes to small-scale flexibility, the product requirements practically keep the aggregators out of the markets. Some key findings are as follows: • Minimum bid size: the size of minimum allowable bid is a significant barrier for aggregators of small units-it should engage a significant number of customers to reach a critical size to access the market; • Symmetric bidding requirements: in some reserve markets the bids are required to be symmetric in both upward and downward regulations; since aggregators can have unidirectional flexibility in their portfolio in specific time periods, this might be a limiting factor for the access; • Activation time: typically designed for big generation units, the contracted reserve may be required to be online for up to 10 h, which is often not compatible with small flexible resources, even if aggregated.

Aggregator-BRP Compensation
Another strong requirement for the aggregator is the association with a BRP to access the market. The roles and responsibilities of so-called independent aggregators (e.g., not depending on any BRP) have not been clarified. Enabling independent aggregators means providing a legislation that allows aggregators to contract the end-users directly without having a pre-agreement with the energy supplier and its associated BRP [32]. Figure 4 shows the implications of a third-party aggregator having a separated contract with the prosumer.  The energy supplier/BRP (assuming for the sake of simplicity that they are the same company, but they can be separated entities) submits a load profile in the DA market based on its forecast. Closer to real-time operations, the independent aggregator may request a flexibility activation from the end-user. If the activation becomes effective, the resulting consumption pattern of the end-user will be different than the submitted one by the energy supplier/BRP in the DA phase. Therefore, this creates two distinct effects:

•
The aggregator is getting rewarded for the offered flexibility service; • The BRP is facing an imbalance related to the activation of the flexibility that will be settled by the TSO according to the imbalance settlement regime in place.
Clearly, a compensation payment needs to be arranged between independent aggregators and BRPs. This financial adjustment should reflect the sourcing costs for the energy/service provided and should ensure that risks and costs are associated with the party that causes them [33]. A holistic approach to the definition of roles, responsibilities, and interactions between all market parties in flexibility market has been undertaken by the Universal Smart Energy Framework (USEF). In [34], USEF contributors define different aggregator implementation models, elaborating on the interdependence of the aggregator with the BRP. This extends the work conducted in [35], where different Demand Side Response (DSR) provider models are presented based on the contractual relationship with the energy supplier.
Only France and Switzerland have defined legislation for independent aggregators. In France, three different compensation options are given [36]: (1) the contractual regime, agreed directly between the aggregator and the energy supplier; (2) the regulated regime, where the aggregator pays a fixed tariff decided by the TSO to the BRP; and (3) the corrected regime, where the aggregator is invoiced for the energy component of the energy that would have been consumed by the end-user without flexibility activation. In Switzerland, no prior agreement is needed between the indepedent aggregator and energy supplier/BRP; for the offering of balancing services, the day after the operation, the Swiss TSO corrects the position of each BRP considering all the flexibility activations that have modified its position. The BRP receives a compensation payment for the difference in consumed energy, determined by the quarter-hourly DA spot price [28]. In Ireland and in Great Britain no regulations have been established regarding independent aggregators; nevertheless, independent aggregators can directly contract with end-users without prior consensus of the BRP/supplier. In Great Britain, the independent aggregator can provide balancing services to the national TSO without compensation payment to the energy supplier; this regulation-gap is still not relevant since the number of aggregators participating in the balancing market is considerably low, but the regulator is willing to address the problem in the near future [37].
The goal of the market is to provide fair access to all potential parties without any discrimination. Thus, redesigning the market in such a way that DER aggregators are involved will act as leverage for attracting investors to create new business models [38] and accelerate the process towards the development of a smart DN through the deployment of automation, control, and hierarchical coordination of DERs. At this stage, after addressing the mentioned regulatory barriers, the aggregator would be able to access short-term markets at the wholesale level. The aggregator is expected to allocate flexibility with the objective of profit maximization; a key-challenge is to create a level-playing field with the local DSOs to contract flexibility services if local grid constraints are in place. This leads to the next stage: the change of the DSO's business model.

Evolution of the DSO's Role
Several policy papers claim the change in the DN due to an increasing level of distributed generation will mainly affect the figure of DSO, causing it to be no longer or only partially a regulated entity [38,39]. The need to review the regulatory framework for DSOs is widely recognized in Europe [40,41]. The biggest recognition of this trend is the article concerning the use of flexibility by the DSO included in the proposal for a directive of the European Commission regarding common rules in the internal electricity market [23]. It declares the need for a change that "allows and incentivizes distribution system operators to procure services in order to improve efficiencies in the operation and development of the distribution system, including local congestion management." Furthermore, it indicates that DSOs "shall procure these services according to transparent, nondiscriminatory, and market-based procedures". The proposed change is radical: it allows DSOs to contract services with market parties in the DN.
Research studies have already demonstrated the cost-effectiveness of using DERs' flexibility to solve local problems from the DSO perspective. The authors in [42] investigated a real-time congestion management solution by using the market-based procurement of flexibility. The flexible loads allowed the transformer overloading cost in a distribution network to be reduced by 98% with a dominant share of DERs. In [43], the use of market-based flexibility was compared to RES curtailment to assess the best option to avoid congestion at the medium and low voltage levels in a distribution grid with high RES penetration. The flexibility usage resulted in the cost reduction of congestion management while guaranteeing a high level of RES generation in the system. Finally, in [44], the market-flexibility provision was compared with three other congestion management measures, resulting both in a RES curtailment reduction (from 15 to 35%) and in a DSO congestion management cost reduction (33%).
The procurement of flexibility services for DSOs is not allowed in most European countries; however, there are a few exceptions: in Germany and Belgium, a contractual agreement can already be established. In Belgium, newly installed generation units can reduce their network tariff by giving the availability for the curtailment of active power to the local DSO. In Germany, a similar contract can be realized between the DSO and controllable thermal loads, such as space heating technologies [45]. These solutions are used for congested network zones.
With the increasing number of flexible loads and distributed generation, the DSO can use the market-based procurement of flexibility in a more systematic way to tackle network problems and to promote DER integration which is otherwise slowed down by the limited hosting capacity available with the traditional planning approach. The DSO or an independent market operator (IMO) can operate the local platform, calling for a flexibility service when needed to solve congestions in the DA scheduling phase. This market-based mechanism has two aims: in the short-term, it is a tool for DSO to manage local problems by exploiting DER flexibility at the distribution level; in the long-term, the aim is to defer or avoid grid investments on additional transfer capacity.
One could argue whether there is a need to redesign the short-term electricity markets if the next step is the establishment of a local market mechanism where the DERs' flexibility can be fully valued. The answer is that, these two processes will develop in parallel allowing bottom-up flexibility services to be offered in any organized market at the local and wholesale levels. Figure 5 shows the potential interactions of an aggregator that is enabled to offer all three types of service.  The discussion on the appropriate time window, market time-unit, clearing mechanism, and product requirements for this local market procedure are outside the scope of this work. This is because those design requirements depend on the specific situation and on the needs of the grid operator. For example, a DSO can often encounter a congestion problem at the MV/LV substation, which can be forecasted in the DA planning. Thus, it can decide to establish the market mechanism on a DA basis. A different framework is needed to handle the voltage control problem, for which the flexibility should be procured closer to real-time dispatch and with a shorter notification time. Nevertheless, at this stage, the mechanism is oriented to procure a grid-flexibility service for the DSO, which is the only buyer, while flexibility aggregators can compete on the seller side.

Remuneration Scheme and Flexible Grid-Tariffs
Nowadays, in most European countries, the National Regulatory Authority (NRA) sets the allowed revenue (revenue cap or price cap) for a DSO in a regulatory period (whose length may vary depending on the national regulations), and the DSO sets the network tariff and connection charges accordingly. In some countries, such as France, Italy, and Spain, the NRA has even more control, also defining the level and the structure of the individual network tariff for each regulatory period [46]. Considering the penetration rate of DERs, the focus of the DSO will not be only on adjusting the network for the expected long-term peak. Additionally, there will be the need for investing in operational measures that allow a high penetration level of DERs while ensuring the quality of supply. The share between the operational expenditure (OPEX) and capital expenditure (CAPEX) is likely to change because of the DER penetration. OPEX will increase (for flexibility provision or operational grid issues) while long-term investment will have less weight with respect to the past. The cost drivers for the DSO will change and the remuneration scheme should be able to capture the process of using OPEX (in the short-term) in order to reduce CAPEX (in the long-term), whose effects are seen in more than one regulatory period. New incentives are required to stimulate efficiency and innovation in the DSO's model, while traditionally, remuneration schemes induced DSO to invest only in grid reinforcement [27]. Through output-based incentives, the NRA can set the DSO's goals based on relevant parameters that are of interest for pursuing a particular distribution task. The minimum threshold can be fixed on performance factors such as the minimization of congested time for the network or the facilitation of low-carbon technologies. This approach is effective for tackling multiple objectives [47].
The regulatory change for the remuneration scheme will consequently affect the way that distribution costs are allocated among end-users: in other words, it can stimulate the DSO to define innovative grid tariffs to direct the consumption or production of grid-users in a system-efficient way [48]. In the past, the focus was on the reduction of energy consumption, to defer grid reinforcement for as long as possible; thus, the network tariffs were mainly energy-based or volumetric (e/kWh). These types of tariff do not consider when the power consumption is occurring or which share of the capacity line is occupying. These aspects will become more relevant in the future due to increased coincidence factors. Furthermore, DSOs are often economically exposed to consumption volumes which are continuously decreasing due to energy efficiency measures and are becoming more difficult to predict. The shift towards power-based network tariffs (e/kW) and time-dependent network tariffs are recognized as promising solutions for DERs' integration. Dynamic tariffs such as Time of Use, Real-Time Pricing or Critical Peak Pricing leading to fully-dynamic retail pricing can promote the efficient behavior of active consumers using the DN [37,38]. Previously, in dynamic tariffs, the variable part was the energy component of the retail price and the variations were not significant enough to stimulate the modification of the consumption pattern. Most of the European countries have the volumetric component as the main share in the DN tariff and this contributes one-third of the final electricity price paid by the end-users. Only the Netherlands has implemented a network tariff that is totally based on the power consumption [46]. The right economic signals can be delivered to end-users, especially at the residential level, by implementing a fully-dynamic tariff (energy plus network components) leading to the optimal use of the grid in the short-term and guiding the right investments in the long-term. Fully dynamic pricing could lead to benefits for all involved stakeholders:

•
For DSO, it would mean a substantial part of the remuneration being cost reflective, as the delivered power would become an even more important cost driver with increasing DERs in the DN [49]. Thus, it would allow efficient recovery of the cost incurred in conveying efficient economic signals to end-users; • For the end-users, on top of the remuneration for flexibility provision from the aggregator, this would lead to increased savings from shifting energy consumption from peak hours to off-peak ones; • For aggregators and energy retailers, it would create a level playing field where they can offer a variety of flexible contracts to the end-users, depending on their willingness and availability to modify the energy consumption [50].

ICT Infrastructure
A solid ICT infrastructure is another requirement to allow the exploitation of small-scale flexibility at the distribution level. It is a key component of the future distribution system to enable data exchange and automatic control between involved parties. The European Directive 2009/72/EC, also known as the Third Energy Package, lays the foundations for large-scale deployment of the smart metering system, encouraging the European Member States (MS) to provide advanced metering systems to at least 80% of its customers by 2020 if it is economically reasonable and cost-effective in the long term [51]. The driving forces can also determine the different developments and they differ from country to country-they range from the reduction of carbon emissions and demand response promotion to consumers' requests for a clear and transparent billing system [52].
Smart metering is an enabling technology since it will allow the interoperability and connectivity of devices/premises with the overlying DN; furthermore, access to timely available data will allow improved management and control of the DN by the network operator due to an improved load and local generation forecast; consumer awareness can be increased with the possibility of accessing flexible retail contracts as well as flexibility-rewarding contracts with energy suppliers and/or independent aggregators. The aforementioned regulatory changes (review of DSO's remuneration scheme, implementation of dynamic tariffs) should be introduced for new services and new actors in order to catch all potential benefits deriving from the technology [53]. Nineteen Member States have committed to roll out up to 200 million smart meters by 2020, with a potential investment of around e40 billion [32]. Seventeen MS out of 19 will lead the change, reaching the target by 2020. The average behavior in Europe is the "Dynamic Mover" area: either the roll-out has been already initiated or there are major research projects driving the subsequent decision for deployment [32].

DSO Market Examples
Several proposals for the DSO-operated local market mechanism are currently being investigated. The FLECH market is one example [54,55]. Its aim is to integrate the grid-flexibility service within the medium-term planning during which the DSO can forecast the load scenarios with discreet accuracy and can predict how often it will need flexibility activation throughout the planning horizon. The market is structured in two phases: firstly, a reservation market, where DSO establishes contracts with aggregators that are committed to providing flexibility for a determined number of time-steps during the contracted timeframe; and secondly, an activation market where DSO can call for flexibility activation and other aggregators, which, even if they are not involved in the reservation phase, can bid at a lower price than the established price in the reservation phase (considered as a cap). The unitary cost of flexibility procurement (considering both reservation and activation) should be less than the unitary cost for increasing the power capacity of the electricity infrastructure to be cost-effective. This comparison was considered in the research conducted in [56] through an empirical framework, namely FlexMart, where the DSO tries to minimize its overall cost considering the cost of flexibility activation, the cost of line reinforcement, and the cost of energy curtailment. The consumers are rewarded for the flexibility service with a fixed benefit covering the difference between the cost of flexibility-related equipment and the benefit due to a consumption shift in off-peak hours. In this context, the relevance of dynamic network tariff is evident: it can increase the difference between off-peak and peak-hour electricity prices, consequently increasing the savings for the end-user while reducing the compensation paid by the DSO. The De-Flex Market, an interesting proposal presented by the German association of Energy Market Innovators (BNE), provides an instrument for DSO to solve local capacity constraint using DER flexibility [57]. The authors suggested the division of the network in aggregated distribution areas, subject to the different levels of restriction requirements for a certain number of 15 min operational periods. The contracting time frame with flexibility suppliers should be long enough to ensure that over the planning horizon, the DSO will get the needed flexibility. In [58], the DSO acts as a sole buyer of a reactive power market with the aim of relieving voltage problems to exploit the distributed generation available in different microgrids connected at the low voltage level. The microgrids can operate more efficiently by interacting with the utility grid, gaining profit from selling the energy generated locally and helping the utility grid when technical problems are occurring. A DA market-based congestion management is proposed in [59,60] for the trading of flexibility from microgrids, where the cost of the service is compared with the grid reinforcement. Lastly, using an agent-based approach, the flexibility market mechanism is compared with other congestion management measures in [60] showing promising results in the distribution grid with highly renewable penetration.
As the DSO will change its business model, the two main stakeholders for flexibility trading at the distribution level will be enabled. The market mechanism with DSO as the only buyer is a necessary step, since parties are emerging agents and flexibility products need to be standardized. This can be considered a 'monopolistic test' where the amount of flexibility needed and the price cap are set by the only buyer [61]. Once aggregators have reached a critical mass and the market has enough liquidity, the final step will be the shift to a fully-competitive local flexibility market (LFM) where competition is allowed on both sides.

Local Flexibility Market: Key Design Challenges
The DSO-operated market can be considered the first trial of a fully-competitive flexibility market where competition is ensured on both sides. Fair market access should be guaranteed to all interested market parties, including BRPs/energy suppliers that are looking at distribution level flexibility as an additional market to adjust their unbalanced positions. The complete set of interactions is represented in Figure 6. The fundamental difference between the two stages is that the local flexibility market is a platform where parties can trade different services: grid-oriented services and market-oriented services. Currently, there are no practical examples of implemented LFM in Europe, but several market designs are under research or at the pilot-stage. We identified two main design challenges to be discussed in the following section: the coordination of ancillary services procurement between TSO and DSO and the coexistence of grid-oriented and market-oriented use.

TSO-DSO Coordination
If the aggregator is allowed to trade in any organized market, a situation could occur where the aggregator finds it more profitable to offer its flexibility to the TSO AS market, thus not notifying the DSO at the local level. Furthermore, it can exploit the presence of different markets (local and wholesale) with different aims by voluntarily creating a local problem and being paid afterwards to solve it. Consequently, TSO-DSO communication is essential: the local market design should consider to what extent the TSO is involved in the local market. Even if not directly involved, the TSO needs to be aware of the transactions at the local level by restoring the information flow between TSOs and DSOs which traditionally has been cut. Enhanced coordination is required to guarantee at least data exchange, sharing of balance responsibility, and grid observability of both system operators [62].
ENTSO-e states that a single marketplace may be a feasible solution to ensure that flexibility from distribution level resources is allocated to create the highest value for the system; a joint TSO-DSO AS market would reduce the number of different bidding processes for procuring ancillary services and limit the possibility of arbitrage between different market platforms [63]. In [64], the author demonstrated that the joint procurement of ancillary services can also lead to greater total system benefits compared to separate procurement. Nevertheless, a practical application of this market could result in an overwhelming burden being carried by only one central system operator. Furthermore, the needs of the TSO (balancing, frequency-related AS) and the needs of the DSO (local congestion, voltage limit violations) are extremely different: locational dependency, size, and requirements are different for addressing issues at the transmission level or at the distribution level.
A decentralized approach, consisting of several local markets operated by different DSOs, coordinated with the traditional AS markets operated by the TSO can lead to the shared computational burden and increased responsibility of the DSO in the active management of the DN. Moreover, flexibility resources that do not meet the requirements of the wholesale markets can be valued in local markets. In this case, data exchange and coordination are needed between DSO and TSO to ensure that the constraints of both transmission and DN are not violated while running different market platforms. The work in [65] provides five different coordination schemes for the TSO-DSO market procurement of ancillary services, defining valid alternatives to the joint TSO-DSO centralized market model.

Coexistence of Different Flexibility Services
Another key challenge is the coupling of grid and market-oriented use of flexibility. Apart from the system operators, market agents (BRP, energy suppliers, microgrids and even prosumers) at this last stage should be allowed to trade flexibility at the distribution level. It is important to note that the DSO, as a regulated entity, is seeking flexibility to cost-efficiently operate the grid; its request is locational dependent, meaning that it requests flexibility activation in a specific area to mitigate a problem in the same area. On the other hand, BRPs activate flexibility to solve an imbalance in their portfolio which does not have location constraints; their requests are purely profit-driven, therefore they are willing to pay a lower price for flexibility activation to avoid a higher penalty after the ex post imbalance settlement. On one hand, requests for grid-supporting purposes should be prioritized because the objective is to reduce the operative costs of the electric infrastructure, but on the other hand, this would mean biasing the market towards the DSO's request, violating the principle of fair competition. Different design approaches can be followed in relation to this aspect: in this work, we consider three different ways of coupling market and grid-oriented use: This categorization comes from the analysis of the ongoing research and projects, and each solution determines the differences in the market participants, in the market operator, as well as in the level of complexity of the market design (Table 2). Without any coupling, two separate markets will be established: one for market use and one for grid use. The DSO market will be used as a grid management measure and the examples of Section 5.3 are all valid alternatives. The market operator will be the DSO and the aggregators will be enabled to offer flexibility for grid-oriented use. In parallel, another market will run to allow the market-oriented use of flexibility managed by an IMO. In [66], the authors propose a continuous, double-sided auction for market based-control of DERs at the distribution level: prosumers and aggregators can participate, while network constraints are not considered. Each agent aims to maximize its own objective function: profit maximization for prosumers/aggregators and social welfare maximization for the IMO. A DA micro-market algorithm is proposed in [67], where prosumers and generators can trade their energy within the DN. This algorithm runs before the closure of the wholesale DA market with the aim of determining the optimal exchange with the main grid. After the clearing of the wholesale DA market, a second algorithm runs to exploit the possibility of arbitrage (the actual prices being known) by deviating from the previous program for a determined penalty cost. The technical constraints of the grid are here considered in the clearing mechanism.
The conditional coupling implies one single market where both services coexist. The fullycompetitive LFM runs as long as a certain condition is satisfied; namely, the market runs without limitation if the network is not threatened by any upcoming technical problem. The market is operated by the IMO because the DSO and BRPs can request flexibility in the same market platform. This is the approach followed by the Universal Smart Energy Framework (USEF) foundation and by the German Association of Energy and Water Industries (BDEW). USEF [68] introduced four different operating regimes, depending on the grid state: the market-based mechanism (based on continuous interactions of aggregators, prosumers, and BRPs) runs without any restriction as far as the grid is in normal operation; when the grid is in a potential state of risk, the DSO starts participating in the market to procure flexibility in order to avoid any technical problem. The last two operating regimes come into play if the market-based mechanism is unable to solve the local problems, and the DSO proceeds to apply direct control over the contracted resources, managing power profiles and eventually curtailing production and shedding loads. In a similar way, BDEW introduced the Traffic Light Concept [69]: in a green state, the free local market allows trading among prosumers, aggregators, microgrids, and BRPs without any restrictions. If the DSO foresees a technical problem, it starts contracting flexibility directly in the market in the so-called 'yellow phase'; if this mechanism fails to solve the grid constraints, the grid passes into a 'red phase' in which there is a direct risk for the stability of the system, and the network operator must intervene promptly to restore the security of the supply.
Sequential coupling implies the coexistence of different types of service in the same market, but the priority is given to one use depending on the needs of the system. This market involves flexibility trade for different purposes, so again, an IMO should be in charge of managing the platform. One example [65] is a sequential market procedure where the DSO first clears the flexibility needed to solve local constraints and then passes the remaining bids to the TSO that clears the market to procure ancillary services from the distribution grid, eventually leaving the non-constrained flexibility offers for market-oriented services. Another example of such coordination can be found in [70]. In the ID clearing mechanism for flexibility trading, first, the market is cleared to match the BRPs' requests in similar and opposite directions to the DSO; after these two stages, the DSO's requests are matched with the remaining offers from flexibility aggregators. The market design, in this case, is more complicated because the criteria for the prioritization has to be defined between different uses, and bias towards one use is unavoidable. Agents might want to pay more for flexibility in an earlier stage of the clearing sequence but they are unable to due to the clearing priorities. The use of flexibility is limited for another reason: after one stage, the flexibility that is traded should respect the constraints of the previous stage or, in other words, it should not affect the resolution of constraints at previous stages.

Discussion and Conclusions
A comprehensive discussion on the full exploitation of flexibility deriving from Distributed Energy Resources (RES) at the distribution level is presented in this article. The establishment of a local flexibility market (LFM) is the final stage and enables the trading of the flexible part of supply and demand belonging to DERs. The available flexibility can be used for different purposes: to provide system services to the TSO, to provide grid services to the DSO, and to provide market services to the BRPs.
Starting from the actual regulatory framework in Europe, the article elaborates on the necessary changes to unleash the full potential of the DERs' flexibility, enabling the two main stakeholders of the distribution level flexibility: the aggregator and the DSO. The aggregator gathers multiple small-scale flexibility resources to allow their interaction with the short-term markets which would otherwise be unfeasible; in fact, access requirements for short-term markets are tailored around the capabilities of big generating units, which have traditionally been the only providers of flexibility. In parallel, the DSO will evolve towards the role of the active manager of the grid, and one of the key changes will be the procurement of the flexibility available in the network through a market-based mechanism to avoid or defer grid investment.
The relevant design challenges of a LFM are also discussed. TSO-DSO enhanced coordination is required to allocate flexibility to where it brings the highest benefit to the overall power system. The coordination of market and grid use of flexibility is also a crucial aspect of the LFM design. As highlighted in Section 6.2, conditional coupling of the different flexibility services is the most promising approach because it recognizes the value of the market-based flexibility procurement in the DA and in the ID planning, but it incorporates the LFM into a bigger management procedure based on the grid state, providing backup schemes when approaching the delivery time. Nevertheless, quantitative research on the value gained by using one type of coordination or another is not available, and this research gap needs to be addressed in future research. The optimal market design depends on the national regulations, specific area, the needs of the system operators, the number of active stakeholders at the distribution level, and on the amount of available flexibility. The research should define the technical, economic, and social boundaries in which the LFM can be an effective solution. Regarding the two first stages, the next research steps will focus on these challenges:

•
Following the discussion in Section 4, we individuated the most critical regulatory barriers for market access. We will investigate regulatory market adjustments (lower minimum bid size, asymmetric bidding) to quantify how much they can improve market access for aggregators. A compensation payment to BRPs must be present to adequately allocate balance responsibilities among parties; on the other hand, an excessive amount will limit the profitability of new business cases for independent aggregators that are willing to enter the market. Starting from the countries (such as France and Switzerland) that have already introduced a regulation on this issue, we will compare different alternatives for compensation payment.

•
In Section 5 we discussed the needed change in the DSO's remuneration scheme to introduce a more innovative tariff that can stimulate flexibility activation from end-users; we will try to individuate and quantify relevant parameters (economic or technical) that will distinguish the profitability of a local market mechanism from the procurement of flexibility from other grid management measures. The establishment of the LFM needs investments in the ICT infrastructure to allow the realization of transactions among participants. This investment decision depends on the foreseen increase in the DERs' share in the grid, on the actual state of the network, and on the needed network upgrade to accommodate the future scenarios.
Moreover, there are essential requirements for a market mechanism to be successful, namely a sufficient number of competitors and a sufficient liquidity in the commodity to trade. An insufficient number of participants or a lack of liquidity would result in an unstable market, and other mechanisms, such as a contractual-based flexibility procurement, should be preferred. Research effort needs to be directed towards the quantification of these factors to discern the preferred mechanism to establish. The final aim is the achievement of economic and effective management of the overall network infrastructure. Therefore, in light of the emerging importance of DERs as a potential flexibility source, the LFM should be considered a tool for boosting DERs' integration by creating value for bottom-up flexibility service provision. Funding: This work is part of the research programme ERA-net Smart Grids Plus with project number 651.001.012, which is financed by the Netherlands Organisation for Scientific Research (NWO). (http://m2m-grid.eu/).

Conflicts of Interest:
The authors declare no conflict of interest.