Functional Scalability and Replicability Analysis for Smart Grid Functions: The InteGrid Project Approach

: The evolution of the electrical power sector due to the advances in digitalization, decarbonization and decentralization has led to the increase in challenges within the current distribution network. Therefore, there is an increased need to analyze the impact of the smart grid and its implemented solutions in order to address these challenges at the earliest stage, i.e., during the pilot phase and before large-scale deployment and mass adoption. Therefore, this paper presents the scalability and replicability analysis conducted within the European project InteGrid. Within the project, innovative solutions are proposed and tested in real demonstration sites (Portugal, Slovenia, and Sweden) to enable the DSO as a market facilitator and to assess the impact of the scalability and replicability of these solutions when integrated into the network. The analysis presents a total of three clusters where the impact of several integrated smart tools is analyzed alongside future large scale scenarios. These large scale scenarios envision signiﬁcant penetration of distributed energy resources, increased network dimensions, large pools of ﬂexibility, and prosumers. The replicability is analyzed through different types of networks, locations (country-wise), or time (daily). In addition, a simple replication path based on a step by step approach is proposed as a guideline to replicate the smart functions associated with each of the clusters.


Introduction
The power sector is currently experiencing a revolution in the way electricity is generated, transmitted, and distributed. These changes are largely driven by enhancements of decarbonization policies, increased digitalization, and increased demand for the electrification of assets. As a result, the network has seen rapid growth in the integration of distributed energy resources (DERs), such as photovoltaic (PV), wind, and electric vehicles (EVs), within the distribution system. These ambitious goals, however, do not come without consequence to the distribution system operator (DSO), and their integration has grid projects, which are required in order to be scalable and replicable. Their contribution, condensed in [11] created the foundation for the SRA, as the paper addresses the influence of several factors to develop the requirements for scalability and replicability within smart grids. Grid4EU [12] proposed a step-wise methodology to combine technical analysis through load flow, dynamic, and reliability analysis with regulation and stakeholder analysis to provide a holistic view of drivers and barriers for potential up-scaling of the solutions. IGREENGrid [13] contributed to the development and importance of the SRA. Within it, two approaches were used to (1) filter the solutions with the most potential (qualitative) and (2) from a technical and economic point of view (quantitative) to understand the performance and benefits of the solutions within a potentially large-scale implementation. Additionally, these results served to help DSOs draft recommendations for deployment and investment prioritization while allowing the industry to develop products and policies. Within InterFlex [14], the project developed and implemented a targeted SRA to assess the response of the network to the implementation of design solutions when they are scaled up. These vary from network calculations, which compare the hosting capacity under different future scenarios, to voltage response of inverter functions (autonomous and centralized). A common approach to provide a holistic overview through a visual representation of these smart grid projects has been to use the smart grid architecture model (SGAM) [15]. This reference standard process helps depict the different aspects that define the smart grid through its five interoperability layers (business, functional, information, communication, and component) and provides a well-established source of information.
Each one of the aforementioned projects provided valuable and diverse contributions to the SRA state-of-the-art. This diversity, which is natural and should be encouraged, should also be condensed to become a recognizable process for any stakeholder. InteGrid focuses precisely on this aspect by proposing a standardized and multi-focus approach (functional, information and communication technology, economic, and regulatory) toward the way in which scalability and replicability can be analyzed within smart grids. This is approached can be achieved through the use of the SGAM which is used as a foundation upon which additional context and information can be sourced.

Research Questions, Key Contributions, and Paper Structure
This paper presents the functional scalability and replicability analysis of the smart grid functions implemented within InteGrid. Thence, the multi-focus approach is presented as a foundation upon which the context for the functional-oriented SRA and the various case studies are conducted. Furthermore, it is crucial to analyze the functions and assess their performance and impact within the distribution grid when future scenarios with high penetration of RES and their exploitation as flexibility sources become a reality. In this direction, this paper provides the following key questions: • How can different scopes such as technical, economic, and regulatory be combined within a unified SRA approach? • Does clustering of tools for a single SRA bring any benefits compared to conducting an individual SRA of each tool? • What are the results of the set of tools when facing a scaling process (e.g., increase in RES penetration; network; flexibility offers and device controllability)? • What are the results of the set of tools when they are exposed to other networks, characteristics, or resources? • Would other stakeholders be able to replicate the set of tools in their own context?
Two contributions to the development of the SRA can be considered in this paper. On the one hand, to propose a standard and replicable quantitative analysis methodology for smart grids. This is achieved through a multi-focused SRA approach aligned with the SGAM. Considering the SGAM as a key foundation for the methodology, it enables a common reference representation of smart grids, which can also be replicated among various projects. The SGAM, although not considered a standard by definition, provides a simplification of the process for achieving a common reference model. The standardized consideration is a result of the SGAM becoming popular within the smart grid community. A clear example is its adoption in national, international smart grid projects or cross-domain as described in [16].
On the other hand, to show the functional-oriented scalability and replicability analysis of the set of functions proposed in InteGrid. The analyses presented in this paper provides a holistic approach to test a collection of tools in order to capture the various future challenges which will be faced when the are in real operation. The SRA is the natural step for developing tools in academic research and bridges the gap towards real implementation. The set of functions presented in this paper vary from newly developed forecast systems [17], state estimator for medium voltage (MV) or low voltage (LV), controllers for flexibility operation [18], a multi-period optimal power flow (MPOPF) [18], home energy management systems (HEMS) [19,20], aggregation through VPP [21], or even a traffic light system used for TSO-DSO indirect coordination [22]. To facilitate the integration of these tools, and noted as an additional contribution of the InteGrid project, the grid, and market hub (gm-hub) is presented in [23,24].
Although the backbone of this paper is founded upon the SRA implementation conducted within the InteGrid project, the novelties of each smart grid function are also highlighted throughout the paper.
The structure of this paper is as follows. Section 1 provides an introduction and motivation for conducting the SRA for the developed smart grid functions. Section 2 focuses on the proposed multi-focused methodology by using the SGAM as a basis for the conceptualization of the analysis. Moreover, the simplified functional methodology is presented in addition to the clustering approach, which enabled the holistic analysis of the tools. The analysis is split into two primary case studies. The first case study in Section 3 presents the SRA for the Portuguese demo through a two part analysis. The first part focuses on the set of tools for predictive operation in medium voltage networks. The second part focuses, likewise, on predictive operation but from the perspective of low voltage networks. The second case study, in Section 4, presents the SRA for the Slovenian demo which focused on the indirect TSO-DSO interaction. Within each case study and their SRA, the authors provide (1) a description of the cluster, (2) the objectives for the SRA, including an introduction to the scenarios which are to be considered, (3) the results of the scenarios presented, and (4) a discussion subsection driven by the results obtained from the analysis of each cluster. Section 5 presents the potential replication paths for the set of tools covered in this paper. Finally, Section 6 provides the overall conclusions of the SRA process and outlook for the SRA.

Generic Smart Grid SRA Methodology
It is necessary to consider several system aspects to capture the impact of smart grid technologies. A smart grid, per-se, can be expressed as two-way communication, which enables different use cases [25]. Authors in [26] describe the smart grid as ". . . an integrated array of grid technologies, devices, and control systems that provide and utilize digital information, communications, and controls to optimize the efficiency, reliability, and security of electric power delivery". This combination of assets, ideas, and tools cannot only be analyzed through one unique point of view. Instead, a multi-focused approach is necessary to provide a complete analysis of the smart grid technologies. Nonetheless, the multi-focused approach is not a simple and trivial task and can be associated with a wide scope of challenges, such as tool indecencies and context. Within these challenges, the SGAM aims to provide a multi-layer approach that can simultaneously capture the required points of view which are necessary to fully understand the smart grid. The use of the SGAM in InteGrid was motivated by (1) the implementation of a standard approach of describing the smart grid solutions which enables all stakeholders to have a common reference point and (2) the project's architecture, which consists of 12 defined high-level use cases (HLUC), which are a description of the use case from a business level (business interoperability layer of the SGAM). These HLUCs have their individual requirements and one or more objectives [27]. Hence, the SRA in InteGrid is developed based on 4 focus areas [28][29][30], mapped to the SGAM in Figure 1. The description of these focus areas is as follows: • Functional : validates the technical integration of the smart functions through their impact when integrated within the distribution network while considering the network technical capabilities. • Information and communication technologies (ICT): provides a system architecture characterization based on the SGAM representation conducted via a qualitative analysis, which identifies the potential bottlenecks and a quantitative analysis which uses stress simulations to evaluate future performance; • Economic: provides a cost benefit analysis based on the net present value and the initial rate of return of the implementation of the new functions and tools. The analysis gives an overview based on the economies of scale, macroeconomics, and key performance indicators (KPIs); • Regulatory: investigates the regulatory drivers and barriers which may be imposed within various countries in order to highlight the compatibility of these regulations during the deployment of the smart grid functions. The mapping proposed in Figure 1 shows the main information points for each of the focus areas. However, all the interoperability layers should be considered when assessing a specific focus area due to inter-relationships. The component layer provides the devices that compose the grid backbone, e.g., generation units. The communication layer details the technologies of communication used and their protocols, whereas the information layer provides the inputs contained in the data models. The functional layer is associated with the technical scope of the smart grid functions, while the business layer relates to the business and political (regulatory) frameworks.

