1. Introduction
Traditionally, trades in electricity markets were performed by large centralized dispatchable power plants and suppliers [
1]. They can trade electricity in wholesale markets based on spot and derivative markets and/or using bilateral contracts [
2,
3]. Spot markets are centralized marketplaces based on double-side auctions [
4]. Derivative markets consider standard products as a form of risk hedging against spot price volatility. Bilateral contracts are used as customized private contracts between two parties [
5,
6]. In bilateral contracts, the parties can negotiate and set their terms and conditions.
Suppliers trade private bilateral contracts with end-use consumers [
7]. They compete in retail markets for end-use consumers and buy energy in wholesale markets to satisfy their needs [
8]. The risk asymmetry between suppliers and end-use consumers is substantial, which makes suppliers request high returns to cover their investment risks [
9]. The retail price consumers pay for electricity is substantially higher when compared to the wholesale price of it, because of the suppliers’ markup but also because of the costs of power grid usage [
3]. Consumers invest in renewable generation to decrease the price they pay for electricity.
The need to reduce carbon emissions led to substantial incentives for investments in large renewable power plants but also in distributed renewable generation and storage [
10]. Now, consumers may play a more active role as prosumers by owning renewable generation and/or storage assets. The main problem is that wholesale markets only allow the participation of large agents [
11,
12]. Another issue is that these markets were designed for dispatchable players. So, players that deviate from their programmed schedules may pay high penalties [
13,
14,
15]. To overcome these limitations, end-use consumers can form local citizen energy communities (CECs).
CECs may be composed of local consumers, prosumers, producers, system operators, and storage facilities. Normally, the participants of these communities are limited by the area fed by the substation of the distribution power grid. They can save grid access costs, but their size limitation because of restricted geographical location can be an obstacle to their active participation in global markets without the need for intermediaries, such as suppliers [
16,
17]. In an early stage of development, they may be composed of small end-use consumers without generation and storage assets. Even so, by forming a CEC, they may increase their market power and negotiate better tariffs with suppliers. The main problem of CECs is that they may not have the required expertize to be active market players. So, negotiating customized tariffs with suppliers in one option than can decrease their electricity costs without exposing them to the volatility of spot prices [
8]. Against this background, CECs with diverse distributed assets can significantly increase their negotiation power during bilateral negotiations of electricity. This article focuses on the bilateral transactions of electricity through the negotiation of a forward bilateral contract between CECs and opponents (see [
18] for details about forward contracts).
An alliance is a set of self-interested autonomous agents that can negotiate rationally [
19]. A complete overview of power system alliances can be found in [
20]. In Sandholm and Lesser [
21], the authors conclude that generally allying the agents can sometimes save costs compared to operating individually. In electricity markets (EMs), an alliance can surpass the dimension limitations of single agents and directly buy electricity in the spot market or increase their negotiation power, obtaining more competitive electricity tariffs while negotiating with suppliers. The majority types of alliances have the goal of maximizing their profit as aggregators and Virtual Power Players (VPPs) [
22,
23]. CECs are similar to VPPs, but they only operate locally, and their goals consist of being sustainable and minimizing costs [
17]. They have common goals with coalitions of consumers and their main difference is that CECs may be restricted to local markets [
24]. Furthermore, CECs also aggregate local distributed generation (DG), electric vehicles, and storage facilities, while coalitions of consumers aggregate both consumers and prosumers on a wider geographical level [
17].
Concerning alliances, there are important pieces of work on formation [
19,
22], team strategies [
25,
26,
27], team decision, and team negotiation models [
28,
29,
30,
31]. Considering the increasing complexity of EMs and limitations in existing simulation tools, this paper describes ongoing work that uses the potential of the agent-based technology to develop a model to support CECs formation and management and their negotiation of bilateral contracts. Consumer and retailer agents are equipped with decision-making strategies. CECs are equipped with team strategies and decision algorithms to facilitate managing the complexity of EMs [
20]. Specifically, the purpose of this paper is threefold:
To adopt and extend a model for bilateral trading of electricity between CECs and opponents (e.g., producers, retailers, etc.); specifically, to develop team strategies for CECs;
To present a formal description of the CEC agent-based model, including its formation, the interaction between members, and team negotiation and decision making;
To describe a case study on forward bilateral contracts, involving a retailer agent and CECs, pursuing these novel strategies.
This paper builds on previous work in the area of multi-agent electricity markets (see [
32] for a complete overview). In particular, it updates the material presented in [
17,
18,
20,
33,
34] by formalizing a model for CECs and [
26,
27,
31] by introducing new team decision strategies, and it also provides an improvement to the alliances negotiation and decision-making model. It also presents a case study with real data involving the negotiation of a forward contract with a two-rate tariff between a retailer and three different types of CECs composed of end-use consumers.
2. A Negotiation Model for Single Autonomous Software Agents
Autonomous agents have generated substantial excitement in recent years considering their potential for designing and implementing complex software systems. Several real-world problems considering industrial and commercial problems were solved using agent technology (see, e.g., [
35]). Agent technology has the ability to solve problems that have multiple problem-solving entities and methods. Conceptually, a multi-agent approach in which autonomous agents are capable of flexible action to meet their design goals is a good solution to solve the problems of the naturally distributed domain of a deregulated energy market. Agent architectures have been proposed in the literature, notably the deliberative, reactive and hybrid architectures [
36]. The deliberative approach is probably the most widely used in multi-agent systems. It has an explicitly represented, symbolic model of the world, and decisions are made via logical (or at least pseudo-logical) reasoning; thus, it is adopted within this work.
Traditional negotiation is normally hard to manage, disposed to misinterpretation, and time-consuming [
37]. Time matters in negotiation, i.e., negotiation, as with other forms of social interaction, often proceeds through several distinct phases or stages [
38]. The pre-negotiation consists in preparing and planning for a negotiation. It involves the creation of a well-conceived plan specifying the activities that negotiators shall attend before starting negotiating. It is the key to prosperous negotiation [
39]. The actual negotiation is the process of moving toward agreement, and it typically involves an iterative exchange of offers and counter-offers [
40]. Three different agreement types are commonly identified in the negotiation literature [
41]: a compromise agreement, an integrative agreement, and a Pareto optimal agreement [
42]. The post-negotiation process addresses the closing task of building commitment and implementing a mutually acceptable agreement.
Agreements are not forever, because all have appended to them a temporal clause [
43]. Hence, when building lasting agreements, the parties shall carefully analyze the chances of self-destruction from considerations of ex-post unfairness, surprises, new information, illegitimacy, and changed alternatives [
41]. In short, they shall carefully analyze in advance the costs incurred for not complying with agreements. The bilateral negotiation model has a structure with several stages. In this paper, the focus is on the pre-negotiation and the actual negotiation phases. This model was already published in other articles. So, for a full description of the model, please check [
44] and also check the initial application of the model for coalitions in [
31] and CECs in [
20]. The additive model is probably the most widely used in multi-issue negotiation: the parties assign numerical values to the different levels on each issue and add them to get an entire offer evaluation [
42]. This model is simple and intuitive; therefore, it is well suited to the purposes of this work. A negotiation can end with an agreement or not. So, the use of strategical concession tactics shall be considered for the achievement of successful agreements [
38,
44,
45,
46].
3. A Negotiation Model for Alliances
A CEC is a type of alliance in the power system. To form a CEC, agents may have similar goals. They interact, negotiate and potentially achieve an agreement. All agents can leave the CEC or join a new CEC until they sign a compromise contract (see
Table 1).
Definition 1 (Customer agent).
Let be the set of customer agents; these agents do not have any negotiation responsibility and just provide their requirements and flexibility and in case of independence, they also incorporate the same decision-making mechanism of the negotiation agents established in the “Least-acceptable Agreement, Acceptable Agreements" definition described in [44] that gives them the choice of leaving or not the CEC and also the capacity of voting for the acceptance or not of a proposal. Definition 2 (Negotiation agent).
Let be the set of negotiation agents; these agents have negotiation strategies and tactics and are equipped with the negotiation model defined in Section 2. Definition 3 (CEC agent).
Let be the set of CEC agents, composed of both customers and negotiators of several local types of agents: consumers, prosumers, storage facilities, local producers, local distribution operators, etc.
So, a CEC may be considered a set of agents with at least one negotiation agent that allies to achieve their individual goals. Inside the CEC, all members are defined by an autonomous agent with an index starting in 1, } where i is the number of members of the CEC.
3.1. Formation
Definition 4 (Formation).
The formation is the stage where two or more of the aforementioned agents ally and form the initial structure of the CEC.
Table 1 resumes the different types of formations. Increasing the complexity of CECs will also increase the ambiguity between the members, which gives extra importance to the interaction between them in the next phase of the model.
3.2. Interaction
Definition 5. (Interaction).
Considering a CEC, the interaction is the phase that consists of the communication protocol between all members of the CEC.
The CEC has a mediator to communicate with members and opponents (see [
20] for a complete description of the different types of interaction). The mediator uses a contract net protocol to communicate with CEC’s members and an alternating offer bilateral protocol to negotiate with opponents [
47,
48].
Table 2 presents the different types of interactions in CECs.
In an informative interaction, the members only receive information about their contracts. Responsive interactions allow members to answer the mediator’s requests. Limited interactions allow members to start interacting with the mediator. Complete interactions allow members to also communicate with each other.
3.3. Negotiation and Decision
Negotiation and decision are inter-related and depend on the type of CEC and on the team strategy chosen by its members.
Definition 6 (Negotiation).
Let be the set of autonomous agents and be the CEC, while agent corresponds to an opponent agent, agent corresponds to the representative mediator of the CEC. In the negotiation phase, all negotiation agents are requested to negotiate following the negotiation model for single agents. The mediator collects the members’ and opponents’ offer and starts a voting process according to the selected team strategy; i.e., they request members to vote for their preferred offer. The negotiation and decision phases coexist. If the selected offer is from the members, it may be sent to opponents as a counter-offer; otherwise, the mediator accepts the deal with the opponent.
Definition 7 (Decision).
Let be the representative mediator; when it receives proposals, it may accept the best proposal or request a voting process to decide according to the selected team strategy. The decision process depends on the selected team strategy and concerning the individual model defined in Section 2 it adds the voting process. Team Strategies
Team strategies are used to define how decisions are taken. These strategies can be used by team alliances, as CECs. Team strategies shall be selected according to the type of CEC to maximize the social welfare of all members.
- (i)
Representative Mediator (RM):
Although the context of this strategy has been introduced in [
25,
28], it suffers some changes in the present model. The RM strategy is probably the simplest team strategy. Team members delegate team decision making to a representative mediator
, which, in this case, is the trusted mediator. This representative directly communicates with the opponent. It is also in charge of deciding which offer
shall be sent to the opponent
, and whether the opponent offers
shall be accepted or not. Given the fact that the representative does not know other members’ utility functions, it uses its utility function during the negotiation process to make decisions. The negotiation strategy employed by the mediator has been agreed upon before the negotiation by all members. The mediator selection can be formalized as follows:
Now, the mediator agent will adopt its own negotiation strategy. A concession strategy
for
is a function with the following general form:
where
- (i)
For each issue , is a concession tactic;
- (ii)
is the offer of for period t of negotiation;
- (iii)
;
- (iv)
is the utility of the least-acceptable agreement for , i.e., the worst (but still acceptable) agreement for .
- (ii)
RM with individual decision making (RM-IDM): This strategy is similar to the aforementioned strategy; the main difference is that it increases the responsibility of the members by adding the request for voting the acceptance or rejection of the proposal calculated by the mediator and also the proposal accepted by the mediator (sent by the opponent). This change in the previous strategy can increase the CEC’s utility by giving more responsibility to its members. The mediator followed the same negotiation strategy defined in Equation (
2); the main difference is when it proposes a proposal (
), it must be accepted by at least 50% of the members by the following voting process:
If the number of positive votes (1) is higher or equal to the number of neutral votes (0), the RM sends the proposal; instead, it withdraws the negotiation. The RM uses its utility function to decide the acceptance or not of the proposal. It wants to accept a proposal if the received proposal,
, gives a higher utility than its proposal,
:
In this case, it sends the proposal (
) for all members to start the voting process:
The proceedings of this voting process are equal to the previous one. If the RM wants to reject a proposal and withdraw the negotiation with an opponent (see the negotiation strategy in Equation (
2)), it just has to inform the members that it will terminate the negotiation.
- (iii)
Similarity Simple Voting (SSV):
This strategy is also introduced in [
25,
28] and adapted to the presented model by the introduction of some changes, specially in terms of decision making. As opposed to RM, this strategy tries to consider all members’ decisions during the negotiation process. The strategy aims to avoid low-quality results when the preferences of each member are very dissimilar. In this strategy, it is assumed that agents have similar negotiation skills and social power. For this purpose, SSV relies on voting processes and majority rules in each negotiation round to determine whether an opponent’s offer shall be accepted or not as well as which offer is sent to the opponent. In this team strategy, the trusted mediator has a more important role since it coordinates the voting processes.
Assuming that the negotiation process is currently positioned at round
t, the mediator opens an offer proposal process where, firstly, each member proposes an anonymous offer to the mediator. Each member uses its utility function
. Then, the mediator agent (
) makes public the set of offers received
, and a voting process is opened. Agents anonymously state which offers from the set
they would be willing to send at round
t. For that purpose, they employ an acceptance criterion
where an offer proposed by a teammate is acceptable if the utility it reports is greater than or equal to the utility indicated by its own utility function at round
t. The trusted mediator gathers the opinions of all members, and then, the most voted offer
is selected to send to the opponent. This offer is broadcasted by the mediator to the members and the opponent. When there is more than a single most voted offer, different criteria are followed. If there are proposals with fewer votes than the most voted ones, those proposals are discarded, and a new voting process starts with just the most voted proposals. Instead, if all proposed offers have the same number of votes, one of them is chosen considering the mediator’s utility, the total CEC’s cost of it or randomly. The mechanism employed by team members to determine which offer is proposed to the opponent can be formalized as follows:
where
is the voting process of agent
, and
is the index
j proposal received by agent
(the proposals and the votes are private, just the mediator has information of it):
Considering the received offers from the opponent followed the same criterion of Equation (
5).
- (iv)
Majority Simple Voting (MSV):
This strategy is similar to the previous one, the only difference is more than 50% of the members must agree in the voting process defined by Equation (
6). So, more than half of the members must vote for the acceptance (1) of the same proposal in Equation (
6) to have a proposal ready to send to the opponent agent.
- (v)
Consensus Simple Voting (CSV):
In this strategy, at least 75% of the members must agree on one proposal to send, which normally increases the global utility of the CEC compared with the previous strategies.
- (vi)
Unanimous Simple Voting (USV):
The main difference between this strategy and the three aforementioned ones is that in this strategy, all members of the CEC must agree on one proposal to send. So, it increases the difficulty of the agreement but guarantees the satisfaction of all members.
- (vii)
Similarity-Based Unanimity Borda Voting (SBV):
The previous team strategies have the problem of using a majority rule. So, it is more difficult to reach a consensus when the selected offers do not satisfy every member (some members shall leave the CEC to obtain unanimity). In addition, the type of voting system employed does not provide information about which offers are more acceptable than others for members. In the SBV strategy, majority rules are discarded and unanimity rules are used to solve the problems stated above. This strategy was introduced in [
25,
28] and adapted to the presented model, specially by introducing the opponent’s proposal for voting together with all the members’ proposals, appearing after in the obtained ranking.
The communication protocol used within the team to select which offer is sent is similar to the one presented in the SSV strategy. The main difference resides in the fact that borda voting is employed to rank proposals. This voting system has the advantage that it usually selects broadly accepted proposals instead of majority proposals:
where
determines the order of the offer
and also the order of the received offer by the opponent
according to an ascending order by utility reported to
. The worst offer in
ranking is classified with zero votes and the best is classified with
votes where
i is the number of members of the CEC. Offers are proposed by agents following the similarity heuristic employed in SSV. If the opponent’s offer,
, is the first of the ranking, then it is accepted; instead, a counter-proposal equal to the ranking’s first proposal is sent to the opponent (see [
49,
50] for a better understanding of this method).
- (viii)
Similarity Distinction Voting (SDV):
The decision process of this strategy is identical to the SSV; the only difference is that with this strategy, the number of votes is not equal to all CEC members. This strategy provides to the members with a higher weight, a higher number of votes,
. (e.g., a small agent may be entitled to one vote and a larger agent may have the right to ten votes). This strategy differentiates from those who contribute more to the negotiation power of the CEC from the others, causing them to have more decision power.
A resume of the differences between the previous types of team strategies can be found in
Table 3.
3.4. Auxiliary Metrics to Evaluate the Performance of CECs
In previous work, the results show that local agents may decrease their costs with electricity by forming CECs [
17]. Preliminary results also indicate that by forming an alliance, the members can benefit from a tariff reduction and minimize their final cost with electricity and also maximize their utility [
31].
Definition 8 (Individual’s cost).
Let be a member of the , its cost is the total cost that it will have to pay in the CEC’s deal (in this model, we only computed the costs with energy): where is the price that has to pay for its requested electricity quantity of issue k;
Definition 9 (CEC’s Cost).
Let be the CEC; its total costs are equal to the sum of the individual costs of each member: where is the price that all members of the CEC have to pay for their requested quantity of electricity of issue k;
Definition 10 (CEC’s average utility).
Let be a CEC’s member, the utility of this agent is and the average utility of the CEC is equal to: Considering that each member can have a different weight to the CEC, the CEC weighted utility is equal to:
Definition 11 (CEC’s weighted utility).
Let be a member of the CEC, the utility of this agent is and the weighted utility of the CEC is equal to: where in this article, the weight of the agent in the CEC is equal to the value obtained by Equation (16) (other types of formulation to compute its weight can be addressed), where is the total energy quantity required by this agent and for the entire CEC. 4. Case Study
This section presents a case study where the agents form three different types of CECs to negotiate a new tariff with the retailer. This case study was performed using real data of existing buildings in the United Kingdom (UK) during the period 2014–2015. These data were obtained through the ecoDriver website (
http://www.ecodriver.co.uk, (accessed on 27 July 2022)). The eight agents studied in the article are defined as:
- (i)
: Department for Transport headquarter building, Great Minister House, London.
- (ii)
: Ministry of Defence Main Building in Whitehall, London.
- (iii)
: The UK Department for International Development, London.
- (iv)
: St George’s College, Weybridge, London.
- (v)
: St George’s Junior School, Weybridge, London.
- (vi)
: Ludgrove Preparatory School, London.
- (vii)
: Thames Ditton Infant School, London.
- (viii)
: Ashley C of E Primary School, London.
The data related to these agents are defined in the following
Table 4.
In this case study, the aforementioned agents start by forming three different CECs.
is obtained through the formation of the three first agents: three buildings that belong to the state and are used by three different departments of the government. In this case, it is considered that these three agents are negotiation agents and this CEC is a sectored type of CEC.
results from the formation of two agents of the same company (school), and it is a dependent aggregated type of CEC.
are obtained through the formation of three different agents from the same sector (education), and in this case study, it is considered an independent aggregated type of CEC.
Table 4 presents the most important data for conducting this case study. The actual tariff, energy, and actual cost (i.e., the yearly cost of electricity) were obtained by analyzing real data from these agents provided by ecoDriver for the period 2014–2015. We used the data from 2014 to set up the variables presented in
Table 4 and negotiate the tariffs to 2015. The actual cost is computed according to the real 2015 tariff. The previous goals and limits for the tariff were obtained from assumptions of the knowledge bases and beliefs of the agents concerning the UK electricity market and market competition. The initial prices (or actual goals) and price limits were obtained by the upgrade of the knowledge bases and beliefs of the agents by a learning process of each agent when they join the CEC (they have access to all members’ tariffs and information about the electricity market). All negotiation agents have negotiation strategies which are different according to their degree of expertise. More information about their negotiation strategies can be found in [
31]. All the other variables presented in the table are obtained through calculation and can be found above in
Section 3.4, which includes the metrics for evaluation of CECs performance.
Table 5 has the main parameters of CECs evaluation. In
, agent
was chosen to be the mediator (although many ways of choosing the mediator can be followed; in this case, we chose the agent that has the actual tariff, which maximizes the CEC’s utility).
The other CECs are restricted to the use of representative strategies because they only have one negotiation agent. Concerning representative strategies, in the case of the RM agent of the CEC being expertise in negotiation, there will be no differences in the results of RM and RM-IDM strategies (example of and ). Otherwise, it is more beneficial to have all members deciding for the acceptance of a proposal to increase the utility of the CEC (example of ). is the only one that obtained a worse tariff and consequently a worse utility. This happens because in the previous tariff, these agents were already aggregated. So, although they want to negotiate a better tariff, this is a normal increase in the tariff because nothing changes since they negotiated the previous tariff.
Concerning simple voting strategies and because has only three members, the results of SSV and CSV will be the same as the results of MSV and USV, respectively. Comparing the simple voting strategies, it was verified that it is better to have a CSV or USV strategies. However, because agent is more expertise than the others, using a SSV or MSV can be more appropriate. Although the SSV and MSV strategies give a higher utility (0.81), the CSV and USV reduce the costs of the entire CEC and therefore increase its benefit by 60,978.42£. This happens because agent is in the minority. So, agents and by giving a higher priority to the night tariff, accepted the obtained tariff in the SSV and MSV strategies, and all agents accepted the tariff obtained in the CSV and USV. This also can be verified by analyzing the weighted utility in this case. Although the use of SSV and MSV strategies increases the utility cost because agent has more weight in the CEC, the CSV a USV increases the CEC’s benefit and the weighted utility.
The distinctive voting strategy (SDV) has the same results as the RM because agent has more than 50% of the weight of the CEC, having all the power in the decision process. Comparing all strategies, in the case where the CEC has only one negotiator expertise, using the RM strategy will be a good solution and easy in terms of negotiation complexity, but normally, a borda voting strategy (SBV) increases the CEC utility. However, it is more complex in terms of negotiation which can increase the duration of the negotiation process and may lead to an impasse or even to the end of the negotiation if it exceeds the opponents’ deadline. In this case study and in general, the SBV strategy is the best strategy to use in the case where the deadline is not an issue, because it leads to higher utilities compared with the others strategies.
In this case study, can be observed that the smaller and the worse negotiators benefit more in joining a CEC because of the dimension and bargaining power of the other agents. This can be verified by comparing the benefits of the members of
. Agent
is the agent with more dimension and bargaining power of
(see
Table 4), and who benefits less by joining this CEC (see
Table 6).
Analyzing
Table 6, it can be verified that beyond the members of
(as explained before), also the agent
from the
has a negative benefit by joining this CEC. This is the main problem of CECs with representatives because they can negotiate following their interests and try to maximize their benefit instead of the CECs’ benefit. It will be even worse if the representative is a bad negotiator because that can prejudice the entire CEC. So, the choice of the CEC’s representative is a very important step, especially in aggregated formations. If any of the members is a negotiation expert, the members shall be more active, passing from customers to negotiation agents, which allows selecting other team strategies. Indeed, by being customer agents, the members of CECs 2 and 3 rely on the mediators of their coalitions to define and negotiate tariffs. In the case of all members being negotiation agents, it shall be possible to achieve better deals for all members as in the case of
.
5. Conclusions
This article described the key role of citizen energy communities (CECs) in liberalized electricity markets. It presented a model for single agents that has been adapted to a model for aggregated agents, such as CECs. This article presented and adapted a model of coalition formation to CECs, describing the main phases of the model. This model consists of team formation, interaction, negotiation, and decision processes, using several intra-team strategies, some of them used in worldwide team decisions.
It has been presented as a case study to analyze the impact of CECs of several service buildings, and despite preliminary findings, the results prove that the members of well-organized and structured CECs have economic benefits. The case study considered the formation of three different types of CECs. The first was well formed with a proper mediator, the second had no relevance to the opponent, and the third had a bad mediator. It can be verified that in the first CEC, all members have a positive benefit, in the second CEC, all members have a negative benefit, and in the third CEC, one of the members was harmed due to the bad choice of the mediator. Against this background, it can be concluded that in the case of using representative strategies, the choice of the mediator is very important to negotiate better tariffs. In the case of any member of the CEC being a negotiation expert, the majority of the members shall have active participation in the negotiation and decision phases, selecting different team strategies to avoid the negotiation of bad deals.
The presented team model can be used by CECs considering different configurations and types of players. It can be used considering the direct negotiation of contracts with suppliers and/or producers, or it can be adapted for their active participation in wholesale markets. In the last case, members will propose and vote on the best bids to submit to spot and derivatives markets without negotiating with opponents.
Considering the worldwide goals of power systems with near 100% renewable penetration, allowing the active participation of small distributed assets as part of local energy communities may be crucial to provide power systems the flexibility they need to operate securely. Future work is intended to study other types of CECs, introducing distribution generation, prosumers and storage, and also new types of team strategies adapted to the electricity sector. It is intended to evaluate these types of CECs and strategies in the presented model.