Smart Grid Architecture for Rural Distribution Networks : Application to a Spanish Pilot Network

This paper presents a novel architecture for rural distribution grids. This architecture is designed to modernize traditional rural networks into new Smart Grid ones. The architecture tackles innovation actions on both the power plane and the management plane of the system. In the power plane, the architecture focuses on exploiting the synergies between telecommunications and innovative technologies based on power electronics managing low scale electrical storage. In the management plane, a decentralized management system is proposed based on the addition of two new agents assisting the typical Supervisory Control And Data Acquisition (SCADA) system of distribution system operators. Altogether, the proposed architecture enables operators to use more effectively—in an automated and decentralized way—weak rural distribution systems, increasing the capability to integrate new distributed energy resources. This architecture is being implemented in a real Pilot Network located in Spain, in the frame of the European Smart Rural Grid project. The paper also includes a study case showing one of the potentialities of one of the principal technologies developed in the project and underpinning the realization of the new architecture: the so-called Intelligent Distribution Power Router.


Introduction
A stable energy supply is a prerequisite for the social, industrial and commercial development of societies, and therefore any technology that will enhance it will cause a tremendous positive impact [1,2].Distribution networks, since coping with 95% of network infrastructure in Europe-and experiencing nearly 90% of all power outages and disturbances of the whole system [3][4][5]-have a key role for the achievement of the above-mentioned goals [6].
The conventional distribution (and transmission) networks were designed so that the electricity generation is often centralized in large scale power plants, away from populated areas [5,7,8].From these generating facilities, the electric power is distributed to consumers thus mostly yielding predictable unidirectional power flows [3,5].The above paradigm is rapidly changing by the massive inclusion of renewable and distributed generation, the adoption of an active role by consumers and the emergence of new actors in the fields of the stationary energy storage and electro mobility [3,[9][10][11][12].Such technological revolution demands a development of new mechanisms for ensuring the flexible, stable and efficient operation of electrical networks and markets (so making the grid smart), and also for their planning and reinforcement in their modernization [9].For instance, the German Energy Agency (in German, Deutsche Energie-Agentur) shows in a recent study that the required amount of network reinforcements for the German power grid for the "Energiewende" until 2030 entails investments between 27.5 billion e and 42.5 billion e [13].Accordingly, the planning of innovative grid update strategies could be translated into massive economic savings in the required network reinforcement costs [10].
Both the scientific community and industry are proposing and adopting different actuations to transform traditional distribution grids into active, Smart Grid ones [3,7,9,10,[14][15][16][17][18][19][20][21][22][23][24][25][26][27].In this sense, actuations mainly tackle the exploitation of new communication capabilities and distributed energy resources.All proposals are aligned with the idea of transforming a radial and dumb distribution system into a meshed intelligent one.This transformation focuses mostly on the inclusion of advanced meters, and deploying telecommunications and distributed energy resources that provide new functionalities such as self-healing, high reliability and power quality enhancements.Additionally, other issues such as the cybersecurity, the distributed energy resources integration, the asset utilization optimization, and the minimization of operations and maintenances expenses are also treated.
Contributing to such proposals, this paper proposes an innovative grid architecture to transform a real and traditional rural distribution grid into an active and smart one.This architecture relies on exploiting the convergence between electrical and telecommunication networks and this is one of the main contributions of the paper and project [28].In the management plane of the architecture, the work undertaken aims to show how utilities can operate more efficiently and to interconnect energy between a variety of actors including prosumers, consumers, distributed generation and energy storages, to enable multi-directional power flows [29].Such power flows are managed by an innovative hierarchical management tool, enabling the optimal operation of the rural grid while both isolated and connected to the main distribution grid.
In the power plane of the architecture, power flows are controlled by exploiting the flexibility provided by a variety of wired and wireless communication technologies that helps to cope with geographical restrictions of the rural environment, along with an innovative so called Intelligent Distribution Power Router (IDPR) device.This device, which is based on power electronics and secondary batteries, permits actually routing power between each of the phases of the three-phase distribution system, thus ensuring the required network power balance and quality.
The whole formulation of the innovative algorithms in the management plane can be found in [30][31][32].Thus, this paper mainly focuses on the transformations evolving the power plane: such actuations evolving the network into a smart new one.The management plane is secondarily addressed by quantifying the algorithms performance managing the network under different operational scenarios.It should be noted that the aim is to assess the potentiality of including a set of new Smart Grid technologies and power electronics in different parts of the network but not to specifically quantify the impact such technologies into the global grid performance.Therefore, the present work, instead of deeply discussing the mathematics presenting the management algorithms, opts for describing in a holistic way all actuations to evolve the distribution network into a smart new one.These actuations cover the management but also other updates on the power plane, i.e., telecommunication network and innovative power electronics with embedded storage.In addition, as a difference with reference [31], the present paper depicts a study case evaluating the impact of the above-mentioned actuations around the inclusion of power electronics to evolve the rural grid, while study cases in [31] focus on the management of the whole smart grid.
The work presented in this paper is framed into the European research project Smart Rural Grid (SRG).The project key impacts are directly related with the delivery of significant cost and investment savings in rural electricity distribution (by overall reducing the percentage of electricity lost during electricity distribution and the gap between electricity generated and electricity consumed).They also refer to allowing for an increased potential to inherently accommodate the integration and distribution of renewable energy sources.Moreover, it enables new operation modes that guarantee the continuity of supply and reliability even in the case of the external failure conditions [18,26,28,[30][31][32].
The contents of this paper have been structured into five main sections.First, Section 2 presents the typical characteristics of rural distribution networks, also focusing on that for the adopted network.Second, Section 3 introduces the proposed architecture (both addressing management and power planes) evolving the rural network.Third, Section 4 describes the new operation modes for the network enabled by the new architecture.Fourth, Section 5 develops a study case that shows the performance of the new architecture (focusing on the power electronics included to provide advanced services).Finally, the main conclusions of the work are presented in Section 6.

Typical Rural Distribution Networks
This section presents the main features of rural grids, stressing in the usual characteristics for electrical infrastructure, e.g., the topology of network, the typical protection devices and so on; and for the telecommunications network, e.g., the communication technologies (in Section 2.1).Then, this section also presents the Pilot Network (PN) adopted for the purposes of the SRG project, which will serve to define the proposed architecture and the study case in subsequent sections of this paper (in Section 2.2).

General Features of Rural Distribution Networks
Focusing on the rural systems, the majority of rural distribution networks comprise long overhead Medium Voltage (MV) lines, which are operated between 1 kV and 36 kV [5,23] with bare cables [4].From these MV lines, overhead Low Voltage (LV) lines feed customers up to few hundred meters away by crossing valleys, mountains and forests.Furthermore, due to the orography, these networks are difficult to access, which is aggravated by adverse meteorological conditions.Both line types can basically be considered resistive.Historically, overhead lines with bare cables were erected because they are the most cost effective way to provide power supply to rural and remote areas [4].This type of electrical line is critical because the majority of failures suffered in rural distribution systems occur precisely in overhead bare lines during severe weather conditions.In particular, according to [4], about 62% of all middle voltage network faults are caused by nature; with adverse weather conditions, this figure increases up to 92%.
The rural distribution circuits are sized according to their mechanical factors rather than according to voltage drops or maintaining the continuity of supply to a number of large consumers [5,23].Accordingly, Distributed System Operators (DSOs) have been replacing the LV overhead bare lines with overhead or underground three-or four-wire cables, which are more reliable but more expensive.However, the majority of MV lines are still overhead bare conductors.
The typical topology of rural systems is radial [5,8,23] and usually connects dispersed consumers across a wide territory.This yields important variations in voltage levels between the feeder and different consumption points [4].In contrast to the urban distribution networks, the capacity of rural lines is limited by the important voltage drops and mechanical requirements, not by the thermal rating of the conductor [5,33,34].In addition, the rural distribution networks lack strong interconnections with transmission systems, thus converting rural networks into weak systems [33].
The configuration of rural systems cannot be easily changed because there are few switches and disconnectors, in addition to being manual and in remote locations [4,35].The electrical protections are also weak because they are sacrificial protections like fuses [4,35].In contrast to urban, industrial and commercial mesh networks, the rural ones usually have only an upstream protection device that disconnects the whole system in case of any fault.This greatly reduces the network resilience and increases the number of hours without supply to the consumers.Therefore, it is recommended to improve the resilience and performance of the system by sectionalising the network with recloser or automatic recloser circuit breakers, including back-up distribution substations, and by deploying Distributed Generation (DG) and fault indicators [4].
Rural distribution grids are more vulnerable than other grids.The aged infrastructure of a rural network combines with the other usual challenges in this kind of location, where we can find lower quality indices (number or time of interruptions), difficulty of access after electrical contingencies, voltage variations, grid congestion, tree pruning and scattered consumption.All of this requires updated solutions and cutting edge technologies for facing them.
Traditionally, electrical utilities have solved these issues by building new secondary substations, lines, and other electrical infrastructures.Even in specific cases, capacitors are deployed in order to compensate reactive power flows and reduce voltage drops.In addition, the new DGs have exacerbated the issues mentioned above, demanding more static and non-flexible reinforcement of the network.
In addition, rural grids, unlike urban ones, usually have no communication infrastructures.Therefore, DSO ignores what is happening there and is not able to take actions to face network eventualities, thus increasing the time without supply for consumers.However, the DSOs are progressively deploying telecommunications in their networks for managing Smart Grid technologies, e.g., smart meters and new protection devices.They have been typically used in their networks the following communication technologies [22,36]: (i) Power Line Communications (PLC), which use the distribution lines and cables as a transmission channel; (ii) Wireless or Radio Communications (WLC), which use the radio technologies for transferring between two or more points the information; and (iii) Fiber Optical Communications (FOC), which use pulses of light through an optical fiber for transmitting information.The FOC has the best transmission properties, reaching hundreds of Gbps; unfortunately, the civil works associated with the infrastructure deployment are very expensive, thus restricting their applicability to urban environments and high voltage transmission networks.The WLC has good transmission properties and may reach transmission rates on the order of tens or even hundreds of Mbps.Moreover, the WLC is featured to be reachable, which means that it could provide data access at rural and remote areas where wired connectivity is next to impossible; simply, in order words, its development is easier in comparison to a wired network and it has facile maintenance.Nevertheless, the hard orography and adverse meteorological conditions may accentuate the service degradation and undergo problems.In general, the WLC is a good option for non-critical networks like rural ones, either by subcontracting the service to a telecommunications operator or using private infrastructure.Finally, the PLC for long distances (up to 3 km) can reach few tens or even hundreds of kbps, with the additional advantage that uses distributor transmission channels and so no special license is required for its exploitation.However, the conduced electromagnetic interference and abrupt line impedances variations may also degrade the service and present issues [22,24,36].To sum up, the PLC together with WLC are viable options for non-critical rural environments.
When combined with advanced communication and control technologies, this increasing penetration of small distributed power plants, electrical storage systems and electric vehicles can contribute to overcoming rural grid weaknesses while defining a new electric paradigm.In this new electric paradigm, new local electric generation and distributed electrical storage is optimized for its optimum purpose.Therefore, now is the time for defining a new proper rural network with a high quality power supply that has neither electrical interruptions nor sudden voltage drops.With the addition of a reliable and robust telecommunications infrastructure, all of this will provide incentives to rural producers and small enterprises for investing there.

A Particular Pilot Network in a Rural Area
The SRG network is focused on a real rural distribution grid with a substantial potential for improving efficiency, in particular in terms of continuity of supply [34].The distribution network where the project is carried out is the last part of a 5 kV network in a rural zone operated by EyPESA (Distribution System Operator, Granollers, Spain) [37].EyPESA is a DSO that operates a distribution system in Catalonia (Spain).EyPESA provides service to around 56,000 customers along its 1,500 km of lines [37].The principal particularity of the EyPESA system is that about 50% of its network is deployed in a rural environment where over two-thirds of the customers are from the domestic and service sectors.The EyPESA network is connected to the transmission system at 220 kV through two fully automated primary substations.Internally, the DSO distributes the electricity at 40 kV and then to networks at 20 kV, 5 kV and 3 kV, through automated primary substations.Finally, the DSO distributes to its clients using LV networks through Secondary Substations (SSs) that are mostly not automated.
The network chosen here concerns an area with a low population density, barely 25 customers distributed across four low-level secondary substations (see Figure 1) and who are residential and agrarian.This network is characterized as a non-manageable radial grid, where operational safety is guaranteed-as in traditional networks-through manual switch-disconnectors and fuses.Furthermore, failure detection and access is complicated by the fact that the MV lines of the grid cross valleys and mountains, exposing them to adverse weather conditions.
As seen in the right-upper part of Figure 1, the electrical scheme of the PN is depicted.An overhead bare line comes from a substation which interconnects to a 40 kV subtransmission system located several thousand meters from the PN.In the PN, the overhead bare line covers from several hundred to a few thousand meters, constituting the MV network at 5 kV.In that network, three manual switch-disconnectors can be tripped during maintenance tasks (see Figure 1).The MV lines end at the three-phase circuit breakers of each SS.The three-phase circuit breakers are directly connected to the SS transformer.Following the SS transformer are the LV lines, which are four-wire braided cables that are protected by single-phase fuses, providing passive protection in case of overcurrent.Finally, the SS LV networks supply customers dispersed around the rural area.Each of them is equipped with a smart meter and a power switch that limits maximum power consumption and provides protection against grid eventualities (though it does not actively manage the load).Most of the clients in the PN demand a single-phase power supply, and this is translated into an unbalanced load through the three-phase distribution network.

Electrical Actuations to Evolve the Rural Grid
As presented in Section 2, traditional rural networks present several weaknesses that difficult their management and planning.Among the aspects mostly affecting the planning, we highlight: the orography and the presence of aged and long resistive distribution lines to access to remote areas with spread and few consumers.In turn, among those affecting the operation, we identify: meteorological conditions that provoke frequent grid faults; sensible over and under voltages that affect power quality for consumers; and the stringent flexibility due to the inclusion of few and manually operated switches and disconnectors.
Traditionally, electrical utilities solved these issues reinforcing the infrastructure (e.g., commissioning new lines, secondary substations, etc.)This strategy is neither the most economical one, nor possible from regulations for all cases.
An example addressing economic aspects could be the commitment for distribution operators to feed a consumer in a remote location.In this case, the operator could opt for tracing a new line (and even a dedicated transformer) to the consumer, this being an expensive alternative.As a figure of merit, current prices for low voltage distribution four-wire cables (wire section between 50 mm 2 and 100 mm 2 ) are between 10,000 e /km and 20,000 e /km [38].Thus, depending on the distance to reach the isolated consumer, the commissioning of the whole new infrastructure could easily reach hundreds of thousands of euros.Instead of doing this, an alternative could be to install smart power electronics with embedded storage at the consumer's place and this may be an economical option, according to the experience of the authors of the present paper.Furthermore, as an example of addressing regulatory issues, to increase reliability of a radial network, it may be an option to close it, thus performing a ring with two feeders.However, and because of the orography and limited access to protected natural areas (regulatory issues), it may not be possible.Thus, an alternative is to reinforce such radial network with smart grid technologies (e.g., distributed storage and telecommunications).
The above examples suggest the development of actuations to update rural grids in a different manner than traditional options, and these are proposed in the present paper.After deploying the innovative grid architecture and addressing the adoption of both new management tools and technologies, the PN will become deeply transformed, resulting in the scheme depicted in Figure 2. Next, the above actions for upgrading the rural grid are listed [18,26,32,39], and the following subsections go deeper into describing the above updates for developing the rural grid: promoting the distributed generation (detailed in Section 3.1); including new protection devices (detailed in Section 3.2); installing back-up resources (detailed in Section 3.3); deploying a proper telecommunications network (detailed in Section 3.4); developing new control and management agents (detailed in Section 3.5); and (detailed in Section 3.6).

Promotion of Distributed Generation
The presence of renewable generation in power networks is progressively gaining more and more importance [33].The growth of DGs in the PN will improve the grid reliability and the continuity of supply to customers, increasing the global efficiency of the grid.For the adopted network, the maximum generation capability of DGs for end-use customers is high because the legal ceiling is about 64 kW, according to Spanish Regulations [40], while the consumption peak is below 30 kVA.The latter, along with the availability of space that rural consumers have to install DGs, yields a tremendous potential for decarbonising the rural grid.Photovoltaic is the most usual DG technology, offering the lowest levelised cost of energy amongst the eligible options [41].However, there are other technologies such as wind, gasification and biomass, which are also attractive to rural areas, thanks to the availability of farm and forestry residues [33].In addition, the DSO has carried out strategies in order to apply a curtailment to these DGs when necessary.

Inclusion of New Protection and Monitoring Devices
As previously indicated, the protection elements of the PN are not equipped with automatic reclosing, thus they are able to isolate only part of the electrical grid in case of a malfunction.Modern rural grids require a certain degree of flexibility in order to offer new electrical configurations and new modes of operation [35].For instance, they should allow isolated operation and reconnection of some or any parts of the grid when various grid eventualities occur [30].To do so, the overload LV lines should be independently managed in order to energize the islands through back-up energy resources.Therefore, it is proposed that the LV fuses of feeders be replaced with automated and remotely controlled Electrical Power Switches (EPSs), who say breakers.This in turn impacts the selectivity of LV lines during grid eventualities.Moreover, it is indispensable to have selectivity at the MV level in order to disconnect the PN from the rest of system and also to have the possibility of creating different electrical configurations.Consequently, some manual switch-disconnectors are automated and remotely controlled (hereinafter Automated Switch-Disconnectors (ASDs)).
Furthermore, to overcome the lack of observability in rural grids, the PN is also updated with distributed monitoring devices (so-called Electrical Monitoring Units, EMUs).Such enhanced monitoring provides flexibility for grid operation.
To integrate and remotely manage the new protection and monitoring devices, an element is included: the so-called Remote Terminal Unit (RTU).The RTU is a solution for substation or power stations automation to interface with all substation equipment that provides protection and control.The RTU delivers information to the Supervisory Control And Data Acquisition (SCADA) of the DSO grid and offers full capability for integrating and controlling devices through different communications protocols.
In the particular case of the PN, five RTUs are installed, four of them are in charge of each SS where they are placed and one is in charge of the whole PN.They are used to integrate mainly all new smart technologies, and controlling, monitoring and protection devices with the telecommunications network, and command of the PN according to the control algorithms.Thus, they act as a multi-protocol bridge between the SCADA and controllable equipment [42].

Back-Up Resources
Diverse types of back-up resources can be adopted so as to improve the network reliability.One option is the inclusion of diesel generators.Such systems enable the isolated operation of the network, even in the absence of DGs and storage.
Alternatively, one could opt for power electronic-based solutions.In this regard, the SRG project developed the IDPR [31,39,43,44].An IDPR, like diesel generators, enables isolated operation of the system in case of faults [45].Thus, the IDPR is a device located at strategic nodes of the distribution network and its main goal is to control power flows.As can be seen in Figure 2, the PN is comprised of three IDPRs.There are only two IDPRs equipped with a Battery Energy Storage System (BESS) because of space limitations in secondary substations.In addition, an auxiliary diesel generator (GS) is set up in SS 010, thus enabling isolated operation in the absence of DGs and storage.Note also in Figure 2 that, in the case of protection devices, the back-up resources are also integrated into the PN through RTUs.
The biggest challenge of the SRG project has been the development of an IDPR.This device is comprised of an innovative electronic-based power conversion system.The IDPR is a modular power converter connected in parallel with the low voltage grid and it can be connected with an energy storage device.Moreover, the control system of the IDPR is easily managed by the system operator setpoints as well as a permanent monitoring of the power flow upstream and downstream of its coupling point via Modbus RTU protocol In terms of performance, the power stage implements an extremely compact transformer-less topology based on the new highly efficient silicon carbide power semiconductor devices [26,39,45].Figure 3 presents the IDPR architecture.The power converter is based on a determined number of controlled current source power cells, each of them based on two converters.Each power cell has its own control board (slave control), which is responsible for controlling the cell output current.The current setpoints are received on each cell from the master control through an Ethernet communication link, centralized in an Ethernet switch.In order to make the system safe in the event of a communication failure of the Ethernet link, a hardware wired output is included, allowing notification of any error in a cell to all other cells and to the outside of the power converter.The switching frequency of the converters is fixed to 30 kHz and the switching signals are synchronized by fibre optic triggers.The number of power converters depends on the number of stages of the converter (i.e., if it integrates a BESS) and the rated current in each IDPR (i.e., the rated power of the IDPR).There are DC and AC switchgears consisting of a main relay and a precharge circuit.The function of these parts is to allow the precharge of the converter DC bus from both sides and to connect or isolate the power electronics to the outside (grid or battery) in order to respectively operate or turn off the converter.A thermal magnetic and residual circuit breaker protects the IDPR from an overcurrent, a shortcircuit or a ground fault in AC side.In addition, there are auxiliary circuits for ensuring that all the signals from the master control to/from the switchgears, emergency button, door sensors, and power cells are correctly adapted.Finally, the master control board is the responsible for managing the different power cells, and communicating with the battery management system and system operator [39].
The IDPR enables the integration of distributed generation, renewable sources, domestic and industrial loads and electric vehicles into the distribution systems.Moreover, it favours the integration of energy storage devices and, finally, it improves the power quality and grid support [46,47].
The IDPR functionalities include power quality improvement as a result of the active compensation for current harmonic, reactive power and unbalance on the current demand side.At the same time, active and reactive power can be dispatched because of its 4-quadrant operation.A normal operation mode is conceived for converting the entire system downstream to an aggregated bidirectional load that can be regulated in order to match the upstream requirements of the system operator in terms of stability and energy management.This is how the IDPR is aimed at being a powerful element for integrating DG or renewable sources, domestic or industrial loads, and electric vehicles.Therefore, in this operation mode (so-called slave), the voltage and frequency in the coupling point of the IDPR is provided by the main grid, by an auxiliary generator or by another IDPR.The IDPR, while operating in slave mode, is controlled as a current source for delivering or consuming power, according to exogenous setpoints.It is required that the grid has to be under normal operating conditions in regard to voltage and frequency levels while the IDPR is balancing the circulating currents.Therefore, the local consumption is seen by the grid upstream as aggregated consumption, and this compensates the reactive power while cancelling harmonic content, which in fact minimizes losses in the distribution system.
In case of grid failure or a scheduled disconnection, the IDPR is able to restore the LV grid and MV grid through an SS transformer in isolated mode.This grid-disconnected operation provides a voltage reference to the system in order to supply loads, DGs and/or storage systems.Therefore, the developed IDPR is able to work while fixing the voltage and frequency of the local area.At the moment this mode is put into operation (so-called master mode), the main grid has to be decoupled from this area and no other IDPRs can be connected in master mode.The master mode starts from a zero voltage situation with a progressive local grid energization consisting of a voltage ramp.After that, when the grid is stabilized up to its nominal values, consumers, DGs and slave IDPRs allocated inside the same area can be progressively connected and configured in order to assure that the master IDPR is able to guarantee system stability.This mode is disabled if no storage device is installed in the IDPR.

New Telecommunications Network
The SRG project explores the convergence between electricity and Telecommunications Networks (TN).A new infrastructure is proposed with the aim of guaranteeing the efficient integration and management of DGs, new back-up resources, and new protection and control devices through RTUs.TN is an essential infrastructure to support the new SRG, transmitting commands and setpoints for remote management and control, data obtained from measurements and smart meters, even speech signals.The TN is presented in Figure 4.As mentioned previously, the TN is comprised of two different environments: an inner TN and an outer TN for the network.At the lower layer of the open system interconnection, the solution adopted for inner TN implements a wireless area at the SS level, thus enabling DGs to connect directly to control devices.In the second step, a main channel that employs the PLC technology will be set up, allowing communications between SSs.Then, the wireless network can also be used as an alternative link channel if the main one is incapacitated [24].On the one hand, the Worldwide Interoperability for Microwave Access (WiMAX) is the wireless standard chosen for creating the SS wireless area and the alternative point-to-point channel between SSs.The wireless technologies (e.g., WiMAX) do not require a core infrastructure to operate, which simplifies operations and reduces initial deployment costs [48,49].WiMAX communication standard is similar to the Wi-Fi, but the former has better capability to operate at higher speeds for users connected over a large area like rural environments, in particular, it can stretch up to a maximum range of 50 km.The WiMAX is the name of the wireless broadband standard IEEE 802.16, which is a wireless local area network technology for fixed and portable devices [49].It is able to provide access at a maximum bit rate between 1 Mbps to 75 Mbps.It could be potentially deployed in a variety of spectrum bands such as 2.3 GHz, 2.5 GHz, 3.5 GHz and 5.8 GHz [39,48,49].The adopted WiMAX service uses a dish antenna to connect straight to the nearest wireless tower, providing a strong and stable connection.
On the other hand, the PLC technology deployed combines a spread spectrum for those parts of the TN where robustness is fundamental, and a modulation multicarrier for those parts of the TN where distances are shorter but higher capacity is required [24,50].The transmission rate reaches 3 Mbps to 30 Mbps at short and medium distances even in the presence of strong interfering signals (e.g., photovoltaic inverter) and 320 kbps at distance of 8 km.Nominal bandwidth is between 2 MHz and 30 MHz and the internal latency is between 4 ms to 6 ms.
The solution adopted for the outer TN, which connects the PN with the SCADA and other exogenous agents, is based on two communications channels.The main channel connects the PN with the SCADA through new point-to-point links in order to cross the mountains using WiMAX communication standard to the private fiber optics network from Xarxa Oberta de Catalunya (XOC).The emergency channel uses a public wireless link based on General Packet Radio System (GRPS) to connect the PN to another fiber optics public telecommunications network.Radio technologies, like WiMAX and GPRS, deliver data access services at low cost [24].GPRS, unlike WiMAX, provides a data rate significantly smaller between 56 kbps to 114 kbps [51].GPRS is a wireless technology that distributes packets of data across multiple channels, making efficient use of the bandwidth and providing the minimum information a secure channel for the link [24].
The coexistence of such a heterogeneous group of technologies is justified by two main reasons: the existence of certain communications infrastructures, like XOC and public telecommunications network, at the time of modernizing the project; and geographical constraints that make it difficult to deploy wired communications in some parts of the PN.
The whole set of communication links forms a meshed network, so networking technologies and services were deployed for successful operation of the PN.The TN according specific metric chooses the best path route from PN to control room, taking into account the existence and availability of previous communication infrastructures.Note that there are mainly two valid solutions to deploy these communications: the 2-layer solutions, which are based on Ethernet addresses; and the 3-layer solutions, which are based on Internet Protocol (IP) addresses.The SRG project focuses on the 3-layer solutions because of their advantages, which are an easier scalability, more cybersecurity, an easy integration with public telecommunications operator's networks, as well as with the International Electrotechnical Commission (IEC) protocol number 60870-5-104.This IEC protocol is an IP utilised for supervision, control and data acquisition in the power system applications [13,52,53].
An alternative to IEC-60870 is the IEC-61850 [53].The IEC-61850 standard is a good solution that takes into account all aspects that are common in an electrical substation.It deals with general requirements, engineering, data models, communication solutions and compliance tests.A significant advantage of the IEC-61850 standard is its extensibility characteristic obtained by making the communication independent of the application by specifying a set of services and objects.This has allowed us to design different applications without depending on specific protocols.As a consequence, the data objects defined in the IEC-61850 standard allow us to apply them in multiple communication solutions without having to modify the models.However, despite the advantages of IEC-61850 over other standards in the project, we have opted for applying the IEC-60870, which focuses on the interaction between SCADA and RTUs.The reasons are diverse: (i) the previous experience at the time of executing the project; (ii) the complexity of deploying the IEC-61850 within the frame of the project; and (iii) the stringent requirements of this standard in terms of communications and related infrastructure.
In more detail, the main logical transmission requirements are aspects related to: addressing, quality of service, topology discovery and routing, cybersecurity, network management and time synchronism.Addressing aspects are essential to clearly and uniquely identifying the origin and destination points.This is carried out through IP version 4 addresses that permit user identification.This solution, in comparison to a 2-layer one, is more scalable but also more complex.
The requirements for applications in terms of bandwidth, latency and bit error rate are included within quality of service aspects.In particular, when different applications co-exist in the same network, or when certain users have more important information to transmit, it is very common to create different traffic flows and assign to each application a priority.In addition, 3-layer approaches segment the traffic through Virtual Private Networks (VPNs), and likewise 2-layer solutions with Virtual Local Area Networks.
Topology discovery and routing aspects choose the best route to transmit the information.The solution adopted is based on one of the most common routing protocols, which is the Routing Information Protocol (RIP).RIP is a standardised distance vector protocol that uses the inherent capability of creating new routes when the original one is interrupted.
The cybersecurity is a critical feature in the Smart Grid environments and is a broad subject that must be dealt with to form a number of different points of view.The messages to be transmitted must be ciphered to make sure that unauthorised recipients do not have access to the information, and the terminals themselves must have proper access passwords to make sure that their configuration is not changed and company policy must be enforced for personnel training.At 3-layer architectures, VPNs with an inherent security (that is IP security) are created, and they encrypt the IP packets to be transmitted using protocols to exchange the password.In addition, network access is reinforced with network authentication through the multiprotocol label switching as principal access and the Remote Authentication Dial-In User Service (RADIUS) protocol as a second path.
The Network Management is a tool that ensures the successful network operation and helps to diagnose problems.The most common protocol is the Simple Network Management Protocol (SNMP), whose messages are encapsulated in user datagram protocol and IP.The whole network is managed with the commercial solution SolarWinds platform via SNMP.It primarily applies to time stamped data or information from battery-powered devices at remote locations where the device time may deviate (causing issues with the time-stamped data).To prevent this problem from occurring, users can specify that the server synchronize the device time using the Network Time Protocol.
Finally, time synchronism aspects are essential for the IEC-60870-5-104 protocol and cybersecurity implementations in terms of specifying the time zone and time synchronization properties of devices [52].The IEC-60870-5-104 protocol allows the master to specify zone and time.Table 1 sums up the previous points.

New Control and Management Agents
The previous subsections have presented diverse new Smart Grid technologies (e.g., IDPRs, EPSs, ASDs, DGs, etc.) for modernising the grid [31,39].They need to be managed externally and coordinated for grid operation optimization.In order to efficiently manage the grid, diverse management agents are defined.These agents interact with one another by exchanging data and commands.From a bottom-up approach, the management hierarchy is configured by the so-called Transformer Controller (TC), the Local Controller (LC), the Local Energy Management System (LEMS), the SCADA and, finally, at the top of the management structure is the Global Energy Management System (GEMS) [31,39].The hierarchy and relationships are depicted in Figure 5.
In detail, the TC is a software that is executed in the RTU.In the particular case of the PN, there are four units and each one is in charge of each SS (see Figure 2).They directly exchange information and setpoints with the back-up resources and distributed generation, as well as with control and protection equipment, and Electrical Measurement Units (EMU).Thus, the RTU that executes the LC has to be able to process analogue and digital inputs and outputs, as well as to collect the above-mentioned network components data and alarms through wired (e.g., serial RS485 and Ethernet) or wireless communications.They also have to support standard protocols like Modbus (for integrating IDPRs, EMUs, etc.), IEC-60870-5-104 (for being integrated by the LC and SCADA), etc. [42,52,53].
In turn, the LC is a software that configures the second level of the management architecture.The LC, like the TCs, is implemented in a RTU.In contrast to the TCs, the LC is responsible for managing all the TCs of the PN.The RTU that executes the LC has to support the IEC-60870-5-104 protocol over Transmission Control Protocol (TCP) and IP for reading all the TC collected data, and transferring to TCs the commands and setpoints provided by, respectively, the SCADA and LEMS.It should be noted that the commands refer to network configuration orders, like those for the process of turning on/off switchable elements or devices and for incrementing or decrementing the transformer's tap changer, while the setpoints refer to active and reactive power control signals for network operation.Therefore, the LC acts as a bridge between upper management agents, i.e., SCADA and LEMS, and TCs.Global energy management setpoints for the whole network Forecast for the whole network Data of the whole distribution network (measurements, status, etc.) Global energy management setpoints for the pilot network Forecast for the pilot network Commands from the SCADA to the pilot network Pilot network data (measurements, status, etc.) Local energy management setpoints for the pilot network Commands from the SCADA to the LEMS Pilot network data (measurements, status, etc.) Local energy management setpoints for each secondary substation Commands from the SCADA to each secondary substation Secondary substation data (measurements, status, etc.) Local energy management setpoints for each device Commands from the SCADA to each device Device data (measurements, status, etc.)While the TCs and LC ensure proper supervision and protection, the LEMS enables the operational optimization of the network.The LEMS calculates on a minute-by-minute basis the setpoints in order to back up resources and distributed generation, doing so by using data collected by the LC, the SCADA constraints and commands, and the GEMS setpoints and forecasts.The network data comes from the LC via Modbus TCP/IP each minute, while SCADA constraints and commands are updated asynchronously through the LC.Conversely, GEMS setpoints and forecasts come through the SCADA via Secure File Transfer Protocol (SFTP).Furthermore, the LEMS records the most relevant information of the network so that it can be checked when there is a failure.The LEMS is the last level of the management architecture included in the network environment.Due to the complexity of the calculations carried out by LEMS, it is implemented in an industrial computer (see Figure 2).This has been selected because it has high computing power and also an extended temperature range, which means it needs no fans and is thus compact in design, protecting it from dirt, dust and humidity while enduring the harshest conditions.
The SCADA is just above the network and there is only one.Thus, it monitors the status not only of the network but also of the system the network is connected to.Eventually, the SCADA will allow remote operation of some network elements like switches, transformers, capacitor banks, etc. for maintenance and the eventual maneuvering of the network.Therefore, the SCADA is the element that delivers commands to the LC via the IEC-60870-5-104 protocol over TCP/IP.These commands are conventionally determined by the network operator at its convenience.The SCADA is not a new element to the management architecture of networks, but, for the innovative approach proposed for the network operation, it offers new functionalities beyond the state of the art.Specifically, these new functionalities are transferring to the GEMS all the system data via SFTP each 15 min and transferring to the LEMS the GEMS setpoints and forecasts via SFTP.Thus, in general terms, the SCADA acts as a secure bridge and filter between inner and outer management agents of the network.
In the same way as the SCADA, the GEMS is in an outer environment of the network.The GEMS calculates a series of active and reactive power setpoints for managing the whole network.This means that GEMS provides control setpoints for each IDPR and distributed generation within the network.It is divided into two modules.The first module forecasts the consumer's consumption and distribution network generation, according to the network data that is provided by SCADA, as well as data from other inputs such as meteorological and calendar data.The second module generates the distribution network and IDPR setpoints in order to increase the performance of the network.Data is exchanged between GEMS and SCADA every 15 min via SFTP.
The management agents presented above comprise a novel management architecture, which allows for controlling the newly installed Smart Grid technologies, e.g., distribution generation, back-up resources and new protection devices.One remarkable advantage of the architecture is that it decentralizes the operation of the system according to its electrical configuration (e.g., whether the grid is connected or isolated).Another advantage is that it enhances the potential scalability of the system, making it possible to replicate the same architecture throughout the whole network.Furthermore, this decentralization increases the reliability of the system, since not everything depends on the decision of the SCADA.Instead, intelligence is allocated also to other agents that can act even autonomously in case of any malfunction.Such advantages go beyond the typical working practices of grid operators in weak rural systems.

Overview of the Applications of the New Technologies
The software and hardware technologies described throughout this section can provide numerous services for diverse agents in the electrical sector, which are deeply analysed in [54][55][56][57].To provide a general overview, Table 2 summarizes such services, linking them with potential stakeholders.

New Electrical Configurations and Operation Modes
On completion of the reinforcements carried out to develop the PN, this results in a highly flexible system that offers various operational capabilities and new possible vulnerabilities, which are described in this section.To this aim, this section first identifies the different operational circumstances for the PN (in Section 4.1).Second, the section defines duties for each of the agents composing the novel management architecture proposed in this study (in Section 4.2).Finally, new vulnerabilities are discussed and analysed through a vulnerability analysis and a management plan is presented to avoid any risk situation (in Section 4.3).

Operational Circumstances for the Pilot Network
It is known that the PN falls within one of the three following different circumstances: Circumstance 1 (C1) is the most usual, and this occurs when the PN, or at least part of it, is supplied by the External Grid (EG) without experiencing grid eventualities; Circumstance 2 (C2) is when the PN, or at least part of it, operates isolated from the external grid without experiencing grid eventualities (this means that back-up resources, like an IDPR or a diesel generator, ensure the security of supply for consumers and the power balance of the PN, or part of it.);finally, Circumstance 3 (C3) is when the PN, or part of it, experiences grid failures, e.g., a blackout or a short-circuit (including also situations when the PN, or part of it, is not supplied because it is undergoing scheduled maintenance tasks).
According to the presented operational circumstances and the disposition of switches and back-up resources in the PN (see Figure 2), the grid can be divided into three sectors, as depicted in Figure 6.Sector 1 (S1) and Sector 3 (S3) can be operated in isolated mode since they are equipped with IDPRs (including a BESS) and/or a diesel generator.For instance, by being able to operate isolated, they can fall under the operational circumstances C1 and C2.Conversely, Sector 2 (S2) can only operate while connected to the external grid or with the support of other sectors, since this sector is not equipped with IDPRs or a BESS.Table 3 collects all possible scenarios for the PN, according to the operability of sectors and the state of links between them [30][31][32]39].Table 3. Pilot Network scenarios depending on state of links and operability of sectors [30][31][32]39].

Particular Goals for Each of the Agents of the Pilot Network Architecture
The operational scenarios were defined in the previous subsection and they mainly comprise operational circumstances for sectors that consider them to be isolated (C2) or connected to the EG (C1).Depending on whether a sector is connected or not to the EG, there can be different optimization goals for its operation.This subsection precisely describes the role of the two Energy Management Systems (EMS) that handle the PN, the Global and Local EMS while taking into consideration the above-mentioned operational circumstances [30][31][32]39].
As has been previously mentioned, these two EMS determine the series of active and reactive power setpoints for managing the whole network, and they calculate on a minute-by-minute basis the setpoints in order to back-up resources and DGs using data collected by the LC, SCADA constraints and commands, and forecasts.Both EMSs optimize, insofar as possible, the operation of the PN.Such optimization is solved in two steps.The first optimization, called economic optimization hereinafter, solves an optimal economic dispatch and thus addresses the market aspects such as the availability and cost of the DGs as well as back-up resources.The second optimization relies on the inputs of the first to adjust active and reactive dispatches for the DGs and back-up resources while considering technical aspects such as power losses, thus allowing it to perform an Optimal Power Flow (OPF).Depending on the operational circumstance, i.e., grid connected (C1) or isolated (C2), the above-mentioned optimizations are global or local.
The global optimizations comprise the whole network.The horizon for the economic optimization is 24 h, while the horizon for the Optimal Power Flow is a few hours.For both global optimizations, the time step is 15 min.It is worth noting that, to successfully solve the economic optimal dispatch, the applied algorithm requires forecasts that exceed the 24 h horizon [31].
Conversely, the local optimizations comprise just the PN, since it is not connected to the external grid.The horizon and the time step for both the economic and OPF optimizations are 1 min.The required forecast data for economic optimization is one day ahead.
Table 4 summarizes the roles that GEMS and LEMS adopt-depending on the operational circumstances for the PN-while executing the above described optimizations.Moreover, these optimizations are presented and detailed in [30][31][32]39].