Functional Clustering Process
Boundary conditions of the three considered demos serve as the foundation for the HLUCs. Although they might implement the same smart grid functions, their objectives for implementation may differ. The Portuguese demo focuses on the flexibility usage for the DSO purposes at both the MV and LV levels. The DSO uses flexibilities from several sources, such as wind, solar, batteries, and industrial consumers to ensure the reliable operation of the distribution networks. The Slovenian demo encompasses a TSO-DSO indirect interaction process. It implements a traffic light concept to assess the impact over the distribution network when flexibilities are used for purposes other than local DSO flexibility. These flexible units might be distributed storage systems, industrial customers or distributed generation aggregated under a commercial virtual power plant. The Swedish demo analyses the social impact of steering customers to solve grid constraints through active participation in demand-side management programs.
Given the diverse context of each demonstration, a pre-evaluation process [31] using a qualitative analysis is performed. This approach allows for the filtering of necessary HLUCs and identifies the potential benefits (if any) of a applying a combined HLUC approach in order to conduct a joint SRA. The pre-evaluation considers a wide variety of aspects, such as the objectives of the HLUC, potential analysis, specific SRA methodology considered for analysis, potential scalable sources, pre-requirements for analyzing national and international replicability, tools to perform the SRA, KPIs which can be measured and potential baselines for the analysis comparison. From this analysis, one outcome is clear: if there is an objective to truly capture the potential of the tools, a solution has to be found to incorporate the interdependency of the tools. The solution could be to identify many assumptions when analyzing each tool individually. Another solution is to group them into a cluster. By grouping them, assumptions are reduced, and specific data can be used. Such an approach is used in this paper, as the benefits of having real data, fewer assumptions and real mapping to a demonstration site enables a holistic analysis.
Subsequently, 5 clusters were identified as represented in Figure 2. Clusters 01, 02, and 04 are mapped to the Portuguese demo, Cluster 03 to the Slovenian and Cluster 05 to the Swedish demonstrator. The common denominator among most clusters is the gmhub platform, which acts as a secure, interoperable platform oriented to facilitate market access and operate as an intermediate platform connecting the different energy agents and roles. Within the scope of this paper, only Cluster 01, Cluster 02, and Cluster 03 are presented as they (1) implement the main tools characterized in within the InteGrid project (programming languages and technology are listed in Appendix A) and (2) each cluster fully implements a set of tools within the demonstrations.

Functional-Oriented Methodology
As previously mentioned, the focus of this paper is on the functional-oriented SRA, meaning that the analysis focuses on the output of the different smart grid functions when they are implemented under various high impact conditions. Although 5 clusters are considered for the analysis, each having their own specific requirements for the analysis, a general process for the functional-oriented methodology is applied and is shown in Figure 3. This approach is based on the methodology presented in [32]. As shown in Figure 3, the first step to collect data (as realistically as possible). It includes network and profile data required to produce a representative system model. This step allows for the evaluation of data availability and accessibility and whether alternative generic sources are required. Thereafter, various scenarios and KPIs are defined in order to provide case studies and assessment criteria, respectively. Several communities of practices help with the creation of the scenario for each cluster. The functional SRA execution consists of implementing the developed scenarios in a simulation environment based on the real or representative network model. The results are then heavily discussed among the different stakeholders to include perspectives ranging from the system operator to the flexibility provider. Finally, the last step is to draw conclusions that can be applicable for a wide range of stakeholders. Cluster 01 is based on a set of smart grid functions developed for the predictive operation of MV networks. The objective of Cluster 01 is the exploitation of flexibilitybased actions to support the DSOs in their operational tasks. Examples of these operational tasks are solving grid constraint violations (voltage or congestion) or decreasing the active power losses. Flexibility resources are considered from two categories. The first category (asset level) are DERs, such as on-load tap changers (OLTC), capacitor banks, or storage systems (assuming that the regulatory framework allows DSOs to own and operate this asset). Storage systems may or may not be owned by the DSO depending on the regulatory framework of the country. The second category of flexibility resources is provided by virtual power plants (VPPs). In this specific case, the VPP is considered a technical VPP (tVPP) as its business model is to provide flexibility to the DSO.

Case Study
Thence Cluster 01 is dependent on several smart grid functions being, a load [33] and RES forecasting [34] system, a tVPP, a MV load allocation system, and a multi-period optimal power flow (MPOPF) (algorithm). These smart grid functions are represented in Figure 4, including data sources and the flow of the process. Each of the smart grid functions are hereafter briefly explained.
The load and RES forecasting system is a centralized service developed and installed within the DSO infrastructure to support every tool envisioned for the operational planning of MV distribution networks. This service is of utmost importance as it enables access to active and reactive power forecasts-generated daily (i.e., twice a day)-for the different grid locations of each demonstrator. The forecasts are generated based on predicted weather information and past operating conditions. The MV load allocation (MVLA) plays a fundamental role as it allows solving observability constraints that could prevent the execution of other tools [18], such as the MPOPF. In this sense, the MVLA tool requests the available forecasts (and measurements, in real-time) of the active and reactive power of the MV/LV substations and the feeders' heads. It either estimates the operating state of the MV/LV substations when measurements/forecasts are not available or performs corrections to the MV/LV substations' measurements/forecasts (when available) to make them coherent with the measurements/forecasts available for the corresponding upstream feeder. Meanwhile, the tVPP aggregates the flexibility of energy consumers or producers and offers the available flexibility margins to the DSO for the short-term management of the distribution networks.  Finally, the MPOPF intends to be a decision support module capable of providing operational optimization actions to the DSO while keeping the grid power flows and voltage magnitudes within their corresponding technical limits [18]. The MOPF focuses on specific objectives (e.g., flexibility cost minimization, active power losses minimization), always solving a minimization problem. The result is an identification and a reservation of flexibility-based actions while the optimization meets technical grid constraints. The MPOPF objective function, is illustrated in Equation (1), where a t i , b t i , and c t i are the cost factors of each flexibility resource i in period t. Since it enabled a simpler implementation and did not compromise the simulation goals, b t i was the only factor considered in the tests hereby presented thus leading to a linear relationship between the flexibility amount (P t i ) and the objective function value. The OLTC and capacitor banks are assumed to have a zero cost value since they are usually owned by the network operators. The minimization of the active power losses can either be modeled by a dedicated objective function or by setting equal marginal costs to all flexibilities in Equation (1). The two inter-temporal constraints for the state of charge (SOC) control and the energy rebound effect are illustrated in Equations (2) and (3), respectively, where SOC t i is the SOC of the energy storage system (ESS) i by the end of period t and SOC imax represents its upward limit. For the energy rebound effect shown in Equation (3), P t i and P t+1 i illustrate flexibilities offered by the same resource i in two consecutive time instants, but with opposite directions (i.e., one upward and one downward or vice-versa). By setting their ratio to 1, it is ensured that the flexibility activation in instant t is rebounded (i.e., same amount of flexibility in the opposite direction) in timestamp t + 1.
The optimization works in two operational modes: predictive (typically one day ahead, with hourly intervals); and quasi-real-time (typically 45 minutes ahead). As the name indicates, in the first stage, the goal is to foresee potential technical problems and, based on such assessment, define the necessary control actions to avoid them. By doing so, the flexible DERs are warned in times in which activation of their bids are possible. Additionally, the network operators can analyze the defined predictive plan and provide their validation. The real-time assessment has a validation and, if necessary, a corrective character. It relies on the availability of real-time measurements to assess the reliability of the predictive analysis. Therefore, in cases where the forecasted conditions significantly differ from the current ones, the MPOPF updates the predefined control actions.

