This paper introduces an optimization-driven platform designed to procure ancillary services and execute demand response initiatives. This research represents a collaborative endeavor involving the Italian Transmission and Distribution System Operators (TSO and DSO) alongside active local prosumers, conducted within the framework of the LIVING GRID demonstration and innovation project. Functioning entirely as a software architecture, the platform integrates with the prosumers’ existing supervisory and control systems. It incorporates optimization models, transmits setpoints for active and reactive power, and facilitates both intentional islanding and demand response operations across specific segments of microgrids and distribution networks. The study evaluated two distinct configurations: Single Point of Connection (PoC) and Multi-PoC. Experimental outcomes from both the optimization model and real-world field tests are detailed and analyzed for the chosen pilot location: the Savona Campus Smart Polygeneration Microgrid at the University of Genoa, Italy.
The accelerated expansion of distributed generation and intermittent renewable energy sources has driven the need to formulate novel management strategies and controllers for smart grids. This necessity arises from the operational difficulties introduced by frequency and voltage instabilities associated with renewable power, which adversely affect the broader electrical system. Furthermore, the intensified load-following demands placed on conventional fossil-fuel power plants to compensate for renewable variability compromise the longevity of their infrastructure. This paradigm is further complicated by the proliferation of small-scale distributed energy resources, which could ultimately integrate millions of individual producers into energy and ancillary service markets.
To navigate these obstacles, novel technologies and market participants have been introduced, notably Aggregators and advanced information and communication technology (ICT) platforms. An Aggregator, for example, can orchestrate and curtail consumer energy consumption to mitigate grid emergencies and localized congestion. Under certain conditions, particular segments of the distribution network may also be required to function in an islanded state. As a result, network managers, including the transmission system operator (TSO) and the distribution system operator (DSO), are broadening their operational scopes and embedding sophisticated tools into their current ICT frameworks. This evolution supports the power grid’s shift toward highly adaptable electrical infrastructures, necessitating robust data administration, advanced remote-control functionalities, and precise forecasting of flexibility, demand, and renewable generation [1-4].
Representing sustainable energy communities and localized grid segments, microgrids depend on specialized local energy management systems (EMS). These platforms are fundamental for anticipating and broadcasting flexibility parameters to the day-ahead market, as well as for autonomously directing field-level operations in response to DSO dispatch signals. Experimental test-beds are vital for verifying the practical viability and performance of the tools, methodologies, and models deployed in this context [5].
The capacity to supply ancillary services to transmission grid operators has broadened to encompass a diverse array of end-users, largely due to the advent of new balancing service providers such as Aggregators. These entities are equipped to aggregate the flexibility of numerous small-scale consumers and bid it to System Operators. Within Italy, this concept was initially investigated through preliminary pilot programs [6] and has now reached an advanced level of maturity.
Nevertheless, multiple unresolved challenges remain, particularly concerning the collaborative coordination between the TSO and DSO, as well as the DSO’s ability to procure localized flexibility services. At present, Italian regulations permit only the TSO to engage in balancing and ancillary service markets. Conversely, the DSO is restricted to requesting consumer modulation solely for security purposes—specifically, when the safe operation of the distribution grid is actively threatened. Recently, in response to the enactment of EU Directive 2019/944 [7] and its subsequent integration into national law, the Italian Regulatory Authority for Energy, Networks, and Environment (ARERA) has launched pilot initiatives to investigate the provision of localized flexibility services directly to the DSO [8].
While numerous academic publications have conceptualized and evaluated prospective frameworks for localized ancillary service markets [9, 10], this article concentrates on assessing the technical viability of a unified platform that allows both the DSO and TSO to solicit flexibility interventions from active participants integrated into a local distribution grid.
The empirical research detailed in this manuscript was executed as part of the LIVING GRID project (2017–2020), operating under the Italian Technological Innovation Cluster on Energy. The consortium encompassed multiple institutional partners, including ENEA (Italian Energy and Environmental Agency), TERNA (Italian TSO), e-distribuzione (Italian DSO), RSE (Research for the Energy System), CNR (National Council of Research), and EnSiEL (National Inter-University Consortium for Energy and Electrical Systems, featuring research divisions from the University of Genoa, the Polytechnic of Turin, and the Polytechnic of Bari).
The primary goal of the LIVING GRID initiative was to design and empirically validate a prototype ICT framework that empowers both DSO and TSO personnel to issue time-specific flexibility directives to prosumers. These directives include targeted constraints on active and reactive power flow at designated electrical buses, along with temporary limits on line power transmission. The platform subsequently routes these directives to the accessible infrastructure of active users within the local distribution grid, mobilizing assets such as distributed generators or demand response initiatives via controllable loads.
Additionally, the project sought to validate the operational feasibility of a strictly software-based architecture that relies exclusively on the pre-existing supervisory and control hardware at the prosumer’s facility, eliminating the requirement for supplementary hardware installation. This specific phase of the research was collaboratively executed by Terna, e-distribuzione, and the University of Genoa.
To thoroughly evaluate the architecture, two distinct operational scenarios were formulated, encompassing active consumers of varying technical capabilities and structural complexity. The initial scenario involved transmitting DSO/TSO signals directly to standalone assets, such as battery storage units or photovoltaic arrays, thereby replicating the dynamics of smaller consumers possessing singular distributed resources. The alternative scenario routed platform directives to the centralized Energy Management System (EMS) of a microgrid, illustrating a substantially more sophisticated user. This configuration additionally assessed the system’s capacity to execute the intentional islanding of a microgrid subsection. A bespoke EMS, specifically engineered to process the platform’s flexibility directives, was created for this second scenario.
A further aim of this research phase was to confirm that the proposed platform could function seamlessly utilizing the proprietary communication protocols and data links already integrated within the participating assets. This included photovoltaic systems, energy storage units, microturbines, HVAC systems, and the overarching SCADA (Supervisory Control and Data Acquisition) framework of the microgrid, ensuring operability without mandating the integration of new metering, communication, or control hardware.
The practical demonstration phases documented in this study were executed at the Savona Campus Smart Polygeneration Microgrid (SPM) pilot facility. This installation encompasses an “intelligent” 3-phase low voltage (400 V line-to-line) distribution network coupled with a thermal grid containing distinct electrical/thermal loads and power generation assets, notably microturbines, photovoltaic arrays, and heat pumps.
The electrical topology of the SPM is structured as a ring circuit, featuring a primary distribution switchboard interconnected with five secondary switchboards that service various loads, generation plants, and a Smart Energy Building (SEB). The primary technological assets integrated into the SPM include dual gas-fired cogeneration microturbines, three independent photovoltaic generation plants, an electrical storage system, absorption chillers, and a centralized gas boiler. The overarching SPM infrastructure is monitored and governed by a comprehensive ICT network encompassing field data acquisition modules, local automation devices, a centralized SCADA system, and remote terminal units that function as localized controllers for specific plant subsections. Equipment and sensor communication is facilitated via established protocols, including IEC 61850, Modbus, and BACnet.
In summary, the primary contributions of this paper are outlined as follows:
· Development and empirical validation of a platform architecture collaboratively designed by key smart grid stakeholders (TSO, DSO, active local prosumers) to facilitate demand response and intentional islanding.
· Formulation of a novel optimization model engineered to determine the most efficient operational schedules for storage systems and production plants, as well as to coordinate the deliberate islanding of localized grid sectors.
· Comprehensive analysis of the practical field experiments conducted under the auspices of the National LIVING GRID project by the Italian Technological Innovation Cluster on Energy.
In recent academic literature, numerous studies have investigated demand response (DR), aggregators, and Energy Management Systems (EMSs) within the context of smart grids [11-13]. The primary emphasis of these works generally centers on the models, methodologies, and ICT frameworks used to implement DR. Nevertheless, most publications fail to incorporate collaborative dynamics between the DSO and TSO, or they lack empirical reporting on large-scale, real-world field experiments extending beyond controlled laboratory conditions.
Demand response represents one of the most critical mechanisms through which smart grids establish their economic viability. As indicated in Refs. [14, 15], DR initiatives enhance the overall reliability of the power system and reduce peak energy demand, which subsequently minimizes total capital and infrastructure investments while deferring the necessity for grid expansions. A comprehensive overview of the myriad opportunities and challenges associated with DR is detailed in Ref. [16]. According to Ref. [17], DR constitutes a strategic framework that empowers consumers to actively participate in smart grid operations, achieving this either by curtailing peak loads or by reallocating electricity consumption from peak to off-peak periods. An intriguing methodology is detailed in Ref. [18], where researchers introduce a linearized multi-objective robust optimization model designed to evaluate various DR strategies with respect to consumer and retailer expenditures. Furthermore, Ref. [19] categorizes DR into two distinct classes: incentive-based DR and price-based DR. In the former, utilities offer consumers direct incentives to modify their consumption behaviors in alignment with grid requirements. In the latter, the fluctuating benefits of the wholesale electricity market are directly relayed to consumers, allowing them to pay variable electricity rates corresponding to different times of the day. Among studies examining incentive-based DR, the authors of Ref. [20] explore the paradigm from the standpoint of a microgrid operator. Their objective is to establish optimal DR incentives for customers while ensuring economic feasibility for both the microgrid operator and the participating DR consumers, explicitly integrating customer discomfort into their optimization parameters.
Concerning price-based DR initiatives, a compelling study is introduced in Ref. [21], detailing an optimization model anchored in dynamic price-based DR that incorporates renewable energy sources alongside both deferrable and non-deferrable loads. The two evaluated scenarios utilize particle swarm optimization to resolve the outlined problem. Another valuable contribution is found in Ref. [22], where researchers formulate a DR scheduling framework for intelligent residential communities, driven by load dispatch coordinated via a load aggregator. By integrating interruptible loads with diverse price-based DR programs, the authors successfully optimize the scheduling of residential loads.
From an ICT perspective, Ref. [23] evaluates Distributed Energy Resources Management System (DERMS) platforms, identifying them as essential instruments for orchestrating Distributed Energy Resource (DER) units and microgrids to provide flexibility services and enhance distribution network stability. In Ref. [24], Reilly outlines a microgrid-oriented DERMS capable of participating in broader energy markets as well as transmission and distribution system operations. Specifically, the introduced DERMS enables utilities to control individual DERs, transmit market signals to aggregated DER clusters, and supply ancillary services. In Ref. [25], the researchers present a methodology to improve the critical load restoration capabilities of distribution systems by leveraging DERs. They formulate a two-stage optimization framework for critical load restoration that utilizes DER control coordination alongside the DSO-DERMS interaction model. The primary distinction between the current work and the studies in Refs. [23-25] is that the proposed platform not only governs the interactions between DERs and either the TSO or DSO, but also concurrently manages the interface between the TSO and the DSO. Consequently, the TSO can leverage this platform to dispatch requests to DERs, provided it receives authorization from the DSO, which utilizes the DERMS interface to verify that the TSO’s directives comply with the operational constraints of the distribution network.
Within the DERMS architecture, algorithms are fundamental for optimizing diverse operational functions. An extensive analysis in Ref. [26] proposes a novel real-time algorithm tailored specifically to solve optimal power flow challenges and effectively regulate PV and DER installations across expansive distribution networks. Another significant advancement is presented by Peppanen et al. [27], introducing a tool designed to manage PV plant curtailment within distribution grids. Their methodology employs an iterative load flow algorithm to enhance control capabilities and ensure optimal resource utilization. Additionally, in Ref. [28], researchers apply a reverse Stackelberg game-theoretic framework to regulate energy systems, offering a fresh paradigm for optimizing and managing energy system performance. Morrissey et al. [29] construct a bi-level algorithmic structure where the upper tier executes strategic day-ahead scheduling for DERs based on load and PV forecasts.
In contrast, the lower tier handles real-time dispatch utilizing continuously updated measurements. In contrast, the management platform detailed in this paper implements a distinct methodology compared to Refs. [26-29]: it relies on a Model Predictive Control (MPC) algorithm that iteratively resolves a mixed-integer linear programming optimization problem.
Furthermore, two distinct control paradigms are evaluated across two separate scenarios, designated as single Point of Connection (PoC) and multi-PoC. The initial algorithm establishes aggregate setpoints for a cluster of DERs, delegating the specific control of individual units to a localized EMS. Conversely, the second approach directly calculates and transmits operational signals to every independent DER unit. Regarding practical implementations, DERMS platforms are currently being deployed in the United States to govern distributed generation assets [30]. In [31], researchers simulate the resilience of a DERMS platform—responsible for managing multiple photovoltaic inverters across a Californian distribution network—against cyber-attacks. The global adoption of DERMS is also accelerating: in Ref. [32], authors outline a framework to enhance the efficiency of flexibility provisioning within an MV-LV network. By simulating operations on the authentic topology of a Swiss DSO’s MV and LV grids, they demonstrate that augmenting available flexibility can substantially reduce DSO operational expenses. Ahmadi et al. [33] detail simulation outcomes concerning the deployment of a DERMS platform to regulate the interface between DERs and the distribution network in the UK. Their research investigates reactive and active power services supplied to the national grid, illustrating that a DERMS can effectively direct DER operations to fulfill grid requirements at the PoC by leveraging the most cost-effective available resources. In the current study, the introduced platform is deployed within the Italian distribution grid, marking one of the initial national efforts to implement a real-world platform that facilitates coordinated flexibility requests from both the TSO and DSO to a microgrid or DER cluster.
Frequently, DERMS applications lack the maturity required for immediate field deployment and are consequently validated within simulated environments. Padullaparti et al. [34] present a real-time optimal power flow-based DERMS capable of regulating a Battery Energy Storage System (BESS) to reduce power demand during peak usage periods, thereby offering peak-shaving service. Reference [35] describes a management platform designed for distribution networks experiencing high PV penetration, validating the system through simulations driven by empirical data. Nowak et al. [36] propose an IoT-based framework that connects a DSO to a DER cluster, providing simulation scenarios to verify the structural integrity and operational sanity of the DERMS. Distinct from Refs. [34-36], the present study validates the engineered DERMS through empirical field tests conducted with the direct involvement of both the DSO and TSO authorities.
The engineered platform (designated as the “DSO platform” since it manages resources situated on the distribution grid, despite being accessible to TSO operators) establishes a workflow for formulating, verifying, and executing flexibility requests in the field. Specifically, the subsequent operations were executed over the course of the project:
· An operational baseline governing daily reactive and active power flows was calculated, utilizing generation forecasts, load forecasts, and the existing scheduling for dispatchable resources; furthermore, the flexibility margins for these assets were evaluated;
· TSO operators were granted the ability to define constraints regarding the active and reactive power exchanged by designated sections of the distribution grid, or to specify temporal deviations from the established baseline;
· The DSO (which maintains comprehensive visibility over the distribution network) validated all TSO requests;
· DSO operators were concurrently empowered to formulate directives, encompassing constraints on reactive and active power at designated buses, transient limitations on line power flows, commanded baseline deviations, or the isolation (islanding) of specific subnetworks within the consumer’s infrastructure;
· These directives were subsequently converted into updated operational setpoints and transmitted to the applicable available assets.
As outlined in the introduction, the study evaluated two distinct scenarios:
· Scenario 1 (Single-PoC). The microgrid operates as a unified consumer receiving reactive and active power directives. Here, the interface between the microgrid and the DSO facilitates command transmission, while the microgrid’s localized EMS is responsible for the optimal scheduling of components and plants. This EMS aggregates all generation and storage facilities within the Savona Campus, relying on underlying optimization models to: a) ensure the routine operational management of the plants; b) govern the microgrid in response to reactive and active power directives issued by the DSO platform; c) oversee the microgrid during the intentional islanding of specific network segments. In this configuration, flexibility service requests can originate from either the DSO or the TSO.
· Scenario 2 (Multi-PoC). Every storage and generation facility within the microgrid is treated as an independent consumer integrated into the low voltage distribution network. Consequently, the microgrid “simulates” a distribution feeder accommodating multiple independent users. Under this paradigm, the DSO uses the platform to bypass centralized EMS aggregation, issuing load-shedding directives and assigning setpoints directly to individual devices.
Both scenarios are detailed below, followed by the mathematical formalization of the optimization model embedded within the EMS.
The Single PoC framework (Figure 1) reflects the standard operational mode of the Campus, treating it as a consolidated user possessing diverse flexibility assets (e.g., battery storage, Geothermal Heat Pumps (GHPs), islanding capabilities, and electric vehicles).