C1
• Generates the consumption and generation forecasts for the whole system.
• Executes the global economic optimization, function of the global market aspects, availability and cost of DGs and back-up resources.
• Executes the global OPF, function of the global economic optimization setpoints and network features.
• Provides the global setpoints file for the following 24 h, in time steps of 15 min.
• Adjusts the global setpoints on a one-minute basis while considering other technical eventualities • Provides the adjusted global setpoints to the DGs and back-up resources.

C2
• Generates the consumption and generation forecasts for the PN.
• Provides the forecast file for the following 24 h, in time steps of 15 min.

Analysis in Vulnerabilities on Communications and Related Management Plan
The PN operation depends highly on a wide sensory and monitoring system, and a collection of automated switch-disconnectors and electrical power switches.All of these are remotely managed through the telecommunications system.Initially, the telecommunication systems of electric power systems were limited, small and carefully isolated from the other telecommunication systems in order to guarantee their own security.However, the continued growth of the network, the increment of data volume, and the obsolescence of their infrastructure force the use of new wireless or wired channels that pass the data through the public telecommunication network.In addition, the lack of cybersecurity, the lack of safety, and the unencrypted protocols are provoking that the cyberattacks are becoming increasingly common, representing a vulnerability.In addition, in terms of cybersecurity, like the telecommunications systems, the SCADA system is also critical and crucial.This is because it provides three vital functions, which are data acquisition, supervisory control and alarm display, centralising the communications and network management.The SCADA polls periodically the RTUs to gather the real-time measurement data from all the substations and sends out control signals to the specific remote devices.Therefore, a proper cybersecurity protection system should be provided, in order to avoid a route for hackers from that creates a disruption, takes control, or causes damage.
The SRG potential vulnerabilities are inherited from the traditional telecommunications and management systems.These are outdated private telecommunication networks; the embedded and default passwords that were not changed; and the use of unsafely protocols like hypertext transfer, Telnet and trivial file transfer protocols.Different ways have been selected to reinforce the cybersecurity in the SRG project.The first way is creating a secure channel over an unsecured network (e.g., the public telecommunication network).For instance, the wireless networks are experiencing a great reception in control environments due to the important advantages they provide, and they can pose a significant risk due to the continuous technological change to which they are subjected.To create a secure channel over these unsecure networks, the Secure Shell (SSH) protocol is deployed.The SSH is a cryptographic network protocol for operating services securely over an unsecured telecommunication network.The SSH protocol supports secure remote logins, commands, file transfers, access control, etc. [58].Furthermore, the Asymmetric Encryption Standard algorithm is the selected technique for encrypting the data exchanged.The second way is establishing VPNs.A VPN creates a safe and encrypted connection over less secure networks, which is employed to securely connect geographically separated facilities forming one unified telecommunication network.The access to such VPNs is restricted.To do so, two techniques are adopted: the first one is using an adequate and unique password, and the second one is controlling the physical port access.In terms of passwords and keys, they periodically expire and they are subjected to dedicated policies (e.g., default passwords are forbidden, a minimum level of complexity is required).In addition, the internet access for these VPNs is absolutely restricted.The physical port access protection measures have been implemented mainly installing the technology inside cabinets protected under key and restricting the use of Universal Series Bus technology.Furthermore, the network architecture is minimised, so the number of connections with the system is the minimum required.The third way of reinforcing the cybersecurity is identifying and removing all unnecessary services in order to get an extra level of security to be simpler, reliable and secure.Disused ports and services are disabled in order to prevent unauthorized use.There is full knowledge about the ports that are open and what services and protocols they use.Additionally, attention has also been paid to computer security aspects like possible failures in memory (e.g., memory leaks, unhandled memory allocation, badly handled memory, memory fragmentation), stack buffer-overrun bugs, and in random addressing of internal libraries' failures.Computers are equipped with firewalls and antiviruses, which restrict access rules to protect connections between control systems and others.
To sum up, the hardware and software dedicated to measuring, detecting, acting and modifying the state and set of all associated services are fully integrated and encrypted.In other words, the operation and information technology are combined in real time in order to ensure the proper supervision and control, and be more flexible and fast.In addition, the firmware code has been hidden and the embedded passwords have been removed to avoid their reading.Finally, just note that security audits are conducted regularly to identify, list and subsequently describe the various vulnerabilities that may arise.Metadata, a vulnerability management system, ensures that these are minimized.
Finally, communication failure scenarios are presented.Note that all the possible communication channels are identified, and the information flow through those channels is depicted in Figure 7. Based on this diagram, twelve possible communication failure scenarios have been listed and described in Tables 5-7.Note that the behaviour also depends on the circumstance in which the PN is operating.Note further that the failure happens when the data does not arrive, is corrupted or is not acceptable.• GEMS: It is responsible for detecting the communication failure, but it continues calculating the global setpoints (only in C1) and doing forecasts without the SCADA updated data.It tries to exchange the information with the SCADA via SFTP again.