Objectives of the SRA and Scenarios
The functional-oriented SRA aims to evaluate the four smart grid functions developed to stress them under new conditions and challenging situations. It is possible to use all of the smart grid functions separately. However, the MPOPF is the primary function and, thus, can provide the "aggregated" outcome when implemented in the distribution network. Hence, the output of the MPOPF can indirectly enable the analysis of the other tools.
The following parameters are considered for the scalability analysis, • Penetration of RES in the network: the amount of RES is increased to create constraint violations in the MV network and to evaluate the potential of the tools to allow higher levels of hosting capacity. The location and the size of the RES are carefully selected to create challenging situations. The goal is not to perform an exhaustive analysis of the hosting capacity but rather to assess how scaling-up the quantity of RES can be handled by the DSO when empowered with adequate operational tools to manage flexibility; • Available flexibility of the tVPP: the amount of flexibility is increased compared to the current baseline (i.e., minimal amount of flexibility) to observe how flexibility can be used as an alternative to more traditional solutions such as OLTCs or capacitor banks; • Network size: the number of nodes is increased as it has a direct influence on the computational effort of the tools (in particular the MPOPF). The network size is relevant for the real-time operation where time constraints are more important than in predictive mode.
Concerning the replicability, the following parameters were considered: Although the impact of all these parameters was evaluated, not all of them were considered in both demonstrators. Inherent characteristics of the demo sites explain this fact, e.g., the higher RES penetration in the Portuguese demo resulted in suitable conditions to test the possibility of reactive power support provided by these resources. Due to the significant number of simulations performed, it is impossible to assess all the scenarios in the scope of this paper. Therefore, a selection of the most significant scenarios made in the Portuguese and Slovenian demo sites are presented in this paper and summarized in Table 1.

Baseline-Portugal
The simulation uses a 10 kV network located in Mafra, Portugal. It consists of 855 nodes and is connected to the transmission grid by a 60/10 kV primary substation composed of 4 OLTCs and 1 capacitor bank coupled to the MV side. Approximately 13,000 customers are supplied by this MV grid, 79 of them being MV customers. From the renewable generation side, 4 different RES are directly connected to the Mafra distribution network. An hourly load and RES profile for 24 h was extracted from the available historical data. It enabled a power flow study to observe the network status. This first analysis showed that neither voltage nor overloading problems occur in the baseline scenario. Thus, the MPOPF did not provide any flexibility-based suggestions.
Despite the absence of technical problems in the Portuguese demo, flexibility could still reduce the active power losses. Two options were considered: OLTC and local generation increase. From these two options, only the first was initially available on the demo site. The tVPP provides the local generation increase in the form of bids, and, therefore, it constitutes a new flexibility option for the Portuguese demonstrator. In the first hypothesis, the primary substation OLTCs increased the global voltage magnitude throughout the distribution grid. Such an increase subsequently led to decreased active power losses from 4.15 MW to 3.34 MW. The second possibility was to exploit the DERs by increasing their local production. The MPOPF entirely exploited this flexibility during the 24 h time horizon, reducing the active power losses from 4.15 MW to 3.48 MW.
This first assessment of the baseline helped to built the SRA scenarios, already illustrated in Table 1, to capture the expected changes of the power systems environment in the coming years. Such modifications lie in scalability (e.g., predictable increase in RES integration) and replicability (e.g., different flexible DER) scopes and intend to assess how the MPOPF would behave when facing other and more challenging conditions than those considered in 'business as usual'. •

Overloading Scenario-Portugal
The Portuguese demo site emphasises the use of an ESS as a future scenario. Meanwhile, in the Slovenian demonstrator, this scenario is not tested.
The ESS considered was a 0.5 MW battery storage system to solve branch overload occurrences observed in the Portuguese demo grid, particularly at the beginning and end of the day. These technical problems resulted from the connection of two new wind parks (5.82 MW and 3.1 MW) in one of the network feeders. Several transmission lines observed reverse power flows, which led to maximum overloading of 103%. Figure 5 depicts how the SOC of the ESS evolved during the day while following the MPOPF recommendations.
As expected, the ESS was charged in the extreme hours of the day, thus accommodating the excess of renewable energy injection available in the distribution grid. The partial SOC decrease after the two first charging actions is illustrative for the multi-temporal capabilities of the optimization algorithm. Without such discharge procedure, the ESS would not have enough capacity to relieve the distribution grid from the excess of RES production in the last periods of the day. Therefore, in this scenario, the MPOPF was challenged to control the SOC of the battery system to solve the existing branch overloads and while sustaining the battery's technical limits. This scenario also considered the flexibility provided by the tVPP. Two MV customers adjusted their consumption in the upward direction (i.e., consumption increase) and provided a solution to the overloading occurrences. The choice of these MV customers was based on their flexibility costs since the MPOPF provides a feasible technical operation plan and an optimal assessment of the activation costs.
In addition to illustrating the main KPIs for this specific scenario, Table 2 has a hidden and severe warning to the DSO, which does neither use the evaluated solutions evaluated in the Mafra grid. The lack of implementation of these solutions is an important conclusion. It indicates the need for a pro-active distribution network where flexibility exploitation is one of the primary keys to overcome potential grid constraint violations. This example perfectly highlights the ambition of the SRA methodology developed in InteGrid. By mixing scalability and replicability into a single scenario, it was possible to measure the impact to the grid of RES penetration growth and suggest potential assets that would be effective in handling the upcoming challenges when managed by a dedicated optimization algorithm. Neglecting the benefits of hybrid scenarios (i.e., mixing scalability and replicability) could lead to incomplete messages. In this scenario, the more traditional solutions, such as OLTCs or capacitor banks, would not fit to the type of problem, and, as such, it is of utmost importance to provide alternative pathways to the DSO. The complete roadmap to achieve such ways results from the joint analysis of these functional outputs with the economical, ICT, and regulatory SRAs.

Energy Storage System 100 tVPP (MV customers) 100
Although not all the future scenarios detailed in Table 1 are analyzed in this paper, it is essential to emphasize that feasible predictive plans were elaborated for each of them. Several different flexibility options were used-centralized Q(U) control, OLTC, tVPP-which highlights the versatility of the employed algorithms. •

Baseline-Slovenia
The simulation in the Slovenian case uses a 10 kV network located close to Ljubljana. It consists of 720 nodes and is connected to the transmission grid by two 110/20 kV primary substations composed of 4 OLTCs. The existent capacitor banks were out-ofservice during the demonstration phase. This MV distribution network is responsible for feeding approximately 23,000 customers, many of whom are prosumers. The assumptions for the Slovenian baseline considered that neither OLTCs, capacitor banks, or the tVPP would provide flexibility. Such impositions were following the demo site characteristics.
Considering the available load and RES forecasts for a 24 h time horizon, the MPOPF detected an undervoltage occurrence on the LV side of an MV/LV transformer. There was no solution to overcome such technical problems since no flexibility options were available within the Slovenian network. The fact that no flexibility options were available was a severe warning to the DSO. It highlighted the impact that flexibility may have on the network operation procedures.
The analysis of more complex scenarios in the Slovenian grid required the availability of a feasible baseline. Therefore, the solution developed within InteGrid was to include a flexibility provider: the tVPP. A new flexibility resource was added to the tVPP portfolio, which initially only considered customers engaged in the project. The inclusion of an additional client allowing the partial curtailment of this consumption was sufficient to solve the undervoltage problem. Other options, such as the inclusion of a 10 Mvar capacitor bank group on the MV side of the primary substation, were also assessed and proved to be effective. Independently from the selected option, it resulted in a feasible baseline, thus, enabling the evaluation of the MPOPF effectiveness in diverse and scaled-up contexts, like the ones proposed in Table 1. •

