Two-Layer Game-Based Framework for Local Energy Flexibility Trading

A new configuration is required to model the behavior of customers, aggregators, the distribution system operator (DSO), and their interactions due to the active participation of customers in the local flexibility market. To this end, we propose a two-layer game-based framework that models agents’ behavior and their interactions. Thus, firstly, at the inner layer, customers and aggregators set their decision variables considering the decisions of each other performing an iterative game. After the inner layer game concludes, in the outer layer, the DSO determines its decision variable according to the decision of aggregators and customers. If the convergence condition is satisfied, the game of the outer layer concludes. Otherwise, there is another inner game and subsequent outer game until the satisfaction of convergence condition. Therefor, customers, aggregators, and the DSO have similar decision-making power. Since all of them can make their own decisions and modify them according to others’ decisions. To study our model, we consider three scenarios with different levels of freedom while decision-making for customers that is resulted from different levels of limitation for arbitrage avoidance. Our results illustrate that our iterative approach is converged after few iterations in both the inner and the outer layer. Moreover, customers who have a contract with the same aggregator behave similarly. Furthermore, aggregators benefit from customers’ freedom, while it is very destructive for the DSO and increases its objective function.

Lower band for price of flexibility traded between aggregator k and its customers. λ

L2A kt
Upper band for price of flexibility traded between aggregator k and its customers. δ kt Profit guarantee factor for aggregator k at time t (δ kt > 1). γ j Flexibility factor for customer j (0 ≤ γ j ≤ 1).