GEMS
• SCADA: It is responsible for detecting the communication failure and notifying all downstream devices (LC, TCs and LEMS).It updates the corresponding error register and displays a warning message on the operator console.It tries to exchange the information with the GEMS via SFTP again.It continues communicating with the LC but stops the information transfer to the LEMS.
• LEMS: It continues adjusting and sending setpoints to IDPRs/DGs until it finishes the last global setpoints provided by the GEMS via SCADA and after that, it will send null setpoints to IDPRs and no setpoints to DGs in C1.Conversely, it continues calculating and sending the setpoints to IDPRs/DGs until it finishes the last forecast provided by the GEMS, and after that, it applies the rule based disconnected operation in order to guarantee the supply in C2.
The PN operates with the non-updated or without setpoints in C1, or with the calculated setpoints based on a local optimization (if there is an available forecast) or by predefined rules, in C2.Therefore the PN performance may not be optimal.Note that there is no problem in C3. • LC: It is responsible for detecting the communication failure and notifying all downstream devices (TCs and LEMS), and updates the corresponding error register.LC refuses any change in the grid configuration and operation.
There is an external loss of control and information over PN.The PN performance may not be optimal because of the GEMS does not have the LC updated data.Note that in this case it is not possible to start up or reconfigure the network in C3. • SCADA: It is responsible for detecting the communication failure and notifying the upstream device (GEMS), updates the corresponding error register and displays a warning message on the operator console.It continues exchanging information with the GEMS and the LC, and tries to transfer the information to the LEMS via SFTP again.
• LEMS: It is responsible for detecting the communication failure.
In C1, it continues adjusting the last global setpoints provided by the GEMS and sending them to IDPRs/DGs until there are global setpoints, and, after that, it will send null setpoints to IDPRs and no setpoints to DGs.Conversely, in C2, it continues calculating until it finishes the last forecast provided by the GEMS, and sending then to IDPRs/DGs, and after that, the LEMS will apply the rule based disconnected operation in order to guarantee the continuity of the supply.
The PN operates with the non-updated or without setpoints in C1, or with the calculated setpoints based on a local optimization (if there is an available forecast) or by predefined rules, in C2.Therefore, the PN performance may not be optimal.Note that there is no problem in C3. • LC: It is responsible for detecting the communication failure and notifying all upstream and downstream devices (GEMS, SCADA and TCs) and updates the corresponding error register.In such circumstances, it imposes null power and the last voltage and frequency setpoints to IDPRs, and no setpoints to DGs.It also send null setpoints to the auxiliary diesel generator.
• SCADA: It continues operating without any change expect that it displays a warning message on its operator console.
• GEMS: It continues operating as usual and assumes that the LC has performed control actions for IDPRs, DGs and GS.
• LEMS: It is responsible for identifying the communication failure and updates the corresponding error register.It assumes that the LC has performed control actions for IDPRs, DGs and GS.It tries to transfer the setpoints to IDPRs/DGs and to read the information from the LC via Modbus again.

