*2.1. MG Structure*

MG, according to the definition proposed in the introduction to the paper, includes DER, which can be RER as conventional resources, ESS as an infrastructure of energy market contribution, or AS in the absence of DER, loads, and finally a breaker at the point where MG connects to the main grid. This collection of elements has two modes of operation, specifically, grid-connected and islanded mode. In grid-connected mode, they receive services or provide services for the main grid, whereas in islanded mode, they should be able to manage all control, stability, and protection requirements. Achieving these characteristics requires a smart structure for MG, and its elements should be developed with these requirements in mind. It is noted that the penetration and integration of smart MGs should be in the form of tiles facilitating the implementation of SG. Figure 1 is a visualization of this idea, where MG structure meets the conceptual model of SG. SG has seven sectors [28]: Customer, Service Provider, Transmission, Distribution, Bulk Generation, and Market. Adapting the MG structure to SG structure, while the role of generation, transmission, distribution, operator, and consumer is clear, as can be seen in Figure 1, the maintainer acts as a service provider and the aggregator is in the market domain. The performance of each entity is clarified here.


• **Local Utility**: Local utility is the MG utility neighbor who connects to MG through the Point of Common Coupling (PCC) and interacts with MG to coordinate the provision of AS in grid-connected mode.

As well as embedding MG in SG domain, Figure 1 conveys a hierarchical control strategy of smart MG by introducing three supervisory levels, namely advanced metering interface (AMI), EMS, and DMS.

**Figure 1.** MG architecture.


The hierarchical control level of MG can be implemented through a centralized or decentralized approach. In the centralized approach, each element receives setpoints from a central controller and follows a global objective, while in decentralized approach decision making in each level control is distributed. In distributed fashion, each element has been considered to be an agent which independently decides to participate in SG or MGMS. This offers advantages such as plug-and-play patterns, no need for a dedicated communication infrastructure, fast response to system failure, and power grid consisting of independent entities [29,30]. Moreover, due to the significant advantages of MGMS characteristics when deploying MAS, trends toward the implementation of SG in the form of multi-MG have been augmented recently. It is estimated that future SG would be multi-MG that works in the MAS environment [31,32]. Figure 1 proposes the control level of individual MG without centralized and decentralized approach. The local controller in this figure can be considered to be located in EMS, or distributed in each element.

**Figure 2.** DMS supervisory level domain.