Figure 1. Simplified one-line diagram of the Single PoC configuration considered in Scenario 1.
This architecture incorporates the following primary features: (a) the deployment of the DSO platform as a Virtual Top Node (VTN), utilizing the OpenADR communication protocol to establish constraints at the Campus’s point of connection (e.g., mandated active power values, maximum active/reactive power limits, etc.), which translate into flexibility requests initiated by both the DSO and TSO; (b) a Virtual End Node (VEN) that intercepts the OpenADR-formatted flexibility requests from the DSO platform and interacts with the Campus EMS. This VEN also transmits the available next-day flexibility to the DSO platform—based on the microgrid’s predetermined schedule—and provides measurement reports; (c) the Campus-based EMS, which calculates the optimal dispatch schedule for the microgrid’s programmable resources while adhering to the established flexibility constraints at the connection point, subsequently transmitting setpoints to the local devices (utilizing various communication protocols such as Modbus, BACnet, or IEC61850, Figure 2).

Figure 2. Communication scheme relevant to the Single PoC configuration in Scenario 1.
To execute the transitional experiments involving islanded operation and the subsequent resynchronization with the primary grid, the direct control of Campus resources is managed by the SCADA system (e.g., governing the shutdown of the storage system and its initialization in V/f (voltage and frequency) control mode, as well as orchestrating the opening and synchronized reclosing of the parallel switch). Consequently, in this scenario, the islanding directive is routed from the DSO platform to the EMS, which converts it into IEC61850 commands. These are then acquired by the SCADA system via OPC through a customized IEC61850-OPC Gateway (Figure 3).