Slovenia-Overloading and Overvoltage Scenarios
This scenario tested the capability of the grid to host an increase in the RES injection. First, two PV generation groups with 3.5 MW and 9 MW of installed power were connected in the demo grid. Although the former was responsible for several overvoltage occurrences, the latter was used to set a specific branch on the verge of congestion. The solution to the overvoltage problems was to use the flexibility provided by a consumer (consumption increase) via the tVPP.
After this first trial, the network was further stressed to capture the MPOPF's ability to manage flexibility in complex situations. The stress test consisted of increasing the amount of existing production in 10% steps until the flexibility resources were no longer capable of solving the technical problems. This study allowed for the conclusion that this specific grid can accommodate a maximum of 30% increase in the generation in case the tVPP and the OLTCs are available for flexibility purposes.
The KPIs presented in Table 3 highlights the conclusion mentioned above but also provides other valuable insights for the network operator. The DSO becomes aware of (1) the DER technologies that best fit each type of technical problem; (2) the network challenges that highly constrain the hosting capacity. Such conclusions were only possible due to a standardized SRA methodology that, during the scenario development phase (Step 2 in Figure 3), gathered technology providers and stakeholders to define the best pathway to assess future challenges. In the particular case of the Slovenian demo grid, the test and trial of several RES penetration levels was the best mechanism to characterize the predictable changes in this power system environment. Based on such procedure, the MPOPF enabled a 30% RES growth by using the flexibility available from the tVPP (generation curtailment) to manage the branch overloading occurrences while simultaneously sending set-points to the OLTCs to tackle observed overvoltages. In fact, and as depicted in Table 3, if the unique concerns were related to the overvoltages, the OLTC would enable even higher levels of RES penetration. The increased severity of the voltage problems and the reduced volume of flexibility available from the tVPP (consumption increase) explain why the solution to address these occurrences changed compared to the first trial. Figures 6 and 7 illustrate the technical problems, as well as the solutions to avoid them.    •

Network Size Increase-Slovenia
The analysis of the grid size expansion impact is once again a consequence of the scenario development phase (Step 2 in Figure 3) employed by the proposed SRA methodology. Usually, for the tools with higher technology readiness level, their correct execution needs to be associated with high performance in non-functional requirements. However, answering which of these requirements should be fulfilled is not a trivial question and depends on how the stakeholders intend to explore the tool results. In Cluster 01, the smart-grid functions are envisioned to work on a short-term horizon, thus, demanding minimum requirements concerning their computational effort. Therefore, the baseline grid size was expanded (5 and 10 times), which led to positive linear growth of the computational time. By avoiding an exponential time increase, the tools of Cluster 01 proved to be compatible with the requirements of daily network operation. Furthermore, these results are comparable with state-of-the-art approaches. The MPOPF took 94 s to provide a 24 h predictive plan, while the forecasting and the MVLA algorithms computed their outputs in 8459 s and 5 s, respectively, for the larger network. •

Limited Historical Data Available-Slovenia
The availability of historical data is of utmost importance for any forecasting method. This scenario focuses on reducing the amount of available data to observe the impact on the MPOPF output. To properly analyze the results, it has been considered that it is possible to carry a perfect estimation when in possession of historical data for an entire year of operation (i.e., baseline).
The results indicated that an increase in the predicted technical problems was observed for reduced sets of historical data. In the case of computed forecasts with one month of historical data, 1 additional overloading occurrence and 15 additional overvoltages were detected in the power flow execution. Therefore, if the MPOPF operated according to this network state, unnecessary flexibility activations would be recommended. Theoretically speaking, the opposite situation could also be observed (i.e., decrease in the predicted technical problems with the reduction in the historical data content), thus leading to a lack of control-actions. These observations highlight the crucial role of DSOs in ensuring the availability of proper historical datasets. •

Limited Measurements Available-Slovenia
This scenario considered the case where only historical data (active and reactive power) for the HV/MV primary substation transformers was available. The remaining variables, i.e., the active and reactive power of each MV/LV secondary substation, were estimated by the MVLA using other input information types (contracted/installed power, mean power factor, etc.).
The results showed two different situations. The first situation was the detection of 15 additional overvoltage occurrences. Meanwhile, in the second situation, the undervoltage problems decreased. Therefore, for this specific grid, the lower observability in the MV network led to a less reliable estimation of the grid condition (since the allocation procedure was only guided by the forecasts at the primary substation). Consequently, an erroneous optimization of the network state would be carried by the MPOPF.

Discussion
The design and analysis of Cluster 01 aimed to show the effectiveness of the developed tools independently of the characteristics of the environment where they are implemented. The analysis of Cluster 01 through the SRA helped to perform stress testing on the networks to understand the network limits, valuable to the DSOs. Additionally, the study through specific scenarios helps to evaluate the holistic output of the tools when working together, as they do in actual operation. Nonetheless, the analysis took the point-of-view of the MPOPF since this is the primary support decision tool for the DSO.
The MPOPF proved to be a robust tool, capable of adapting to different network characteristics, as seen during the testing of the Portuguese and Slovenian networks. On the one hand, the lack of available flexibility to solve the network's technical problems remarks the importance of flexibility even in current situations as the baseline for Slovenia exposed. In all other cases, the MPOPF computed N-hours ahead predictive plans to avoid the occurrence of grid constraint violations at a minimum cost. This predictive management ability, therefore, enabled an increase in the network hosting capacity. On the other hand, the presented computational performance remained within the time constraints required for adequate field operation.
A variety of different grid assets-which may or may not be owned by the DSO-can contribute to developing the MPOPF optimization plans. The combination of grid assets is of utmost importance for network operators, who usually have limited options which only consist of assets, such as OLTCs or capacitor banks. These types of resources are typically centralized at the primary substation level, which may lead to difficulties when searching for a solution to multiple problems simultaneously, e.g., under and overvoltage occurrences in feeders connected to the same HV/MV transformer(s). In addition, storage units are among the assets that the MPOPF can manage, and the simulations highlighted the importance of their contributions.
Furthermore, the MPOPF also relies on the availability of flexibility. Without resources that can adapt to their typical injection and consumption patterns, ensuring a safe and reliable network operation becomes increasingly challanging. Therefore, DSOs have an essential role in engaging customers who can participate in grid operational tasks, particularly in areas where problematic situations most commonly arise.
Although the results indicated the robustness of the MPOPF, it is necessary to remark that it is highly dependent on the input data. The availability of an accurate grid status, provided by the forecasting services and the MVLA (dependent on the SCADA), is crucial for the correct execution of the MPOPF. The lack of data affects the MPOPF, suggesting unnecessary set-points due to non-existent problems or not recommending any controlaction even though issues exist within the network.
These conclusions derived from the holistic SRA of Cluster 01, are only possible through a standardized approach that focuses on the stakeholder's final objective while mixing scalability and replicability criteria. The functional-oriented SRA profoundly helped the DSOs in understanding their current and future problems while testing InteGrid's tools in current and future scenarios. Cluster 02 combines advanced tools for the predictive operation of LV networks recurring to the flexibility provided by domestic consumers through their HEMS and DSO-owned resources, such as OLTCs and ESSs, taking Cluster 01's assumptions for these DSOs resources. In the context of InteGrid, it is assumed that DER available in the LV network can be exploited by the DSO for grid control and management purposes [35]. Similarly, Cluster 02 is dependent on several smart grid functions, review LV load and generation forecasting tool (solution), the low voltage state estimator (LVSE) (solution), the HEMS (solution), and the low voltage control (LVC) tool (algorithm).
These smart grid functions are represented in Figure 8, including data sources and the flow of the process. The LV load and RES forecasting is almost equal to the load and RES forecasting presented already in Cluster 01. The main difference is the target group. In case of Cluster 02, the forecasting targets LV load and RES in the network.  Figure 8. Cluster 02. Global architecture.
The LVC tool aims to be a decision support tool to assist the DSO in the active management of the LV grid. It seeks to identify a set of preventive control actions to avoid foreseeable technical problems in the LV network, such as voltage violations [36]. The LVC tool performs the active management of the LV network recurring to two main resource types: DSO-owned resources, such as OLTCs and ESSs, and privately-owned resources. The DSO needs a contractual agreement with the private customers willing to participate in grid operation using demand response schemes. The assumption is that those private customers who participate have installed a HEMS [37]. The HEMS is a local controller, installed locally at the private consumer household, that is simultaneously responsible for optimizing the consumption of the household itself and the computation of the flexibility available for the different periods of the day.
The HEMS acts as an interface between the LVC tool and the consumer's household appliances. It is responsible for communicating the flexibility available to the DSO and for receiving consumption set-points sent by the DSO. The interaction between the DSO and the private consumers willing to participate in grid operation is through the gm-hub, which collects flexibility offers from the private consumers. Furthermore, the gm-hub is also responsible for receiving the control actions from the DSO (flexibility activation requests) and communicating them to the HEMS [23]. The LVC tool operates in two main timescales: preventive scale (typically one day ahead, quarterly-hour intervals); and quasi-real-time scale (typically 15 min ahead).
In the preventive timescale, the algorithm requires forecasts of generation, load, and flexibility provided by private consumers to determine a preventive control action to apply to the LV network controllable resources [33,34]. The DSO receives these control actions produced by the preventive control module and validates them. The DSO can accept or change the control action.
In real-time timescale, the algorithm uses a state estimation algorithm, the LVSE, to obtain a snapshot of the network in real-time recurring to a subset of the measurements of the smart meter available in the LV network [38,39]. It is essential to highlight the requirement for the usage of an LVSE algorithm since current advanced metering infrastructure (AMI) solutions are unable to provide accurate synchronized real-time measurements in useful time [39]. The main objective of the real-time control module is to assess the actual network conditions registered in real-time and compare them to the forecasted conditions at the preventive stage. If these differ significantly, the control action is updated accordingly. Therefore, the real-time control module of the LVC tool has a corrective character, acting solely if the network conditions significantly differ from what was forecasted.
Given the unbalanced nature of LV networks, due to the existence of single-phase and unbalanced three-phase resources, the LVC algorithm recurs to an unbalanced three-phase power flow algorithm to obtain a detailed network snapshot for each instant of the control period. The unbalanced three-phase power flow routine was implemented according to the formulation presented in [40] and covered in a previous publication [36].