Study Case
The study case section assesses the applicability of one of the main actuations underpinning the modernization of the PN: the inclusion of IDPRs.As previously described in Section 3.3, the IDPR functionalities include power quality improvement in connected mode and grid restoration in isolated mode.Therefore, this section has been split into three subsections.The aim of Section 5.1 is to demonstrate the IDPR functionalities, as a fundamental part for the modernization of the PN and the realization of the proposed innovative architecture.Complementing simulation results presented in Section 5.1, Section 5.2 briefly depicts the performance of IDPR in field.Finally, Section 5.3 reports the methodology to size IDPRs in the function of the PN topology and energy flows for operational defined modes.

IDPRs Contributions in the Electrical Network
The connected functionalities are the balancing of three-phase currents, the compensation of reactive power in the PN and cancellation of harmonic currents.Thus, as to fulfil this goal, the PN is modelled and simulated (time horizon for simulation, one day) in four different scenarios:

•
Scenario (1) serves as the base case; this scenario is representative of the initial state of the PN, which does not comprise IPDRs neither DGs.This scenario comprises the existing unbalance power flows among the three-phase distribution system.• Scenario (2) represents a transitory situation in which SSs are equipped with IDPRs, but there are no DGs.This scenario considers the initial state of the PN in a short term.The objective here is to evaluate the performance of the IDPRs while solving unbalanced power flows (and reactive components) among the three-phase distribution system due to the existing single phase loads.• Scenario (3) represents a fictitious situation in which the PN is not equipped with IDPRs, but it does comprise DGs.This situation can be representative of an unplanned evolution of DGs in a rural area.Such DGs are considered to be single phase facilities and their integration into the network is not pursuing balanced power flows.• Scenario (4) represents a final situation in which the PN is equipped with IDPRs and comprises DGs.The objective here is to evaluate the performance of the IDPRs while solving unbalanced power flows (and reactive components) among the three-phase distribution system due to single phase DGs and loads.
The three-phase system of the PN is modelled in DigSilent PowerFactory software (PF v15.2, DIgSILENT Gmbh, Gomaringen, Germany), addressing the characteristics previously presented in Section 2.2.The IDPRs, which are working on connected mode, are modelled as current sources.The loads are also modelled as current sources, aggregating the demand at each SS level.
Figures 8 and 9 depict the active and reactive power demand profiles at each SS.These profiles derive from real data (see Figure 10) and are directly applied for the base case scenario (1), and also for scenario (2).Active power demand profiles at each SS for scenarios (3) and ( 4) are derived from the above profiles adding the effect of DGs (see Figure 11).The DG curves were extracted from the repository [59] and were added on the real consumption profiles.Conversely, reactive power demand profiles for scenarios (3) and (4) are the same as for scenarios (1) and ( 2), since it is assumed that DGs do not inject reactive power and the LV lines of the PN are basically resistive.2).Note that both scenarios share the same active power demand profile, so results can be applied to both scenarios.