I. INTRODUCTION
A. BACKGROUND Due to newly emerged uncertainty issues resulting from the increasing penetration of renewable energy resources in the power system, finding an efficient source for providing energy flexibility is vital to maintain the balance between generation and consumption [1]. In this way, customers can manage their energy consumption to provide positive or negative energy flexibility for distribution systems [2]. This capability of providing energy flexibility by changing the pattern of consumption, causes customers to be more engaged in the process of decision-making in the distribution system [3]. As a result, conventional models cannot cope with the active participation of market participants. Hence, novel methods are needed to model the behavior and interactions among active agents in the distribution system [4]. Some studies deployed novel approaches to facilitate the utilization of customers' flexibility in the distribution system. In this regard, some studies investigated the flexibility trading opportunities to assist system operator. In such studies, the system operator decides on the flexibility trading among different agents in the market while other agents are not equipped with the capability of decision making. In [5], the local market operator in coordination with the DSO determines the flexibility transactions among customers in a peer-to-peer (P2P) trading platform. In [6], the DSO controls the flexibility scheduling to maximize its profit resulting from offering flexibility to the day-ahead market. Ref. [7] presented three strategies for flexibility management for electric vehicles in the distribution system. In the third presented strategy, a local coordinator manages the charging of electric vehicles and the flexibility of end-users. In [8], a methodology is presented to determine the optimal flexibility exchange strategy for improving the voltage profile and preventing line congestion. Similar to [8], in [9], a two-stage stochastic programming model is presented to assist the DSO in managing the flexibility provided in the distribution level to minimize the voltage violation and line congestion. The approach presented in [10], joins local electricity, heat, and gas systems to utilize the demand flexibility in an integrated energy system where the operation of electricity market operator, heat market operator, and gas market are coordinated. Ref. [11] presented an incentive-compatible mechanism to assist the DSO in acquiring flexibility from aggregators (who are in charge of delivering flexibility to the DSO) while they are motivated to declare their true cost.
Some other studies investigate the flexibility and energy transactions to assist other agents in the distribution system for finding the optimal strategy. Ref. [12] presented a model that enables energy communities consisting of nanogrids to provide the system with flexibility using their excess generation on the demand side. Authors in [13] presented a two-stage stochastic approach for flexibility management of large customers considering the uncertainties of solar generation and market prices. Some studies deployed a bilevel optimization approach that provides the solution for the leader of the problem based on the Stackelberg game. This approach aims to consider the actions of followers while determining the optimal strategy of the leader. In this methodology, although the optimization problem of both the leader and followers is taken into account, the problem is studied from the leader's point of view and the leader's power of autonomy is more than the followers. Because the leader is able to take into account the expected response of the followers while followers do not have similar capabilities. In this regard, authors in [14] presented a bilevel approach to consider the interdependence of the decision-making of distributed resources and aggregators to assist the aggregators in choosing the optimal strategy. Ref. [15] utilized a bilevel optimization to minimize aggregators' cost at the upper level considering the market clearing process at the lower level where independent system operator's generation cost is minimized.
Furthermore, customers have a greater potential to be involved in flexibility trading compared to energy trading, as they are a potential resource of flexibility owing to their ability to adjust their consumption. In this way, customers have a bolder role in the flexibility market compared to the energy market. Thus, it is crucial to present a trading framework that motivates customers to engage in the flexibility transaction and increase their flexibility provision. In this regard, a game-based model that serves the customers with decision-making capability could be effective in facilitating their participation in the flexibility market. In addition, customers are entitled to trade flexibility with the DSO directly. Because flexibility is derived from the demand side. VOLUME 10, 2022 The capability for direct trading with the DSO empowers customers to play a significant role in the flexibility market. In this way, the active participation of customers will make a more competitive atmosphere in the market, and pave the way for the DSO to utilize the flexibility of customers for utilizing intermittent renewable energy resources [16].
Since different agents in a competitive market seek to gain more profit, a method should be deployed to address the competition among agents and their interactions. In this regard, game-based approaches are in the interest of some studies. As game-based approaches enable different agents in the distribution system to make decisions in a competitive market independently. Authors in [17], presented a demand response management based on a two-level game. In this regard, at the lower level, residential users define their required consumption, and at the higher level, utility companies define the price and the amount of power supply based on the consumption determined in the lower level. Ref. [18] deployed a game theory model to assist flexible consumers in finding the most profitable coalition for flexibility trading. Ref. [19] utilized a network-constrained Stackelberg game to set the price of flexibility traded by consumers. Ref. [20] deployed algorithmic game theory for energy management of communities consisting of flexible prosumers considering resources constraints. In [21], authors deployed game theory to analyze flexibility providers' strategy for selecting the best business partners in order to maximize their profit.
To simulate the real behavior of agents, iterative approaches should be utilized to reflect the agents' reactions based on a dynamic game and interactions among players in a competitive trading framework. Most of the non-iterative approaches cannot model the independent decision-making behavior of all agents and just consider a limited number of decision-maker agents in their model. Furthermore, decisionmaker agents do not have similar decision-making power in the non-iterative approaches. In this way, agents' reactions to the other agents' different actions in a fair trading framework, where all agents have similar power, could be followed in iterative approaches. Moreover, the trading structure should be modeled correctly to consider and reflect behaviors of existing market players in the trading framework, otherwise, it will lead to errors in analyzing some agents' trading actions which may finally result in their failure. Authors in [22] presented a single-layer triangular iterative approach for trading flexibility in the distribution system. However, their approach converges after numerous iterations in some cases. It shows that the single-layer framework cannot model the agents' interconnections efficiently. To model the flexibility trading more realistically, by considering independent decision-making capability for the DSO, aggregators, and customers, and equipping them with the ability to update their decisions according to others actions in a two-layer structure, where all players have equal autonomy in the decision-making process, our approach analyzes flexibility transactions from the regulatory body's point of view. Therefore, our approach assists the regulator body in investigating the effects of new policies and regulations. Deploying the two-layer structure for modeling the close interconnection between customers and aggregators in the inner layer and their interaction with the DSO at the outer layer instead of considering all agents in one layer leads to fewer iterations until convergence which decreases the needed time for solving the problem.