Objectives of the SRA and Scenarios
The objective of the SRA in Cluster 02 is to stress the networks and tools using different integration levels of DER, RES, networks with different sizes, and networks with other electrical characteristics. Similar to Cluster 01, it is possible to analyze all the smart grid functions of the cluster separately. However, anew if the SRA focuses on the LVC (main smart grid function), the analysis can provide a holistic analysis and indirect analysis of the other smart grid functions used in the cluster. Nonetheless, it was necessary to limit the number of scenarios to consider, as there are a large number of variables involved. Thence, the SRA considers worst-case scenarios, i.e., scenarios that could impact the grid's controllability, the tool's performance time, number of avoided violations, or the grid's RES hosting capacity.
With respect to scalability, the following parameters are considered: • Network size: increase in the number of nodes since it directly influences the computational effort; • Penetration of RES in the network: increase in the RES penetration in order to create constraints within the LV network and to evaluate the potential of the tool to host more renewable energy; • Flexibility from HEMS: increase the number of consumers equipped with HEMS to observe whether HEMS can be used as an alternative to DSO's owned assets such as OLTCs or ESSs; • Number of controllable devices: increase in the number of controllable devices in the households to evaluate the impact on the resulting load profile and their energy savings.
Concerning the replicability the following parameters are considered: • OLTC control: evaluate the potential of the set of tools when the secondary substation transformer is controllable, as currently not many secondry substations are equipped with OLTCs; • Energy storage system control: evaluate the possibility of using central or distributed ESS; • X/R ratio: modify the the X/R ratio to evaluate the performance of the set of tools in more inductive networks; • Availability of historical data: modify the amount (time horizon) and the quality of the historical data available for the forecasting and LVSE tools, to assess the impact on the overall forecasting accuracy.
Analogous to Cluster 01, due to the serious number of simulations performed, the scope of this paper is limited to several simulations. The selection is based on the most significant analysis for the Portuguese demo. Thus, Table 4 provides an overview of the simulations considered within the scope of this paper, although not all the internal iterations are exposed for each scenario due to the length of the paper. These internal iterations are based on the type of resources the LVC is able to control, being:

Baseline-Portugal
The baseline scenario is a small radial LV network with approximately 30 nodes. The network has the electrical characteristics of a typical Portuguese LV network, described in Appendix B. Moreover, Figure A1 from the Appendix, is a single-line representation of the network diagram with the electrical characteristics shown in Table A2. Additionally, Table A3 collects the microgenerators' installed capacity, the loads and the HEMS apparent power considered in the baseline. The radial network is composed of 33 buses and 32 lines.
The assumption is that the network consists of 24 microgenerators and 43 consumers, 20 equipped with HEMS. It is also assumed that a DSO-owned 10 kW/30 kWh ESS, installed at the secondary side of the MV/LV transformer. The consumers were distributed between the three phases according to their contracted power to reduce unbalances between phases.
The network, when simulated, already presents over-and undervoltages. Not all the potential solutions considered tackled the voltage problems. The ideal solution of the LVC controlling all the available resources, although the LVC was only recurring to the OLTC, mitigates the voltage violations with an average execution time of 0.39 s. The results are depicted in Figures 9 and 10 Figure 10. Baseline voltage profiles, after the application of the LVC controlling all resources.
Given the case of the LVC using only the flexibility from the 20 available HEMS, the LVC does not solve all voltage problems. Although all the undervoltage problems are mitigated, the overvoltages are only attenuated but not solved. The average execution time is 1.37 s. The use of the ESS and HEMS by the LVC also cannot mitigate all overvoltages registered. The result is that the storage system location is the most efficient in addition to HEMS flexibility not being enough. However, the LVC mitigates all undervoltages scoring an average of 1.63 s. Applying load and generation curtailment technique by LVC, the LVC solves the voltage problems within an average execution time of 1.58 s and curtailment of 19.07 kWh. •

Large Network
In this scenario, the network size increases to approximately 150 nodes to evaluate the LV performance when facing larger nodes and resources. The resulting network is represented in Figure A2 in Appendix B. The ratio of consumers with HEMS, the ratio of microgenerators-to-consumers were kept constant. The result is a network with 223 consumers, 82 of them equipped with HEMS (distributed homogeneously) and 114 microgenerators.
Similar to the baseline, the scaled network presents voltage problems when there is no LVC. However, the LVC in this scenario is to solve the voltage problems. When the LVC considers all available resources, it recurs to the OLTC to solve the overvoltages due to the solar injection. Then, the LVC to solve the undervoltages, it is necessary to activate the OLTC, ES, and HEMS. The LVC algorithm first uses the OLTC positions. Once the OLTC reaches its maximum tap position, the algorithm tries to use the ESS. As the ESS resource is exhausted, the LVC recurs to the activation of 2 HEMS devices. The LVC needs an average execution time of 9.15 s. When the HEMS is the only resource for the LVC, it is necessary to activate 28 HEMS to solve under-and overvoltages with an average execution time of 64.26 s. When the LVC controls the ESS and HEMS, the ESS reaches its max SOC to solve the overvoltage problems and drops to less than 30% to solve the undervoltage violation. Using this combination of assets, the total amount of HEMS activated reduces, but the average execution time increases to 74.27 s. Concerning the curtailment of load and microgeneration to solve all voltage associated problems, the LVC needs to curtail 3.41 kWh of energy generation and 6.85 kWh of consumption. In this last case, the LVC needs an average execution time of 11.94 s. •

Location of HEMS
The location of assets is key in distribution networks [41]. Hence, in this scenario, the aim is to investigate the actual HEMS impact in the network. The baseline scenario is used for comparison. The simulation results are collected in Table 5. Based on the results above presented, the location of the HEMS has a significant impact, as expected. While in the baseline, the available flexibility is not sufficient to solve all of the voltage deviation problems registered, the LVC in this scenario is able to solve all of the forecasted voltage deviation. Furthermore, it can also be seen that the total amount of flexibility required from HEMS decreases due to the location and if there is an activation of the ESS. Concerning the computation type, the average execution time decreased 36% for the HEMS and 31% for the HEMS and ESS. Although the results are expected, the simulations are empirical data to assess the decision-making process of the DSO in order to encourage the appropriate engagement of those customers located ideally at the end of the feeder. The fact of engaging these customers has an impact in potential future resources as the ESS, as less flexibility is needed to solve the voltage problems and these problems tend to be very localized. •

Distributed Energy Storage Systems
The objective of the scenario is to evaluate the impact of distributed ESSs on the controllability of the LV network when there is a high integration of DER along with the LV feeders. The assumption for this scenario is the inclusion of 5 ESS being one centralized, in the secondary node of the MV/LV transformer, and 4 distributed along with the feeders. Additionally, this scenario considers 49 generators and 54 consumers, 33 of them equipped with HEMS. In Table 6 are listed the characteristics of the ESS devices considered.
The results of the simulation are collected in Table 7, which includes the total flexibility required from HEMS, from ESS (E ESS ), and the active power loss (P loss ) reduction. Based on the results, and as previously stated in the baseline, the HEMS and ESS combination for the baseline when there is a centralized ESS cannot solve the voltage problems. In comparison, when considering distributed ESS, the problems are solved and require less flexibility from the ESS and the HEMS, which impact the costs of operation for the DSO. Hence, this remarks the importance of DER when dealing with voltage problems at the LV side, which tend to have a localized character. The LVC needs an average execution time of 0.81 s for distributed ESS while the centralized needs 1.63 s, reducing the computational burden. •