Reactive power
[kvar]  4).Note that both scenarios share the same net active power profile, so results can be applied to both scenarios.
Figure 12 presents the performance of the IDPR while balancing the three-phase currents at each SS.Presented results refer to the point of connection of the PN with the external grid.As can be seen, in the case there are no IDPRs installed (scenarios (1) and ( 3)), the currents in the three-phase distribution system could be unbalanced.
The provision of supply to consumers is planned by the distributor system pursuing balanced loading through the three phases of its network.This means that each consumer in the PN could be supplied by different phases.If such demand sharing is properly done, the system is translated into similar loading for each of the three-phases of the system (see scenario (1)).The eventual inclusion of DGs by consumers a posteriori might affect the currents flows in the PN (see scenario (3)).For instance, note that, during the central hours of the day, while distributed photovoltaics are generating, the currents through the three phases of the system can result in being greatly unbalanced.
The deployment of IDPRs guarantees the balancing of currents (see scenario (2)), even in the case of having DG (see scenario (4)).Therefore, IDPRs solve possible inaccurate planning for the provision of supply to consumers and the effect of unplanned DG deployment by the distributor, or other unexpected changes in the habits of consumers.

Scenario (4)
Phase A Phase B Phase C Analogous to the management of active power, IDPRs can help to minimize reactive power flows in the PN.This can be observed in Figure 13, comparing reactive power flows per each of the three phases of the system and for all computational scenarios.As can be noted, since reactive power compensation is done at the SS level-where the IDPRs are installed-, the net reactive power exchanged at the point of connection of the PN with the external grid is not cancelled, due to reactive power consumption in MV lines and transformers.Such cancellation is not pursued in this case, since reactive power consumption guarantees that currents are delayed from voltage waveforms, favouring the proper operation of electrical protections.
The above described application of the IDPRs helps to reduce the loading of the transformers at SSs.As can be noted in Figure 14, in scenario (1), the transformer of the most important secondary substation (the first SS) is quite loaded, reaching almost 65% in loading.Thanks to the IDPR (see scenario (4)), the loading decreases down to 50% at most.
A similar effect can be experimented with while comparing scenarios (3) and (4), thus considering DG.In this case though, it is important to note that, without the inclusion of IDPRs, the deployment of DGs (scenario (3)) could be translated into higher loadings for transformers (see the loading for transformer in the third secondary substation) while compared to the base case, in which there is no DG (scenario (1)).For instance, the transformer in the third secondary substation in scenario (1) is loaded up to 20% during the central hours of the day, and its loading reaches up to 40% (so increases by a factor of 2) in scenario (3).With the inclusion of an IDPR in this SS, the loading of the transformer during the central hours of the day decreases down to 5% approximately (so decreases by a factor of 4 compared to the base case).Thus, IDPRs, while providing the above described services, can greatly contribute to the integration of renewables, expand the useful life of infrastructures and make the most of their utilization.