B. AIMS AND CONTRIBUTIONS
To the best of the authors' knowledge, a two-layer framework for local flexibility trading in which the DSO, aggregators, and customers can make their own decisions independently, and the close interconnection between customers and aggregators is taken into account has not been reported in the literature. In our proposed approach, customers, who are in charge of providing energy flexibility by managing their consumption, aggregators, and the DSO intend to solve their own problems by determining their decision-making variables. In this regard, in our proposed two-layer game, in the inner layer, customers and aggregators have an iterative game until they settle on an agreement. Then, the DSO sets its decision variables in the outer layer in interaction with the inner layer. If the convergence condition of the outer layer is met after the decision of the DSO, the game is finished. Otherwise, the iterative inner game and the subsequent decision of DSO in the outer layer are repeated until the convergence condition is met. This way, considering the close interconnection between customers and aggregators in the inner layer causes the fast convergence after few iterations. Thus, the main contributions of this paper are summarized as follows: • Proposing a framework to model the behavior of strategic agents (DSO, aggregator, and customers) in the distribution system by implementing a novel two-layer game-based model to empower agents for making their decisions regarding local flexibility trading independently and updating them in interaction with other agents considering the close interconnection between customers and aggregators.
• Developing a model that enables analyzing the competitive behavior of different agents and their interactions while considering three scenarios for validating the performance of the proposed model and evaluating the effect of the arbitrage prevention constraints in the customers' flexibility transaction with aggregators and the DSO. The rest of the paper is organized as follows. In Section II, the formulation of the problem is described. Section III describes the structure of our proposed two-layer game-based model. Section IV explains three scenarios that are considered to study the model. Simulation results for the 33-bus test system are presented in Section V. Finally, the paper is concluded in Section VI.

II. PROBLEM FORMULATION
In this section, we explain our proposed framework of energy flexibility transaction, and different constraints for flexibility provision and transaction are presented. According to our model, all customers can provide either positive or negative energy flexibility by changing their scheduled consumption to participate in the flexibility market as represented in Eq. (1). In this equation, L f jt , L c jt , L jt represent the amount of flexibility that customer j provides, the scheduled load for customer j, and the real-time load of customer j after providing the flexibility, respectively. In Eq. (2), the maximum and minimum amount of the energy flexibility that customers in each hour can provide are defined accordingly. Here, γ j is called flexibility factor which can be set between 0 and 1 which is introduced in [3].
In our proposed structure for trading energy flexibility, as illustrated in Fig. 1, customers are able to transact flexibility with their corresponding aggregator who bought their scheduled energy, P L2A jkt , at price λ L2A jkt . If a customer buys flexibility from its aggregator, P L2A jkt is negative. On the other hand, if a customer sells energy flexibility to an aggregator, P L2A jkt is positive. Furthermore, customers can also exchange flexibility with the DSO in both directions, P D2L jt , at price λ D2L jt . If a customer buys energy flexibility from the DSO, P D2L jt is positive. Oppositely, if a customer sells flexibility to the DSO, P D2L jt is negative. The flexibility provided by customers is transacted with the DSO and their corresponding aggregator. Therefore, the relation between energy flexibility provided by customers, their flexibility traded with the DSO, and their corresponding aggregators is as expressed in Eq. (3), where M jk is an incidence matrix that maps flexibility trading between customer j and aggregator k. This way, customer j trades flexibility with aggregator k if M jk = 1, otherwise, they do not trade flexibility with each other. Moreover, it is assumed that loads in this paper are interruptible to some extent. To put it another way, the sum of provided energy flexibility by each customer in 24 hours should not be necessarily zero. However, as stated in Eq. (4), this sum is limited to be more than the assigned lower band and less than the upper band. Here, α is a coefficient that defines the portion of interruptible loads. In our study, we assumed that α is 0.1.
Moreover, according to Fig. (1), the total flexibility traded between customers and aggregators is traded among aggregators and the DSO as stated in (5). Thus, as P L2A jkt can be either positive or negative, the flexibility exchanged among aggregators and the DSO can also be positive or negative. In addition, the DSO trades energy with the RTEM for purchasing required flexibility or selling the additional flexibility provided by customers. The relation between P rt t , P D2L jt , and P A2D kt is shown in Eq. (6).
The objectives and decision variables of the DSO, aggregators, and customers are principals of our methodology. In this way, customers define the flexibility traded with their corresponding aggregators, P L2A jkt , and the price of flexibility traded with the DSO, λ D2L jt . Their objective is to minimize their cost. The upper and lower band of P L2A jkt and λ D2L jt are presented in (7) and (8), respectively.
Moreover, aggregators decide on the price of their flexibility traded with the DSO, λ A2D kt , and the price of their flexibility exchanged with their corresponding customers, λ L2A jkt . They can set different prices for different customers (9). Similar to customers, the goal of aggregators is to minimize their costs. Eq. (10) and (9) Finally, the DSO is responsible for deciding on its traded flexibility with customers, P D2L jt . The maximum and minimum limitations of P D2L jt are stated in Eq. (11).
The objective functions of customers, aggregators and the DSO are presented in (12), (13) and (14), accordingly. As presented in (12), the objective function of customers consists of VOLUME 10, 2022 two parts. The first part is related to the cost of trading flexibility with the DSO and the second part represents the income due to transacting flexibility with aggregators. Similar to customers, the objective function of aggregators also contains two terms which represent the cost of buying flexibility from customers and the income resulted from selling flexibility to the DSO, accordingly, which is presented in (13). However, the objective of the DSO is to minimize its financial exchange with the RTEM and increase the self-sufficiency of the distribution system as expressed by Eq. (14).
It is also noteworthy that decision variables of an agent could be a part of the objective function of other agents. In this way, the decision variables of one agent are parameters of the decision-making problem of other agents. In this regard, we propose an iterative two-layer game-based model for trading flexibility among agents in a bottom-up approach to consider the effect of agents' decisions on others. Fig. 2 depicts interactions among agents and decision-making flow in our proposed local energy flexibility trading model.

