## 2 Theoretical Background
### Virtual Power Plants  
A Virtual Power Plant is an aggregation of physical devices (dispatchable and stochastic generators, storage units, and controllable or flexible loads) that forms a virtual entity that interacts with supervisory levels (usually uG controllers) to provide improved monitoring and control functions over multiple DERs [27]. VPPs are already mature and widely used instruments for the control of DERs in uGs and SGs, and the concept alongside virtualization has been recognized to be highly beneficial for the development and control of future UESs [19; 20; 21; 22; 23; 24]. However, their implementation and architectures are still rooted in the centralized control paradigm, where central control units are allowed to take the full control of low-level resources. In [28], a meta-heuristic algorithm, the Imperialist Competitive Algorithm, is used as VPP control strategy to minimize the total system costs of a collection of several DERs, including RES generators, storage units, and controllable loads, over a time horizon of 24 h. The aim is to optimize the operation costs of DERs installed at different points of the distribution network by collecting resources which are owned by different stakeholders and that are usually dispersed throughout the grid. DSM schemes in this case are also considered, but their implementation is still designed according to the centralized control paradigm, where a central intelligence unit (hosted by the utility) is responsible for the computation of the optimal working point of all of the supervised DERs. In [29], a hierarchical structure of VPPs is proposed for the management of different aggregations of power generators, storage units, and flexible loads, by introducing the role of the VPP Operator (VPPO). The VPPO, who may be an independent operator or the distribution system operator, is responsible for the management of the supervised VPPs and implements the coordination with market and utility operators. The control of DERs in each VPP is operated by means of distributed intelligence devices installed at the local level, while the related control functions are computed at the VPPO level. DSM schemes are also taken into account in the form of both transactive and price-based actions. It is worth noting that, again, this architecture is ruled by a centralized control perspective, where operational planning strategies are predominant with respect to the prosumers' decisions. The specific application of DR schemes in the context of a VPP aggregating loads and RES generators in a distribution grid has been proposed in [30]. In this case, single customers are required to promote DR bids on candidate load profiles, and an independent operator is responsible for the final selection of individual profiles by pursuing the optimization of total system costs. Similarly to [30], in [31] a bidding strategy for the operation and management of a VPP is proposed, by considering DR strategies and RES uncertainty. In both of the proposed studies, operational plans and optimization strategies are computed at supervisory levels by considering the aggregated DERs only as dispersed generation or consumption units with limited decision capabilities. Even though this approach can be considered reasonable for large RES installations, such as large wind farms or Photovoltaic (PV) plants (with capacities in terms of hundreds of kW), which are mainly used for bulk electricity generation and directly participate in wholesale electricity markets [32], we argue that its application for small DERs is at least doubtful. Small residential DERs (such as small PV or DESSs, with capacities in terms of few kW) are in fact mainly intended for local energy generation and consumption [33] and are usually involved in feed-in tariff schemes [34], which reward the amount of energy produced. For this reason, it is apparent that the direct control of small residential DERs by means of centralized systems would inevitably collide with the economic interests of such users [35; 36].