Reactive
It is important to note that other functionalities of IDPRs, such as those related to the exploitation of the embedded BESS, can serve to expand the applicability of these devices for the provision of other services, such as time shifting of active power flows for techno-economic optimization of the PN and improvement of security of supply to consumers.

IDPR Field Performance
This subsection presents the performance of the IDPR in the LV grid [26].The waveform recording is carried out with an oscilloscope, and then the data is processed and treated with the mathematical software Matlab (R2014b, MathWorks, Natick, MA, USA).Four different scenarios are proposed in order to test the IDPR contributions to improve the power quality of the grid:

•
The scenario (1) depicts an IDPR balancing the three-phase currents.

•
The scenario (2) depicts an IDPR balancing the three-phase currents and compensating the reactive power.

•
The scenario (4) depicts an IDPR balancing the three-phase currents, compensating the reactive power and posteriorly dispatching 12 kvar.
The recorded three-phase voltage and current waveforms for each scenario are shown in Figures 15-18.Note that the voltage waveforms correspond to the phase-to-neutral voltage.The voltage waveforms are sinusoidal and their Root Mean Square (RMS) value remain about 137 V in all scenarios and phase (which corresponds to 230 V phase to phase voltage RMS).Table 8 picks up for all scenarios their voltage and current RMS for each phase.It is possible to appreciate that the RMS voltage value lightly increases in scenario (4) because of the reactive power dispatching.In addition, note that the unbalanced current scenario is the third one.

