# Smart Grid Architecture for Rural Distribution Networks: Application to a Spanish Pilot Network
## 4 New Electrical Configurations and Operation Modes
### 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].  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **GEMS** & **LEMS** \\ \hline \multirow{6}{*}{C1} & \(\bullet\) Generates the consumption and generation & \\  & forecasts for the whole system. & \\  & \(\bullet\) Executes the global economic optimization, & \\  & function of the global market aspects, & \\  & availability and cost of DGs and back-up resources. & \\  & resources. & \\  & \(\bullet\) 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. & \\ \hline \multirow{6}{*}{C2} & \(\bullet\) Generates the consumption and generation & \\  & forecasts for the PN. & \\  & Provides the forecast file for the following & \\  & 24 h, in time steps of 15 min. & \\ \cline{1-1} \cline{2-3}  & \(\bullet\) Provides the forecast file for the following & \\ \cline{1-1} \cline{2-3}  & 24 h, in time steps of 15 min. & \\ \cline{1-1} \cline{2-3}  & \(\bullet\) Executes the local economic optimization, & \\ \cline{1-1} \cline{2-3}  & \(\bullet\) Provides the local setpoints to DGs and back-up resources. & \\ \cline{1-1} \cline{2-3}  & \(\bullet\) Provides the local setpoints to DGs and back-up resources. & \\ \hline \hline \end{tabular}
\end{table}
Table 4: Roles of Global Energy Management System (GEMS) and Local Energy Management System (LEMS) depending on the operational circumstances.