III. GAME MODEL
In this section, we describe our proposed game model. In this regard, there are two iterative games in our proposed model; the inner game and the outer game. At the inner game, customers and aggregators reach an agreement on their decision variables after iterative games. In this regard, firstly, customers decide on their variables based on the initialized data. In the second step, aggregators make their decisions according to the decisions that came from customers. Then, customers and aggregators update their decision variables according to the decision variables of each other. This process is iterated until the first convergence condition, which is presented in (15), is met.
Here, we have OF C = j OF cu j and OF A = k OF agg k . Besides, is considered a small amount parameter. In our simulation, is 0.01 for all scenarios. After the convergence of the iterative inner game, the DSO determines its decision variables according to the output of the inner game. Then, the convergence condition of the outer game is checked (which is stated in (16)). In this way, if the convergence condition is not met, customers and aggregators will make their decisions at the iterative inner game again, and the DSO will update its decision according to the output of the inner game. If the convergence condition of the outer game is met, all agents reach an agreement, and the decision-making process is finished. Fig. 3 depicts the flowchart of the decision-making process in our proposed approach.

IV. SCENARIOS DEFINITION
In this section, three different scenarios considered for our study are discussed. In these three scenarios, the DSO and customers have dissimilar levels of freedom for defining their decision variables. Different levels of freedom result from the presence or absence of two constraints. Despite the DSO and customers, aggregators have a similar level of freedom in all scenarios. Table. 2 describes the constraints of customers, aggregators, and the DSO's problem in different scenarios. In scenario 1, the problem of customers includes Eq. (7) in its constraint. In fact, there is a constraint for the amount of flexibility traded between customers and their corresponding aggregator (P L2A jkt ) in the problem of customers. This amount should not be bigger than γ j L c jt . This constraint is for arbitrage prevention in the flexibility trading between customers and aggregators. In addition, the problem of the DSO includes Eq. (11) in its constraints. As a matter of fact, there is a constraint for the amount of flexibility traded between customers and the DSO (P D2L jt ) in the problem of the DSO. This amount should also not be bigger than γ j L c jt . The presence of this constraint means that arbitrage is prevented in the flexibility transaction between the DSO and customers. Thus, the DSO and customers have a lower level of freedom, due to having one more constraint while solving their own problems. Problems of customers, aggregators, and the DSO in scenario 1 are presented below:    (11). In scenario 2, the DSO's constraints are similar to scenario 1. However, Eq. (7) is removed from customers' constraints. It means that there is not any constraint onP L2A jkt , and the possibility of arbitrage is not prevented. However, it should be noted that the amount of flexibility provided by customers is constrained by Eq. (2). But, (P L2A jkt ) is not constrained by separate constraint. Therefore, customers in scenario 2, are freer for deciding on their decision variables. On the other hand, in scenario 3, constraints of customers' problem are similar to scenario 1, while Eq. (11) is removed from the DSO's constraints. It implies that there is not any constraint on P D2L jt and arbitrage is possible in the customers' flexibility transaction with the DSO and aggregators. Hence, the DSO'S level of freedom in scenario 3, is more than scenarios 1 and 2.