Time [ms]
On the other hand, the currents' waveforms are not completely sinusoidal, and also not equal in all scenarios, and their RMS value is also different.The main differences between them are described below.When scenario (1) is compared to scenario (2), the reactive power compensating capability is demonstrated.This particularity is observable in phase A, the phase difference between voltage and current waveforms is null in scenario (2) (see phase A from the right plot of Figure 16), while the phase difference is not null in scenario (1) (see phase A from the right plot of Figure 15).When scenario (1) is compared to scenario (3), the harmonic mitigating and current balancing capabilities are proven.The harmonic mitigating capability is easily observable in scenario (3) (see the right plot of Figure 17) where the current waveforms are much more sinusoidal than the previous scenarios (1) and (2).In scenario (3), it is also observable that the current balancing is disabled because the phase difference between phases A, B, and C is not constant (see phase B from the right plot of Figure 17) , while, in the rest of scenarios, this difference is constant and equal to 2π/3 rad.Finally, when the previous scenarios are compared to scenario (4), the capability of dispatching reactive power is demonstrated (see the right plot of Figure 18.In this last scenario, the RMSs of current waveforms are equal and bigger than previous cases because of this dispatching.The IDPR contributes to reducing the asymmetrical losses and diminishing the operational stress of the distribution transformer.In order to validate this contribution, the Total Harmonic Distortion (THD) from the voltage and current, the power factor and the degree of unbalance are calculated.The degree of unbalance is defined as the part of the total current that corresponds to each phase [26].Table 9 presents the results with and without the IDPR contribution.In case of the voltage THDs, this fulfills the power quality requirements, which are defined as EN 50160 [60].In addition, the THD is reduced around 1.5% after the harmonic mitigation.In the case of the current THDs, this is moderate and experiences a significant improvement thanks to the IDPR, reducing the initial situation to 6.5%.This contribution is what provokes a reduction of the voltage THDs.In the case of the power factors, the IDPR contribution is easily detectable, increasing any power factor to the unit.Finally, in case of the degree of unbalance, it is also noteworthy that the IDPR balances the three-phase currents.