Inductive Network
This scenario aims to study the behavior of the LVC tool for an inductive character LV network (e.g., urban network). The X/R ratio of the lines was increased by a factor of 2 compared to the baseline scenario. The electrical characteristics are listed in Table A5 of Appendix B. The installed capacity of loads, generators, and HEMS is similar to the baseline scenario are listed in Table A3.
The voltage profiles before and after the use of the LVC are depicted in Figures 11 Figure 12. Inductive network voltage profiles, after the application of the LVC using all resources.
As expected, the LVC can solve the voltage problems regardless of the assets used (all resources, HEMS, ESS and HEMS, and curtailment of load and microgeneration). Nonetheless, the most exciting result is that the voltage fluctuates less than the baseline when using the LVC. Hence, the LVC is effective even in a more inductive network. •

Forecast Functions
In this scenario, the objective is to study the impact of forecast quality on the output of the preventive module of the LVC tool. This scenario uses the baseline network while the data input for the forecasting tools is changed as follows: • Scenario A: 12 months of historical data; • Scenario B: 3 months of historical data; • Scenario C: 12 months of historical data, with missing values.
The results for the different simulations (A, B, and C) are summarized in Table 8 with positive results as all voltage problems are solved. From the comparison of the average normalized root mean square error (NRMSE) of scenario A and scenario B, the amount of data available has a positive impact on the error values-the error increases from 4.77% in scenario A to 4.86% in scenario B. Furthermore, it is also possible to see that missing data harms forecast quality. Comparing scenario A to scenario C, it is possible to see that the error increases from 4.77% to 5.02%. The control actions produced by scenarios A, B, and C are very similar. Nonetheless, Table 9 collects the amount of flexibility required from each HEMS when the LVC only considers the HEMS as an available resource. •

State Estimation Functions
The LVC real-time module is dependant on the output from the estate estimation. Hence, three scenarios are used with different availability levels of real-time smart meter measurements to evaluate it. The network considered is similar to the one of the baseline scenario and the load, generators, and HEMS distribution.
• Scenario 1 (oracle): real data is considered (all smart meter measurements available); • Scenario 2: 50% of real-time smart meter measurements available; • Scenario 3: minimum real-time smart meter measurements available.
The mean absolute percentage errors (MAPE) obtained for the state estimations produced in scenarios 2 and 3 are collected in Table 10. Scenario 1 is not included as it is the oracle which uses perfect data. The state estimation results considering different amounts of smart meter measurements are very similar. The MAPE is around 0.30% for both scenarios, resulting in a high level of accuracy of the LSVE even when limited data are available. Table 11 shows a comparison example of the preventive and corrective set-point plans established by the LVC tool for the HEMS connected to node 22, phase T, for all the scenarios. The snapshot produced by the LVSE tool was sufficiently similar to the voltage values obtained at the preventive control stage. Therefore, the previously established control actions did not require any update. It is worth noting that this result is an important validation step. The result compares the actual voltage values registered in the network with the values obtained through the LVC unbalanced power flow routine, based on forecasts for the load and generation.

Discussion
Similar to Cluster 01's approach, the SRA took the point of view of the LVC. However, the analysis is considered a holistic analysis as the tools impact the LVC and are modified.
Based on the several simulations performed, the OLTC can solve most of the voltage problems related to the increase in RES capacity or peak load, e.g., derived from simultaneous EV charging, in small and well-balanced networks. The ESS located at the secondary side of the transformer has a positive but limited effect on network operation. On the contrary, distributed storage is a more efficient solution to solve voltage violations in LV networks. This result is not surprising but helps the DSO to have data to support their potential inclusion into their operation based on location. In addition, it shows the capabilities of the LVC as a central tool for LV predictive maintenance in either case. However, if the network increases, neither the OLTC nor the central EES can mitigate the network violations. Contrariwise, distributed resources, such as HEMS enhance the controllability over LV networks since voltage violations are very localized. The adoption of distributed technologies enables an increase in the hosting capacity, enabling RES, and other DER, such as EV.
Therefore, DSOs responsible for large resistive networks will need to ensure adequate controllable devices within the grid to support active voltage control in future network scenarios. Distributed technologies solutions can provide a technical and cost-effective alternative to costly and time-consuming network reinforcement methods.
The flexibility of HEMS and distributed ESS showed adequate potential in achieving voltage control and reduced active power losses within the LV network. DSOs should, therefore, leverage the active engagement of customers to ensure the safe and reliable operation of their networks. In particular, the DSO should consider those customers close to the nodes that present the highest potential for voltage violations as key customers to participate in these types of flexibility schemes. These customers should be highly encouraged (possibly through incentives) to become active participants in network operation.
Concerning the forecasting and state estimation functions, the results show that the quality and amount of historical data available did not significantly affect the control actions produced by the LVC. The errors obtained were sufficiently small to not require any updates to the preventive control actions, therefore showing the accuracy and reliability of the proposed tools under Cluster 02. Cluster 03 is composed of tools that can assist the DSO in the safe operation of its network while customers provide their flexibilities to the manual frequency restoration reserve (mFRR) market. The TSO controls the mFRR market and, therefore, after the flexibilities of the flexibility operators (FOs) have been pre-qualified, the TSO can activate offered flexibilities. Thus, the DSO is currently not involved in the offering and activation process of flexibility bids. Depending on the volume of flexibilities and the dimensioning of the network, the activation of flexibility bids can lead to an increase in the number of constraints in the DSO's network. Such constraints can be, for instance, the overloading of transformers and cables or over-and undervoltage.

Case
Within the InteGrid project, a traffic light system (TLS) has been developed (algorithm), which is involved in the flexibility bid offering and activation process. Thereby, it can curtail flexibility offers if network constraints are foreseen or suggest alternative flexibilities to be activated if an activation would cause problems in the network.
The TLS has two operation modes: • Day-ahead: In the day-ahead mode, the flexibility operator (FO) periodically sends its flexibility bid offers to the TLS before the gate closure of the market. The TLS analyses these offers and flexibilities, which could lead to network constraints. With this information, the FO can adapt its bids to not interfere with the safe operation of the DSO's network. Before gate closure, the FO sends its final bids to the TSO, which the TLS has validated. If the TSO accepts the offers, the bids can be activated on the next day for the mFRR market; • Intraday: In intraday, the TSO can activate the bids accepted on the day before. Thereby, the TSO forwards a bid activation to the TLS. It evaluates the bids to be activated and suggests an alternative bid activation to the FO if the activation would lead to network constraints.
Hence, Cluster 03 operates with various smart functions as depicted in Figure 13. The TLS is located within the DSO's premises. Thence, it has full access to the MV network model of the DSO. Furthermore, it periodically gets informed about the current state of the network including, for instance, the position of the breakers. In order to predict constraints in the network, the TLS uses load and RES forecasts for the next day. These forecasts are based on historical data like load and generation measurements and on external data like weather forecasts. In InteGrid, a commercial virtual power plant (cVPP) acts as a FO. The cVPP's portfolio has various flexibilities, including, among others, a wind park, batteries, industrial customers, such as a wastewater treatment plant, and PV. The cVPP has its forecasting algorithms to predict the available flexibility volume on the next day. The TSO and the mFRR market are simulated with a TSO simulator. As previously stated, the TSO simulator is responsible for accepting the flexibility bid offers at gate closure and for activating bids for the mFRR market.
The TLS combines the previously mentioned data sources: forecasts, the network model, and the flexibility bids and their activation to predict and solve network problems caused by the flexibility bids. For these evaluations, the TLS leverages an instance of the same MPOPF used in Cluster 01. Using the MPOPF enables considering technical aspects-the safe operation of the distribution network (DSO)-and economic interests-a large flexibility volume with favorable prices (TSO).
In both cases, the TLS uses the data for the forecasts and the network model with the current switching state provided by the DSO. In this process, there is no sensitive data shared with third parties.
However, the flexibility bids from the cVPP and the TSO's activation signals come from sources outside the DSO's premises. These data are sensitive and should be transmitted with secured and encrypted connections. Otherwise, competing cVPPs, for example, could adapt their bidding strategy to the current leaked bid offers, which results in unfair competition. Therefore, the gm-hub is the interface between the TLS and the cVPP and TSO simulator for secure (encrypted) data transmission.
The MPOPF which is a key part of the TLS, has a quadratic cost function which is shown in Equation (1) on page 8. This type of cost function is usually used to reduce the cost of generation. The factors a t i and c t i are set to 0 in order to increase the amount of flexibilities that can be activated while considering the costs of the flexibilities. The linear term in the cost function uses different factors b t i for the upward and downward direction. Equations (4) and (5) show the calculation of the factors b t i for the upward and downward direction where p t i is the energy costs for flexibility i at the timestamp t and s is a small positive parameter in comparison to max j∈F (p t j ).
Prices for generation are assumed to be positive, when neglecting the parameter s. Equation (4) shifts all prices to non-positive numbers, such that the most expensive flexibility with the price max j∈F (p t j ) is 0 € MWh −1 . The optimiser activates as many flexibilities as possible because the injected powers are positive (producer frame) and if the prices are negative. Therefore, when minimizing the cost function, the optimizer gets rewarded for activating flexibilities. With the calculation of the factors b i,up , the cheapest flexibility has the most considerable absolute value and has, therefore, the most substantial weight in the cost function, while the most expensive flexibility has the smallest weight. The constant s is used to shift the most expensive flexibility from 0 € MWh −1 to −s such that the optimiser is also slightly rewarded for activating it. In the downward case, negative prices are shifted to non-negative values because the active power injection of loads is negative. The product of b i,down and p i results again in a negative number and the optimizer is rewarded for activating flexibilities.