Figure 3. Islanded mode communication scheme.
Within this alternative scenario, the discrete nodes comprising the Smart Polygeneration Microgrid (SPM) operate as standalone consumers linked to the LV distribution grid (Figure 4). This structure enables the empirical testing of interactions with fundamental DER configurations that are less complex than a full microgrid, akin to residential households equipped with photovoltaic systems.

Figure 4. Simplified one-line diagram of the Multi-PoC configuration considered in Scenario 2.
From an architectural standpoint, the EMS remains entirely passive in this configuration; the platform bypasses the EMS to transmit commands directly to the Remote Terminal Units (RTUs), successfully emulating direct communication access between distributed consumers and the DSO platform. Concerning the communication infrastructure, a direct IEC 61850 interface was established between the RTUs and the DSO platform (Figure 5). The Smart Energy Building (SEB) and its associated PV array (PV3) are recognized by the DSO platform as a single, complex consumer through the EMS, which facilitates data exchange via the OpenADR protocol. The EMS maintains a direct interface with the local control units, communicating with the SEB via BACnet and the PV system via Modbus.

Figure 5. Communication scheme relevant to the Multi PoC configuration in Scenario 2.
The engineered EMS incorporates a dedicated optimization model designed to determine the ideal schedule for system components and plants. The formalization of this optimization problem utilizes the following sets:
· N = {1, ..., N} representing the collection of grid nodes;
· HF,i = {1, ..., Nf,i} representing the collection of controllable plants situated at node i;
· HR,i = {1, ..., Nr,i} representing the collection of renewable generation plants situated at node i;
· Si = {1, ..., Ns,i} representing the collection of energy storage units situated at node i;
· Ai = {1, ..., ni} representing the collection of nodes interconnected with node i;
· NI = {1, ..., nI} representing the collection of grid nodes capable of sustaining islanded mode operations.
Within the Single-PoC framework, the formulated optimization model is applicable across various operational states: (1) normal operation (where scheduling of storage systems and plants occurs to minimize costs, explicitly omitting equations and variables linked to islanding and DR); (2) demand response (which builds upon normal operation mode 1 by integrating supplemental constraints triggered by specific requests, detailed subsequently); and (3) intentional islanding (utilizing dual models to independently govern the two isolated segments of the microgrid).
The comprehensive optimization problem is defined as follows:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)