The Dimensioning of IDPRs
This subsection presents the methodology to size the IDPRs, according to the magnitude of the existing power flows in the network and addressing the new operation modes for the grid, as previously defined in Section 4. The PN currently feeds 25 consumers, who have an overall contracted power of 150 kW [39].Figure 10 presents the total apparent power fed by each secondary substation and the network.However, the total consumption peak of the whole PN does not exceed 30 kVA, as can be seen in Figures 10 and 19.Furthermore, as introduced in Section 2.2, the MV grid of the PN distributes at 5 kV and the step down transformers in each SS permits interfacing to the final users at 230 V or 400 V.Such characteristics will be translated into the modelling of the PN in the following section.
While assessing the introduction of IDPRs into the PN, one should consider that these back-up resources could be eventually operated in master mode.Such operation mode greatly influences the required power and energy storage capacities for IDPRs, as in such circumstances an IDPR could even ensure the supply for the whole PN.Accordingly, even the proposed computational scenarios consider the operation of the IDPRs in slave mode, and their sizing should be a function of the requirements while in master mode.
The minimum power capacity for an IDPR in isolated mode is defined from the analysis of the demand patterns presented in Figure 10.A probabilistic analysis of the above-mentioned profiles shows that the PN value does not exceed 18.7 kVA (see the maximum value of the last box-plot representation in Figure 19).Therefore, 18.7 kVA is determined as a threshold level for the minimum power capacity for an IDPR, which is required for isolating the whole system.Note that, from this minimum sizing, a 50% security factor has been applied, in order to ensure the right operation of the power electronics under electrical transients, e.g., transformer and load inrush currents.As a result, the rated power should be set at 30 kVA.Thus, a 30 kVA IDPR is able to energise and maintain balanced the whole PN.Despite a 30 kVA IDPR could energise the whole PN at the same time, a good strategy for reducing the electrical transients during the energisation process is to energise step by step the network, starting with the biggest SS.According to Figure 19, it is also possible to size IDPRs for different autonomous sectors.For example, the required power should be about 20 kVA for S1, 30 kVA for S1 and S2, 5 kVA for S3, and 15 kVA for S2 and S3.In addition, the energy capacity for an IDPR in master mode should be enough to supply the loads of the PN during different horizons.In particular, four cases are considered, taking into account that the rural distribution grid non supplied times are greater than urban ones.In particular, the four different frames are analysed at one, two, three and four hours.Figure 20 shows a probabilistic analysis of the consumed energy during these defined frames in the PN, from the power profiles in Figure 10.In addition, Table 10 picks up the maximum energy demands for the 95% of the cases.

Conclusions
The presented architecture tackles the modernization of traditional rural networks into new Smart Grid ones, addressing innovation actions on both the power plane and the management plane of the system.In the management plane, one principal feature of the architecture is that it permits decentralizing the operation of the network either while grid connected or isolated.In addition, the proposed architecture can be easily replicated along large areas since it is integrated through communications.As long as the capabilities of such telecom networks are powerful enough, the management system can integrate large controllable equipment in the network, such as distributed storage and power electronics, making the system greatly scalable.Furthermore, this decentralization increases the reliability and self-healing aspects of the system since the intelligence is allocated into diverse agents through the network that can act even autonomously in case of any fault.Such advantages are beyond typical working practices for grid operators in weak rural systems.
In the power plane, the innovative IDPRs result as a key technology for the realization of the proposed architecture.IDPRs are modular by design, and this facilitates their scalability to large networks as required.IDPRs can provide different services such as harmonic and reactive currents' compensation (see the low level of current harmonic distortion, 6.5%, achieved in field tests with IDPR), current balancing, energy back-up and network restoration, among others.These services greatly contribute to ensuring a power quality and security of supply to customers; to enhance the integration of renewables; and to expand the useful life of grid infrastructures.For instance, as derived from the results of the study case, by balancing currents and compensating reactive power flows through the three-phase distribution system of the PN, the IDPR can reduce inaccurate planning for the provision of supply to consumers.In addition, it can alleviate the inconveniences for the DSO due to unplanned DG deployment and the uncertainty in the consumers' habits.

Figure 1 .
Figure 1.Area from Pilot Network (PN) and its electrical scheme.

Figure 2 .
Figure 2. Electrical scheme of Pilot Network with new element after actuations.For the sake of completeness, acronyms not specified in the figure are: Local Energy Management System (LEMS), Local Controller (LC), and Transformer Controller (TC).The whole list of acronyms can be found in abbreviations section.

Figure 3 .
Figure 3. Architecture of an Intelligent Distribution Power Router (IDPR) with a battery [39].

Figure 5 .
Figure 5.The hierarchy of agents.

•
Executes the local economic optimization, function of the local market, availability and cost of DGs and back-up resources.• Executes the local economic optimization, function of the local market, availability and cost of DGs and back-up resources.• Provides the local setpoints to DGs and back-up resources.

•
SCADA: It is responsible for detecting the communication failure and notifying the upstream device (GEMS).It updates the corresponding error register and displays a warning message on the operator console.It continues exchanging information with the GEMS and LEMS, and tries to communicate with the LC via IEC-60870-5-104 protocol again.

Figure 8 .
Figure 8. Active power demand profile for phases A, B and C at each Secondary Substation (SS) for scenarios (1) and (2).Note that both scenarios share the same active power demand profile, so results can be applied to both scenarios.

Figure 9 .Figure 10 .Figure 11 .
Figure 9. Reactive power demand profile for phases A, B and C at each SS for all scenarios.

Figure 12 .
Figure 12.Net active power exchanged per phase with the external grid by the PN with and without including Intelligent Distribution Power Router (IDPRs).

Figure 13 .Figure 14 .
Figure 13.Net reactive power exchanged per phase with the external grid by the PN with and without including IDPRs.

Figure 19 .
Figure 19.Statistic analysis of power demand profiles in the PN through box plots.For the sake of clarity, the red central mark indicates the median, and the bottom and top edges of the blue box indicate the 25th and 75th percentiles, respectively.The whiskers extend to the most extreme data points not considered outliers, and the outliers are plotted individually using the red "+" symbol.

Figure 20 .
Figure 20.Probabilistic analysis of energy demand profiles in the PN.

Table 1 .
Summary of solutions for the logical transmission requirements.

Table 4 .
Roles of Global Energy Management System (GEMS) and Local Energy Management System(LEMS) depending on the operational circumstances.

Table 5 .
Actions in function of the operational circumstances 1, 2, and 3. Part A.

Table 6 .
Actions in functions of the operational circumstances 1, 2, and 3. Part B.

Table 8 .
Voltage and current Root Mean Square (RMS) values.

Table 9 .
Real measurements for proving the IDPR contributions.

Table 10 .
Energy consumption (in 95% of cases) for each SS and according to the sector configurations.