A. CASE STUDY
We used a 33-bus test system from [3] and [16] to evaluate our proposed method. As shown in Fig. 4, each customer in this system is related to one of the three aggregators. Besides, we persume that γ j = 0.1, and δ kt = 1.1 according to [3] and [16], accordingly.

B. GAME INTERACTIONS
As mentioned beforehand, we have considered three scenarios with different levels of freedom for the DSO and customers to decide and determine their decision variables. Our results show that in scenarios 1 and 2, in both the inner and outer layer, the convergence condition is met after few iterations. However, in scenario 3, the convergence condition of the outer layer is met after 18 iterations, while there are few  iterations for the inner layer. Number of iterations of outer layer and their corresponding inner iterations are presented in tables 3 and 4 respectively.
In scenario 1, there are five iterations in the outer layer. In the first iteration in the outer layer, there are five inner games between customers and aggregators. They modify their decisions in each inner game, and finally, the first condition convergence is fulfilled at the end of 5 th inner game. In 2 nd to 5 th outer game, there are just two inner games between customers and aggregators. It shows that, except the first iteration in the outer layer, in which customers and aggregators reach an agreement after five iterations, in the following iterations in the outer layer, they reach an agreement immediately. Finally, in the 5th iteration in the outer layer, the convergence condition of the outer layer is fulfilled, and the decision-making process is finished. The final objective functions for customers, aggregators, and the DSO, in scenario 1, are 1752 ¿, -2608 ¿, and 18.89 ¿, respectively. Aggregators can set their variables in such a way that obtain a negative objective function. Hence, flexibility trading makes profit for them. On the other side, customers' objective function is positive. Therefore, flexibility trading is loss-making for them.
In scenario 2, the decision-making process is finished after four iterations in the outer layer. In the first iteration of the game in the outer layer, aggregators and customers settle on an agreement after three iterations in the inner layer. Iterations two to four in the outer layer consist of just two iterations in their inner layer. Unlike scenarios 1 and 2, in scenario 3, there are several iterations in the outer layer. The complete agreement among agents results after 18 iterations in the outer layer. However, in each game in the outer layer, there are few iterations in the inner layer (3 iterations for the first outer game and just two iterations for all other outer games). Therefore, our proposed two-layer iterative game-based framework is very efficient in scenarios 1 and 2 due to the few iterations in both layers. In addition, Although in scenario 3, there are 18 iterations in the outer layer, aggregators and customers reach an agreement immediately after few iterations in the inner layer.
As mentioned before, in scenario 1, both customers and the DSO are more limited for defining their decision variables. Moreover, in scenario 2, owing to fewer constraints, customers are freer for making their decisions. The amount of objective function of customers, aggregators, and the DSO in different inner and outer games for scenarios 1 and 2 are presented in the Figures 5 and 6, accordingly. It is observed that, while customers in the first outer game obtain income owing to the negative objective function, the DSO's decisions push them to achieve a positive objective function in other outer iterations. The negative objective function in the first outer game is owing to the initialized value of P D2L jt . However, after the DSO determines P D2L jt to solve its problem, in the next outer iterations, customers are not able to gain income regarding the limitations that P D2L jt assigned by the DSO imposes on the upper and lower band of P L2A jkt based on Eqs. (3) and (4).
In scenario 2, at the first outer game, customers' objective function is -2245 ¿ due to decisions they made according to initialized data. However, in the next outer game, the decision of the DSO at the end of the first outer game pushes customers' objective function to be -537 ¿. In the third outer game, customers' objective function increases to -434 ¿.
Finally, it settles on -444 ¿ at the last outer game. On the other hand, aggregators' objective function increases from -2583 ¿ in the first outer game to -5179 ¿ in the third outer game. It shows that in the first to third iterations of the game in the outer layer, the decision of the DSO restricts customers but paves the way for aggregators to gain more income. At the last iteration in the outer layer, aggregators' objective function increases insignificantly.