Objectives of the SRA and Scenarios
The objective of the functional SRA for Cluster 03 is to help answer the following questions: • What is the maximum flexibility volume in the network which can be activated without violating any network constraints? • Does the TLS limit the provision of flexibilities in the DSO's network, and does it curtail the flexibilities fairly? • Which prerequisites and conditions are needed such that an operation of the TLS is needed?
Following the same logic as in Cluster 01 and Cluster 02, the SRA for Cluster 03 focuses on the results of the TLS to directly analyze this tool and indirectly the other tools. The SRA, nonetheless, is performed from the DSO's perspective and modifies different parameters. From the viewpoint of the TLS, the flexibilities are treated as technology-neutral. The TLS only considers their location and offer prices. Furthermore, if multiple FOs offer bids for evaluation, the bids are aggregated such that the TLS cannot link flexibilities to their operators.
Concerning the scalability, the following parameters are modified: • Flexibility from the cVPP: increase in the flexibility offered by the cVPP to evaluate the maximum amount of flexibility that each feeder can sustain; • Network size: the size of the network has a direct influence on the computation time of the TLS. Hence the number of nodes is changed.
With respect to the replicability, the following parameters are modified: • Bid prices: use different bid prices from homogeneous price to increasing and decreasing linear prices; • Distributed generation: increase in distributed generation in a selection of feeders to evaluate the impact in the amount of upward reserve which could be provided; • Electric vehicles: addition of electric vehicles in a selection of feeders to evaluate impact in the the amount of upward reserve which could be provided; • Urban/rural networks: the analysis is carried-out on different grids to be as representative as possible; • Forecasting accuracy: the impact of the forecasting accuracy on the post-activation evaluation is considered.
In comparison to Cluster 01 and Cluster 02, the simulations are performed on a feederlevel. In order to make the results comparable, the tapping position of the OLTC of the primary substation is fixed and the voltage on its HV-side is assumed to be 1.0 p.u. Each node in the network has an lower voltage limit of 0.9 p.u. and an upper limit of 1.1 p.u.
Cluster 03 uses the same Slovenian (SI) and Portuguese (PT) networks for the analysis as in Cluster 01. However, due to the large number of scenarios that can also have subscenarios, selected scenarios that yield the most relevant results are presented within this paper. These scenarios are collected in Table 12.

Baseline-Slovenia
For the baseline scenario for scenario, the demonstration network in which Cluster 01 and Cluster 03 have been demonstrated is used. Details of the topology and properties of this network have already been described in Section 3.1. It consists of four networks (islands) which are denoted as "Domžale TF1", "Domžale TF2", "Mengeš TF1" and "Mengeš TF2". Similarly to Cluster 01, no constraints are created with the currently available flexibility volume. These simulations have been performed with flexibilities with a total active power volume of 1.9 MW. Due to the over-dimensioning of many distribution networks in central Europe [6], the currently available flexibilities have a minor impact on the network condition. Therefore, they provide potential for additional flexibility. In the next sections the analysis of additional flexibility which can be added to the network without exceeding the network limits is discussed. •

Large Homogeneous Flexibility
In this scenario, the analysis focuses on the maximum flexibility that can be activated without causing network constraints. This is achieved by adding large flexibilities with 50 MW to each node in the network. The addition is done for downward and upward flexibilities separately, where downward means flexibilities which can increase their load or can decrease their generation. In contrast, upward flexibilities refer to a decrease in load or increase in generation. With 50 MW it is guaranteed that not a single flexibility can be fully activated without creating constraints in the network. Thus, the solution of the evaluation of the TLS provides the maximum potential in terms of flexibility volume. Table 13 shows results for the flexibility potential. Thereby, the results for one feeder per network which has been selected is shown for both directions. Furthermore, it gives information about the number of critical lines, the number of critical nodes, and the number of critical transformers. Lines and transformers are referred to as "critical" when they are limiting the activation of additional flexibility into the feeder and, thus, reach their thermal loading limit. Critical nodes also reduce the flexibility that can be activated because they reach their voltage limit in the simulations. The column minimum and maximum flexibility quantify the number of flexibilities that can be activated for the hour with the smallest or largest volume within the 24 h. The results show the networks are load dominated. When comparing the upward with the downward results, more flexibility can be activated in the upward direction. When considering all feeders and not only those selected, as shown in the Table 13, 20 out of 21 analyzed feeders are constrained. The constraints are mainly by the overloading of lines for the upward direction. Only one feeder-which is also presented in the table-is also limited by overvoltage. For the downward case, in one network, in three out of four feeders, the flexibility potential is limited by the thermal limit of the primary substation. For the other feeders, the limiting element is, in all cases, one line. Lines that are close to the primary substations are, in most cases, the limiting factors (thermal limit) for those feeders. •

Reduced Homogeneous Flexibility
For the large flexible resources, only a few flexibilities are activated by the MPOPF. To get a better distribution of enabled flexibilities, the maximum activate-able volume of flexibility is distributed evenly across all network nodes. Equation (6) shows the formula for calculating the quantity of the flexibilities P flex , where F is a set of all flexibilities, P i is the active power activated from the MPOPF for flexibility i and α is a factor more significant than one to ensure constraints in the network (α = 1.05 in the simulations). This approach is applied individually for upward and downward flexibilities and all feeders. Figure 14 shows the available flexibility for all feeders of the Slovenian demonstration network for the downward direction. The results show that the location of the flexibilities plays a crucial role. In this scenario, it would be, in theory, possible to obtain the same flexibility volume to be activated as in the previous scenario. However, in some feeders up to 40 % less flexibility can be activated without causing problems in the network. Long feeders, such as "22051062" or "22051064" show a volume reduction, whereas short feeders, such as "22050999" or "22051034" are not considerably effected.
For the upward flexibilities, the results are comparable to the results in Figure 14, the maximum relative change is again at approximately −40 %, and long feeders get curtailed to a greater degree. •

