# Smart Grid Architecture for Rural Distribution Networks: Application to a Spanish Pilot Network
## 3 Electrical Actuations to Evolve the Rural Grid
### 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. \begin{table}
\begin{tabular}{l l} \hline \hline
**Network Architecture Requirements** & **Solution Adopted** \\ \hline Addressing & Via IP version 4 with private addresses \\ Quality of service & Traffic segmentation via VPNs \\ Topology discovery and routing & Route creation via RIP \\ Cybersecurity & Though VPNs with IP security and RADIUS protocol authentication \\ Network management & With SolarWinds platform via SNMP \\ Time synchronism & Through IEC-60870-5-104 master \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of solutions for the logical transmission requirements. 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).