C. BEHAVIOUR ANALYSIS OF AGENTS 1) CUSTOMERS
Customers in our game model compete with aggregators in the inner game. Our results show that P L2A jkt for customers with the same aggregators have a similar pattern. It is reasonable since there is no constraint to couple customers with each other, therefore customers who have a contract with the same aggregator should have similar behavior. Fig. (7) illustrates P L2A jkt in 24 hours for 6 customers who have contract with aggregator 2. It is shown that P L2A jkt is the same for customers 11 and 14, and customers 23 and 24 because their real-time load, L jt , is the same. Furthermore, it is seen that the 24-hour curve of P L2A jkt is similar for all six customers. It means that the ratio of their traded flexibility is almost equal in all hours. Therefore, as expected, their behavior is completely alike.

2) AGGREGATORS
As mentioned in section II, according to our model, each aggregator can determine different prices for trading flexibility with their corresponding customers. Our results show that each aggregator sets an equal price for trading flexibility with its customers as seen in Fig. (8). In this way, the price of flexibility traded between all customers and their corresponding aggregators in hours 5, 9, 14, and 22 are plotted. It is observed that customers with the same aggregator have a similar price for trading flexibility. The reason behind this issue can be understood from the behavior of customers. As mentioned in the previous section, customers who have a contract with the same aggregator have similar behavior. Therefore, each aggregator behaves similarly to all of its customers and sets equal prices for them in each hour.

3) DSO
In this section, in order to investigate the behavior of the DSO, its flexibility exchanged with the RTEM in three scenarios that are shown in Fig. 9 are studied. It can be seen that in scenario 3, where the DSO is freer for determining its decision variable, in all hours, P rt t is near zero. Similarly, in the first scenario in which both customers and the DSO's level of freedom is lower, P rt t is near zero in most hours. However, in comparison with scenario 3, P rt t is more in all hours in scenario 1. On the other hand, in scenario 2, where customers can solve their problem freer, and the DSO is more limited, P rt t is very big in all hours. This trend corresponds to the DSO's objective function in different scenarios. It shows that customers' freedom causes the DSO's objective function to be very high. Therefore, customers' freedom has a very destructive effect on the performance of the DSO.

D. SCENARIO DISCUSSION
In this section, the performance of the DSO, aggregators, and customers in different scenarios are studied, and the impact   of customers and the DSO's freedom on their performance is discussed. As mentioned before, we considered three scenarios with dissimilar levels of freedom for customers and the DSO due to the presence and absence of arbitrage prevention VOLUME 10, 2022  constraints in the customers' flexibility transaction with aggregators and the DSO as described in Table 2. Thus, it is expected that customers' objective function in the second scenario, and the DSO's Objective function in the third scenario, be less than other scenarios. Table 5 represents customers, aggregators, and the DSO's objective function in different scenarios. As expected, OF E in scenario 2 is less than two others scenarios, and OF dso in the third scenario is minimum. By deciding more freely, customers can reduce their objective function from 1752.33 ¿ to -444.24 ¿ (≈ 125% reduction).
The decrease of the DSO's objective function owing to omitting one of its constraints is about 90.5% (from 18.89 ¿ to 1.78 ¿). Moreover, it is observed that OF A in the second scenario is less than in scenarios 1 and 3. Therefore, aggregators benefit from the freedom of customers. Aggregators' objective function in scenario 1 is -2608.33 ¿, while it decreases to -5230.7 ¿ in scenario 2 (≈ 100.5 % decrease). Additionally, the freedom of customers is very destructive for the DSO because its objective function in scenario 2 (4851.8 ¿) is about 256 times more than scenario 1. However, the impact of the DSO's freedom on customers' objective function is not as intense as the impact of customers' freedom on the DSO.