Linear Prices
The last two scenarios show that each flexibility has been treated the same from a technical perspective: all flexibilities have the same active power volume and price. Therefore, the solver of the optimization problem activated or curtailed the flexibilities depending on their location in the network. However, in energy markets, the price of the flexibilities becomes substantial when selecting the flexibilities to be used. In addition to the technical constraints of the network, economic interests have to be considered as they are an essential factor.
Thence, this scenario analyzes the influence of the price on the flexibility volume that can be activated. As a baseline for comparison, the results of the previous scenario are used. A linear price change is assumed from the flexibilities at the beginning of the feeder to the feeders located at the end. The scenario is split into two sub scenarios. In the linear price decrease scenario expensive flexibilities with 300 € /MWh are at the beginning of feeders and the prices decrease linearly to 0 € /MW h for flexibilities at the end of the feeder. For the linear price increase scenario, it is the opposite; cheap flexibilities are at the beginning of the feeder and expensive flexibilities at the end of the feeder. Figure 15a,b show the results for the linearly decreasing prices.
In the case of upward flexibilities Figure 15a only minor differences between the baseline and the price scenarios are expected because the MPOPF preferably activated flexibilities at the end of the feeder when the same prices are assumed. The same is for all feeders; the results are close to the baseline results except for feeder "22050790". Feeder "22050790" was the only feeder for which the upper voltage limits have been reached in the baseline scenario. Therefore, activated flexibilities at the end of the feeder lead to a non-ideal solution because less flexibility volume is needed to reach the voltage limit. In comparison for downward flexibilities and decreasing prices (Figure 15b), the MPOPF preferably activates flexibilities at the end of the feeder, which results in additional losses and violations of the lower voltage limits. Therefore, if flexibilities get activated in a technical non-optimal way, it reduces activate-able flexibilities.
In Figure 15c,d and plots show the results for flexibilities which prices increase linearly from the beginning to the end of the feeder. As previously mentioned, the optimizer preferred to activate flexibilities at the end of the feeder for the upward direction. When assuming increasing prices and upward flexibilities (Figure 15c), the prices mislead-from a technical perspective-the MPOPF to activate flexibilities at the beginning of the feeder. Therefore, the results show a reduced volume of activate-able flexibility. However, when analysing increasing prices for downward flexibilities, the technical results align with the economic results. The relative changes are small with less than −0.12 %, due to that the deviations between these scenarios.  •

RES Integration
The previous scenarios showed that many additional flexibilities have to activate with the current network conditions to reach the network limits. In the scenario, additional volatile renewable energy sources are added to the network to test if the TLS can handle networks at their limits. In feeder, "22050790", four additional wind turbines are added which have in total nominal power of 11.5 MW. Figure 16 shows in blue the upward flexibility, which can be activated without creating any network constraints with the currently installed loads and generation. The flexibility volume varies only marginally between 11.06 MW and 12.15 MW.
When adding the wind turbines (a historic wind profile has been used for this area), additional generation is in the network, and less flexibility can be activated in the upward direction.
Within Figure 16, in red is depicted the activate-able flexibility which varies between 0.62 MW and 8.76 MW.  Figure 16. Activate-able flexibility volume with and without additional wind turbines.

Discussion
The TLS is designed to solve problems in the network caused by flexibilities by using an MPOPF to consider the network constraints (technical) and the economic interests in the energy markets. The SRA conducted for Cluster 03 assisted in evaluating the TLS and MPOPF against future scenarios and challenging situations. The analysis could answer the questions stated for the SRA.
The maximum flexibility volume was computed using two approaches, (1) increasing the number of flexibilities (2) adding additional non-flexible loads and generation, which drives the networks close to their limits. These simulations considered the same price for all flexibilities. These simulations showed that the MPOPF, if not faced with an even distribution of flexibility, has a bias towards large flexibility. The consequence of this operation could potentially result in unfair treatment by the TLS where only flexibilities located at the right place are always activated and can limit the amount of flexibility that can be activated. Hence, the TLS does limit the provision of flexibility. By its design, it can be considered in some instances unfair when curtailing flexibilities.
From an economic point of view, the use of linear prices decreases the activate-able flexibility volume. In the worst case, the decrease is approximately −24 % in comparison to the scenarios where all the flexibilities have the same prices, as the price can mislead to activate cheaper flexibilities which are not the best technical solution. However, a tradeoff between the focus on technical and economic feasibility has to be made due to their contradiction.
When considering a future scenario with higher RES penetration (wind) to stress the TLS, the TLS performs correctly, decreasing activate-able flexibility volume. In the worst case, the activate-able flexibility decreases from 11.30 MW to 0.64 MW, whereas in other hours more than 8 MW. The result is interesting as with the increase in RES, the TSO might need more flexibility, but the volume from the distribution grid side might be limited.
The presented scenarios show that the TLS, combined with the cVPP, MV load, and RES forecasting and the MPOPF, can solve problems in the MV network caused by flexibility participating in energy markets. When problems are foreseen in the DSO's market caused by flexibilities and their simultaneity factor, the network operator has three possibilities to deal with this problem (1) restrict the number of flexibilities in the pre-qualification process (2) make grid reinforcements (3) curtail the flexibilities when needed by using approaches, such as the TLS. The first approach hampers the penetration of renewables in the network, while the second option might be expensive depending on the current status of the network.
When the problems caused by flexibilities are only expected to occur occasionally, the set of tools of Cluster 03 with additional measurement equipment can be used to solve these issues. The prerequisite is then to face problems caused by flexibilities.

Potential Replication Paths
The presented set of tools are implemented in real demonstration and developed within the context of an European project. Hence, this section tries to address and facilitate the potential replication of the tools presented. Current and future smart grid projects can capitalize on the experience gained. Thence, a simple replication path is developed to show a step oriented process which can guide future stakeholders in their endeavor towards implementing real smart grid functions in their projects. The replication path is depicted in Figure 17.  Furthermore, this is complemented by a checklist offered in Table 14. The checklist approach ensures that the significant aspects are considered and allows the stakeholder to assess the smart grid implementation success rate in any network under consideration. More specifically, this will enable stakeholders to adequately evaluate whether the feasibility of smart grid function implementation (from the technical perspective) is comparable to traditional network reinforcement methods. The SRA plays a vital role in this decisionmaking process, particularly for stakeholders who wish to enhance their networks in the direction of flexibility markets and increase TSO-DSO interaction.

Conclusions and Outlook
This paper presented the SRA of advanced smart grid functions for MV and LV grid monitoring and control, as well as for TSO-DSO coordination, conducted in the framework of real-world demonstration pilots. The SRA provides the DSO with valuable information regarding the potential impact of DER flexibility on the future network and captures overlooked functional and non-functional requirements for new functions in the distribution management system.
The results obtained in the demonstration activities showed that the developed tools are: (1) scalable as they perform correctly (e.g., meet expected computational performance, numerical results accurately capture grid operating conditions) in real conditions (e.g., large MV distribution grids) and (2) replicable since they can be implemented under different regulatory frameworks, electrical network characteristics (e.g., R/X ratio, number and type of DER and other assets) and data availability scenarios. The use of clustering in the SRA enabled an evaluation of the interdependence (and dependability) between tools and functions and their impact in the overall system performance, in particular, the impact of observability in MV and LV grid operation, which represents a more realistic scenario. Moreover, this methodology also provides a relevant dataset to study other domains of SRA (i.e., ICT, economic, and regulatory), enabling a more detailed analysis of the requirements and main barriers (see [30] for the ICT domain). Regarding the potential replicability of the different tools by other stakeholders, this work provided a simple step-process for the possible success or failure when replicating the tools.
In the literature it is possible to find similar algorithms and functions for distribution grid and VPP management and control. However, the SRA (especially the methodology) remains a not fully established research topic and this analysis should be considered before deploying large-scale systems to guarantee the performance of the different tools used in the future. The topic of SRA will gain more importance as the decentralization, decarbonization, and digitalization in the energy sector continues to grow. The SRA is a natural step for tools that envision real deployment. The SRA allows the DSO to become empowered by increasing his knowledge of the status and requirements of their network by evaluating the impact of smart grid solutions through the implementation of a wide variety of scenarios and network conditions for which DSOs will be challenged in the future. This work, therefore, offers various network stakeholders an overview of the SRA and its approach based on the outcomes of the implementation of the InteGrid advanced smart grid tools within each of the demonstration sites and bridges the gap between proof-of-concept and large scale deployment.

Abbreviations
The following abbreviations are used in this manuscript:  Table A1 presents the programming languages and technologies of tools presented in this paper and demonstrated in the InteGrid project. In this section are provided details regarding the characterization of the simulation scenarios of Cluster 02.

Appendix B.1. Baseline
The single-line diagram of the simulation network for scenario #1 (baseline) can be seen in Figure A1. In Table A2, are listed the electrical characteristics of the baseline scenario and, in Table A3, is listed the installed capacity of loads, generators, and HEMS.

. Large Network
In Figure A2 is shown the single-line diagram of the simulation network used in the Large network scenario. For the sake of clarity, we refer the reader to [28] for more details regarding the characterization of the simulation network.

Appendix B.3. HEMS Location
In Table A4 is listed the installed capacity of loads, generators, and HEMS of the HEMS Location scenario. The electrical characteristics of the simulation network of scenario inductive network are listed in Table A5.