(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
The objective function (2) aims to minimize the SPM’s operational expenses while concurrently accounting for emissions generated by natural gas consumption and energy imported from the primary grid. In Eq. 2, Δ is the time discretization interval, and [kW] represent the power injected into the microgrid and the power sold to the main grid, [kW] denotes the power associated with the boiler’s primary energy consumption, [kW] indicates the power associated with the primary energy consumption of the h-th controllable plant, [m3] is the volume of natural gas consumed by the h-th controllable plant, Ct and Bt [€/kWh] are the unit rates for purchasing and selling energy, TESSpp [€/kWh] stands for the unit cost of primary energy supplying the boilers, Cgas [€/m3] is the price of natural gas, fe [tCO2/kWh] represents the emission factor associated with power procured from the grid, [€/tCO2] corresponds to the financial cost related to the emission of one ton of CO2, and and [tCO2/kWh] act as the emission factors related to fossil fuel utilization.
Eqs. 3 and 4 establish the thermal power balance: Dheat,t [kW] and Dcool,t [kW] define the heating and cooling power demands; aMIN and aMAX function as parameters determining the permissible deviation from the power request; [kW] denotes the thermal power supplied by controllable plants; [kW] specifies the thermal power derived from renewable sources; [kW] indicates the power produced by the chillers; is the thermal power generated by the boiler; and ꭓ represents the chiller’s thermal efficiency.
Constraints (5) and (6) define the translation of primary energy into thermal power output, mediated by the efficiencies \ ηB and ηh. Eq. 7 formulates the relationship linking thermal power generation to electrical power generation within the controllable facilities.
Constraints (8)-(10) delineate the thermal model of the building: and represent the thermal power produced and the electrical power consumed by the GHPs, respectively, interconnected via the performance coefficient COPi; characterizes the building temperature, simulated using RC circuits featuring a thermal capacity of [kWh/K] and a thermal resistance of [K/kW]; designates the thermal power associated with the ventilation systems; Text,t [K] represents the ambient external temperature; and ηFC,i and αFC,i denote the fan coil efficiencies, where the former dictates the conversion of thermal power from the heat pump to the fan coils, and the latter governs the transfer from the fan coils into the building environment.
To formalize the potential for the microgrid to function in Islanded Mode (IM), a binary decision variable () is incorporated, which assumes a value of 1 when IM occurs and 0 under normal grid-connected conditions.
The electrical grid architecture is modeled employing Eqs. 11–24. Specifically, Eqs. 11–14 enforce the active and reactive power balances at every node i, where [kW] denotes the active power load, [kW] characterizes the power exchanged with the grid, [kW] represents the electrical consumption of the electric vehicles, and [kW] is the power exchanged with the storage systems. Furthermore, and [kVAR] indicate the corresponding reactive power components (with Eqs. 13 and 14 applying specifically to nodes operating in islanded mode); [kVAR] is the reactive power tied to renewable generation, and [kVAR] designates the reactive power associated with the energy storage. Lastly, [kW] and [kVAR] define the active and reactive power flows traversing line segment (i,j). Notably, via Eq. 15, the load parameter is divided into two distinct components: and [kW], which represent the deferrable and non-deferrable portions of the load, respectively. Additionally, the cumulative deferrable energy must exceed a specified minimum deferrable demand threshold, defined as .
Constraints (17) and (20) establish the per-unit (p.u.) equivalent formulations for the network’s power flow equations [37]: and specify the respective active and reactive powers; Gi,j and Bi,j constitute the electrical parameters of the lines, while vi,t and δi,t denote the voltage magnitude and phase angle at node i. Constraints (21) and (22) establish the circular capability limits governing the renewable energy assets and storage systems.
The operational dynamics of the storage systems are governed by Eq. 23 and 24, wherein SOCk,i,t [kWh] quantifies the storage’s state of charge. The corresponding efficiencies for charging and discharging are represented by ηc,k and ηd,k, respectively, and CAPS,k [kWh] dictates the total energy capacity of the storage unit.
It is important to note that while all variables possess defined upper and lower boundaries, these specific constraints have been omitted for the sake of brevity. Furthermore, the system is fully capable of functioning during a DR event, wherein the network operator requests a specific power exchange profile. Under such circumstances, the following supplementary constraints must be integrated:
(25)
(26)
Where and represent the reference values for active and reactive power specified by the system operator, and βi,t denotes a binary parameter taking the value of 1 throughout a demand response event and 0 otherwise.
Moreover, should the requests from the DSO be unachievable, the inability to meet the DR stipulations is reported to the DSO, along with the system’s permissible flexibility, as determined by the subsequent optimization problem:
(27)
The optimal outcomes and practical field tests detailed below pertain to their implementation at the LIVING GRID experimental facility (Savona Campus SPM).
The previously detailed optimization framework was executed within MATLAB (utilizing the YALMIP interface [38]), requiring under one minute to achieve an optimal solution. To demonstrate the derived outcomes, the following two scenarios are examined:
• Case I. Expenses are minimized while satisfying a demand response requirement of 70 kW for a duration of one hour.
• Case II. Expenses are minimized while intentionally islanding a segment of the SPM, which remains detached for approximately 30 min.
Demand response occurrences introduce supplementary constraints that must be satisfied during specific timeframes. For this scenario, Pgrid,i,t = 70 kW between 13:15 and 14:15. This demand response limitation specifically alters the electrical dispatch schedule and the battery’s state of charge.
Figures 6 and 7 present the optimal outcomes for electrical scheduling excluding and including the demand response, respectively.

Figure 6. Scheduling of electrical power for the 24-h horizon without demand response.

Figure 7. Scheduling of electrical power for the 24-h horizon with demand response.
As depicted in Figure 7, during the hour governed by the constraint, surplus power from the grid is utilized to charge the battery, leading to a superior state of charge compared to the scenario illustrated in Figure 6. Concerning the objective function, executing the demand response elevates the total cost from 466€ to 472€.
Within this scenario, a prospective islanding configuration involving the SEB, the GHP, and the storage infrastructure is evaluated. Consequently, the updated electrical and thermal dispatch for the winter setting is established. Figures 8 and 9 display the optimal decision variable values both excluding and including islanding operation.

Figure 8. Scheduling of electrical power for the 24-h horizon without islanding.

Figure 9. Scheduling of electrical power for the 24-h horizon with islanding.
Specifically, operating in island mode causes the expense to rise to 771€ (from 760€). This cost escalation results from an elevated volume of power procured from the grid during midday hours. The profits from selling energy and the demand reduction from the GHP prove insufficient to offset these acquisition expenses.
The experimental field trials were executed across two distinct stages. An initial series of evaluations took place in late July 2020 to verify the platform’s functionality and to pinpoint any underlying complications—both regarding the instructions dispatched by the platform in response to user (DSO and TSO) demands and the physical device-level interactions. After resolving the challenges encountered during this preliminary stage, the final experimental phase was conducted between September 2020 and late October 2020. Throughout both stages, assessments were made of the single-PoC and multi-PoC configurations. Furthermore, the capacity of a specific microgrid segment to securely execute the shift from grid-connected mode to an islanded state (and the reverse) was empirically validated.
In the subsequent sections, various result examples will be examined, focusing on the variables actively recorded within the test-bed as it responded to platform directives generated to satisfy TSO and DSO requirements.
This evaluation imposed boundaries on the active and reactive power associated with bus Q02 (which accommodates both the storage system and the photovoltaic installation PV1). To be precise, maximum negative thresholds were delineated (indicated by the red line in Figure 10): given that a passive sign convention is applied to the power exchanges at the bus, this effectively translates to mandating minimal generation outputs for active as well as reactive power flows (Figure 10).

Figure 10. Active and reactive power at bus Q02.
The control platform successfully navigates the active power restriction by leveraging the storage system (Figure 11), thus offsetting PV1’s relatively minor output caused by limited solar irradiation during that specific testing interval. Conversely, PV1 handles reactive power injection (Figure 12).

Figure 11. Active power injected by the storage.

Figure 12. Active and reactive power from PV1.
Although the platform calculates operational setpoints purely from predictive forecasts without incorporating real-time feedback loops, the control actions in this instance successfully adhered to the constraints. This achievement can be attributed to the high accuracy of that day’s predictions concerning PV1 generation and the localized demand at Q02 (the latter being driven primarily by auxiliary systems, making it highly predictable).
For this assessment, upper thresholds were established for the active and reactive power drawn at the point of common coupling, aligning with a DSO-validated instruction from the TSO. This directive targeted the timeframe between 17:00 and 17:30. Based on predictions for that interval, it was necessary to achieve an overall active power reduction of approximately 40 kW (dropping from 140 to 100 kW) and a reactive power curtailment of 80 kVAR (dropping from 100 to 20 kVAR) (Figure 13). The platform transmitted this command to the Aggregator, prompting a fresh optimization cycle intended to satisfy the mandated constraints while treating the entire test-bed as one consolidated unit (the Single PoC framework).

Figure 13. Active and reactive power at the PoC.
To comply with these limits, the EMS attempted the following interventions:
• Assigning a roughly 30 kW set point to the storage apparatus (delivering power from the storage unit into the grid, Figure 14a)

Figure 14. (a) Active power injected by the storage system and (b) the GHP load of the SEB.
• Instructing the SEB to keep the GHP deactivated during the designated timeframe (which equates to an approximate 10 kW decline in the SEB’s load, Figure 14b).
The documented outcomes reveal that, even though the physical assets adhered to their assigned setpoints, the targeted PoC limitations were only incompletely achieved. This shortfall stems from the following factors:
• The active and reactive load predictions underpinning the optimization procedure exhibited poor accuracy, primarily driven by two variables. First, these forecasts relied on historical records from preceding years, reflecting normal operational states that contrasted sharply with the 2020 conditions induced by the COVID-19 pandemic (as the Campus was experiencing partial lockdowns, remote education, and telecommuting). Second, concurrent with this period, a separate experiment caused a Campus laboratory to draw an erratic, highly fluctuating load ranging between 10 and 100 kW, which severely degraded forecast dependability.
• The GHP located in the SEB displayed highly irregular functioning, directly correlating with the diminished occupancy within the building (a consequence of pandemic restrictions). This resulted in restricted thermal demand, subsequently decreasing its dependability as a controllable asset.
This trial was designed to evaluate the test-bed’s capacity to deliver reactive power to the primary grid under the Single PoC configuration. Explicitly, negative reactive power constraints (Figure 15) were imposed at the distribution network’s interconnection node. To fulfill this demand, the EMS designated a 10 kVAR set point for the storage infrastructure (Figure 16a) alongside a 30 kVAR allocation for PV1 (Figure 16b). Executing these commands augmented reactive power generation by 40 kVAR, thereby reversing the reactive power trajectory at the PoC.

Figure 15. Reactive power at the PoC.

Figure 16. Reactive power injected by (a) the storage and by (b) PV1.
Executing directives related to reactive power demonstrated greater dependability, because reactive power predictions were less prone to forecasting inaccuracies.
The objective of this trial was to confirm whether a specific microgrid segment (comprising switchboards Q01, Q02, and Q05) could execute a steady shift from being grid-tied to operating in an islanded state based on a platform command, function securely independent of the primary grid for a predetermined duration, and subsequently synchronize back with the main network.
This capability underwent evaluation during the initial testing phase in late July 2020. Formulated as an IEC61850 instruction, the islanding command was successfully intercepted by the microgrid’s SCADA system via a 61,850/OPC gateway. Following the acknowledgment of this signal, the islanding procedure was initiated:
• The storage apparatus, which conventionally functions in PQ mode (acting as a current source that exchanges a defined amount of active and reactive power with the grid based on specific setpoints), halts. Subsequently, it transitions into a “voltage source with droop” mode (functioning as a voltage source governed by defined frequency-active power and voltage-reactive power droop profiles) and resumes operation parallel to the primary grid;
• Output from the photovoltaic units is curtailed to prevent overwhelming the absorption capacity of the storage system, given that the storage unit serves as the slack bus during islanded conditions;
• The circuit breaker linking Q01 to the microgrid’s primary bus (QEG) is disengaged;
• Because the microgrid routinely operates with an open circuit between Q05 and Q03 (Figure 1), the switchboards Q01, Q02, and Q05 become fully isolated from the broader network.
Upon receiving the command to re-establish connection with the primary grid, a subsequent sequence activates:
• By manipulating the storage system’s reference voltage, the microgrid’s RMS voltage levels are calibrated to mirror those of the external network;
• A synchronization verification (synchrocheck) is initiated on the breaker bridging Q01 and QEG, while the microgrid’s frequency is synchronized to align with the primary grid’s frequency by adjusting the storage system’s frequency reference;
• Once the three-phase voltages of the isolated segment achieve synchronization with the main grid, the circuit breaker is re-engaged;
• The storage unit ceases operation, reverts to PQ mode, and then initializes once more.
Figures 17, 18, 19a, and 19b illustrate the frequency of both the main grid and the island, a representative line-to-line voltage from the primary grid alongside its counterpart in the isolated network, the power flow traversing the Q01-QEG junction, and the storage unit’s active power: notably, the island’s frequency and voltage profiles stay within permissible limits throughout the islanding phase and its associated transitional periods.

Figure 17. Main net and island frequencies.

Figure 18. Line-to-line voltages between phases A and B, measured at a bus belonging to the main network and at one belonging to the islanded portion of the microgrid.

Figure 19. (a) Power exchanged on the Q01-QEG link and (b) active power exchanged by the storage.
The detailed findings demonstrate the technical viability of an exclusively software-based framework that enables the TSO and DSO to solicit flexibility measures harmoniously, while allowing prosumers to intercept and execute these commands. This functionality holds for both sophisticated entities like microgrids featuring an EMS and SCADA (the single-PoC model) and collections of more fundamental prosumers with resources such as PV installations, manageable loads like a GHP, or storage devices, all tied to a common distribution feeder (the multi-PoC model).
On a practical level, these trials underscored that accurate active and reactive power demand predictions are vital for the system’s successful operation. Throughout the experiments, this dependency was particularly evident in the single-PoC framework, as it encompassed the entire Campus load, which is inherently challenging to forecast accurately. This difficulty was compounded by the stark contrast between the operating conditions during historical data collection and the pandemic-altered reality of the Campus during the testing phase (due to COVID-19 restrictions). These anomalies also hindered the ability to predict the operational patterns of the SEB’s GHP, diminishing its usefulness as a dispatchable load. Lastly, the planned islanding experiment validated that a facility furnished with PV systems and a storage unit (originally designed for PQ mode but retrofitted for droop-controlled voltage source operation) can detach from the overarching grid on command and subsequently securely reconnect. This capability represents a supplementary form of operational flexibility, which could prove advantageous during distribution network emergencies.
This document has delineated an optimization-driven ICT framework forged through the collaborative efforts of active local prosumers, the DSO, and the TSO under the auspices of the Italian LIVING GRID demonstration and innovation initiative. The principal contributions of this research encompass: the conceptualization of the platform architecture collaboratively engineered and evaluated by key smart grid stakeholders (TSO, DSO, active local prosumers) to facilitate intentional islanding and demand response; the introduction of a novel optimization methodology capable of determining the ideal dispatch scheduling for storage units and generation facilities; the capability to initiate deliberate islanding for specific microgrid subsets; and the real-world empirical validation of the constructed platform.
From an applied perspective, the platform’s underlying philosophy and the empirical research conducted within LIVING GRID were heavily influenced by concurrent national debates (occurring during the project’s inception) regarding Italian regulatory standards for linking active consumers to the public grid. Notably, these dialogues focused on the mandate requiring active users to implement a centralized plant controller capable of transmitting commands, data, and measurements to the DSO’s supervision and grid management infrastructure. The research undertaken in the LIVING GRID project aimed to empirically evaluate an alternative approach that eliminated the need for supplementary hardware controllers on the consumer’s premises, but was purely based on a software platform, seamlessly interfaced with the distributed generators’ controllers or a standard microgrid supervision system.
The on-site trials executed throughout this initiative verified the technical practicality of this ICT architecture, particularly regarding the concrete integration between the software interface and the conventional control and supervision networks located at the prosumers’ facilities. Nonetheless, the experimental outcomes also emphasized the critical need for improved load characterization through robust forecasting methods, grounded in historical data gathered during timeframes that closely mirror the operational realities of the period of interest.
DSO = Distribution system operator
TSO = Transmission system operator
ARERA = Italian regulatory authority for energy, networks and environment
BESS = Battery energy storage system
CNR = National council of research
DER = Distributed energy resource
DERMS = Distributed energy resources management system
DR = Demand response
EMS = Energy management system
EnSiEL = National inter-university centre on power systems
GHP = Geothermal heat pumps
HVAC = heating, ventilation and air conditioning
ICT = Information and communication technology
MPC = Model predictive control
MV/LV = Medium voltage/low voltage
PoC = Point of connection
PV = Photovoltaic
RSE = Research for the energy system
SCADA = Supervisory control and data acquisition
SEB = Smart energy building
SPM = Smart polygeneration microgrid
VEN = Virtual end node
VTN = Virtual top node
None
None
The work was supported by the funds of the LIVING GRID project (2017–2020) from the Italian Ministry of Research (Innovation Technological Clusters).
None
Open Access The author(s) retain copyright. This article is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. It may be shared and adapted for non-commercial purposes with appropriate attribution, an indication of changes, and distribution of adaptations under the same license. Third-party material may be subject to separate terms identified in its credit line. View the license at https://creativecommons.org/licenses/by-nc-sa/4.0/.