Since customers' objective function in scenario 3 (1799.99 ¿)
is just about 2.7 % more than scenario 1. In addition, it is interesting that, although aggregators benefit from the freedom of customers, the freedom of the DSO does not worsen their performance. As their objective function in scenario 3 is similar to scenario 1.

VI. CONCLUSION
In this paper, a novel two-layer game-based framework has been presented for local flexibility transaction in distribution systems. We also considered three scenarios with dissimilar levels of freedom while decision-making for customers and the DSO due to the presence and absence of arbitrage prevention constraints in the customers' flexibility transaction with aggregators and the DSO. The proposed model enabled us to analyze the performance of customers, aggregators, and the DSO as well as their interactions in different scenarios where arbitrage is possible or prevented. According to the simulation results, our iterative approach is converged after few iterations in both the inner and the outer layers. Besides, it has been found that all customers who have a contract with the same aggregator behave similarly while determining the flexibility traded with their corresponding aggregator. Moreover, each aggregator sets a similar price for trading flexibility with all of its customers. Furthermore, the removal of arbitrage avoidance constraint in the flexibility transaction between customers and aggregators is very destructive for the DSO as its objective function increases significantly. In addition, customers can reduce their objective function while determining their decision variables more freely. The impact of the DSO's freedom (due to removal of arbitrage avoidance constraint in the flexibility transaction between the DSO and customers) on the objective function of customers is not as destructive as the impact of customers' freedom (due to removal of arbitrage avoidance constraint in the flexibility transaction between customers and aggregators) on the DSO. Similar to customers, aggregators also benefit from the customers' freedom for solving their problems, and their objective function decreases. Finally, it is found that the freedom of the DSO for determining its decision variables does not have a significant effect on the objective function of aggregators.
MAHOOR EBRAHIMI received the B.Sc. degree in electrical engineering and the M.Sc. degree in planning and management of energy systems from the Amirkabir University of Technology, Tehran, Iran. He is currently pursuing the Ph.D. degree with the University of Vaasa, Vaasa, Finland. His research interests include power market, flexibility market, optimal operation and planning of multi-carrier energy systems, and demand response. GmbH, Stuttgart Germany, to draw technology road-map for OLI ecosystem products in energy communities, local energy and flexibility markets, peerto-peer (P2P) energy transactions, smart grids, smart homes, electric vehicle (EV) charging strategies, and coordinating research and development national and international projects at OLI Systems GmbH. His research interests include power system and electricity market modeling, power flow and contingency analysis, local energy and flexibility markets design, peerto-peer energy trading in smart grids, market-based coordination mechanisms, decentralized energy management systems, bidding strategies for autonomous home energy management systems, planning and operation of integrated energy systems, and application of machine learning algorithms on price and demand forecasting. He has previously worked as a Principal Engineer at ABB Ltd., Vaasa. He is currently a Professor in electrical engineering with the University of Vaasa. He is also the Manager of the Smart Energy Master's Program. His research interests include the protection of low-inertia power systems (including microgrids), active management of distributed and flexible energy resources in future smart energy systems and future-proof technology and market concepts for smart grids.
MIADREZA SHAFIE-KHAH (Senior Member, IEEE) received the Ph.D. degree in electrical engineering from Tarbiat Modares University, Tehran, Iran, the Ph.D. degree in electromechanical engineering and the Ph.D. degree from the University of Beira Interior (UBI), Covilha, Portugal, and the Ph.D. degree from the University of Salerno, Salerno, Italy. Currently, he is an Associate Professor with the University of Vaasa, Vaasa, Finland. He has coauthored more than 440 papers that received more than 11400 citations with an H-index equal to 58. His research interests include power market simulation, market power monitoring, power system optimization, demand response, electric vehicles, price and renewable forecasting, and smart grids. He is an Editor of the IEEE TRANSACTIONS ON  He is also the Volume Editor of the book Blockchain-Based Smart Grids (Elsevier, 2020). He is a Top Scientist in the Guide2Research Ranking in computer science and electronics, and he has won five best paper awards at IEEE Conferences. VOLUME 10, 2022