The great challenge of massively integrating the volatile distributed power-generation into the power system is strongly related to the evolution of their operation and control. The literature of the last decade has suggested two models for such an evolution: (i) the supergrid model, based on enhanced continental/intercontinental network interconnections (mainly DC) for bulk transmission, (ii) the microgrid mode, where small medium/low voltage networks interfacing heterogeneous resources, such as local generation, energy storage and active customers, are intelligently managed so that they are operated as independent cells capable of providing different services from each other and operate in islanded mode. Irrespective of the model that will eventually emerge, the control of heterogeneous distributed resources represents a fundamental challenge for both supergrid and microgrid models. This requires the definition of scalable and composable control methods that guarantee the optimal and feasible operation of distribution grids in order to satisfy local objectives (e.g., distribution grid power balance), as well as the provision of ancillary services to the external bulk transmission (e.g., primary and secondary frequency supports). Several control methodologies have been proposed to achieve these goals, and the majority of them have been inspired by the classic time-layered approach traditionally adopted in power systems that are associated with different time-scales and extension of the controlling area, i.e. primary, secondary and tertiary controls, ranging from sub-seconds to hours, respectively. In the context of microgrids, these three levels of control can be associated with a decision process that can be centralized (i.e., a dedicated central controller decides on the operation of the system resources) and/or decentralized (each element decides based on its own rules). In the current literature, the former is used for long-term, whereas the latter for short-term decisions. In particular, primary controls are typically deployed through fully decentralized schemes mainly relying on the use of droop control. With this in mind, in this thesis we propose, and experimentally validate, a novel control framework called COMMELEC â A Composable Framework for Real-Time Control of Active Distribution Networks, Using Explicit Power Set-Points. It controls a power grid in real-time based on a multi-agent structure, using a simple and low-bandwidth communication protocol. Such a framework enables a controller to easily steer an entire network as an equivalent energy resource, thus making an entire system able to provide grid support by exploiting the flexibility of its components in real-time. The main features of the framework are (i) that it is able to indirectly control the reserve of the storage systems, thus maximizing the autonomy of the islanding operation, (ii) that it keeps the system in feasible operation conditions and better explores, compared to traditional techniques, the various degrees of freedom that characterize the system, and (iii) that it maintains the system power-equilibrium without using the frequency as a global variable, even being able to do so in inertia-less systems. Our framework has been extensively validated, first by simulations but, more importantly, in a real-scale microgrid laboratory specially designed and setup for this goal. This is the first real-scale experiment that proves the applicability of a droop-less explicit power-flow control mechanism in microgrids