*3.12. Retailer*

Electricity retailers are entities that bridge the gap between consumers and the wholesale markets [60]. The activities of this agen<sup>t</sup> do not change significantly from the traditional one. They buy the electricity in the market and sell it to their customers. Nevertheless, in the proposed model, the self-generation becomes a common possibility for small customers, being the interaction for these customers directly handled by retailers. These interactions translate in contracts with consumers to absorb the self-generation excess and economically compensate them afterward.

The retailers do not have specific components on their assets. They play a role of intermediary, thus owning strong communication and prediction systems for optimizing their performance.

This agen<sup>t</sup> needs to interact for energy trading with wholesale and local markets. They can also sign these transactions through bilateral contracts with generators and VPPs. For these reasons, they need reliable and secure communication and information channels. Moreover, according to the proposed architecture, retailers are also allowed to interact with customers and aggregators for portfolio balancing purposes, needing for that the capability to interact through dynamic pricing (not control capabilities) with the customers. They are also responsible for implementing the self-consumption or net balance contracting, needing for that information about the customer buying and selling electricity. Retailers are also responsible for paying the fees in representation of consumers to the di fferent market operators. In sum, interactions between retailers are with customers, aggregators, VPPs, generators, and market operators.

#### *3.13. Conceptual Architecture and Interactions among Agents*

The above-described agents establish a series of relationships among them as summarized in Table 2. More specifically, the figures below map the di fferent interactions that take place in the newly proposed conceptual architecture. Thus, these figures explicitly depict each of the transactions above explained.

Figure 6 shows the transactions among agents associated with the physical commodity (electricity), which can be due to power, operation services, or balancing requirements. The blue arrows show transactions among agents related to energy; for instance, generators can supply power to the grid if they are connected to generation. In contrast, if they are connected to the distribution grid, they can supply its energy to the grid or through a VPP if their capacity is small. Another example can be storage, which has the capability to provide or purchase electricity from the grid. Depending on which grid (transmission or distribution) it is connected to, the energy fluxes will vary. The green arrows represent the operation service transactions. These are related to frequency and voltage control, energy imbalance, or system protection [21]. It can be seen that these transactions are applied to the transmission or distribution grid, depending on which grid the resources are connected to. Afterward, these operation resources at the distribution level can be managed at higher levels by the TSO thanks to the communication between DSO and TSO.

Figure 7 shows the economic transactions among agents, di fferentiated depending on if they are associated with an energy supply, bilateral contracts, operation services, balancing of own assets, fees, and grid usage transactions. Thus, blue arrows refer to an economic paymen<sup>t</sup> associated with a power exchange, dashed blue arrows show energy bilateral contracts, green arrows represent payments related with operation services, green dashed arrows represent payments for balancing portfolios or demands, orange arrows represent fees, and gray arrows represent taxes for the usage of the grid. For instance, aggregators receive payments for operation services from the DSO, TSO, and VPP, but they pay these operation services to consumers. Retailers buy energy from wholesale and local markets and bilateral contracts with VPPs and generators. Afterward, this energy is sold to consumers that pay for it. On the other hand, the transmitter agen<sup>t</sup> and the distributor agen<sup>t</sup> only receive payments associated with taxes, which are only paid by consumers, storage, and generators, the agents that are considered the final users of the infrastructure. Specifically, only agents connected to the distribution grid pay to the distributor.

Finally, some agents associated with energy services can also balance their own portfolio to optimize their performance in the market. These last arrows can be seen as green dashed lines.

**Figure 6.** Conceptual architecture with physical transactions.

**Figure 7.** Conceptual architecture with economic transactions.
