Microgrid Building Blocks: Concept and Feasibility

For power grids with high penetration of distributed energy resources (DERs), microgrids can provide operation and control capabilities for clusters of DERs and load. Furthermore, microgrids enhance resilience of the hosting bulk power grid if they are enabled to serve critical load beyond the jurisdiction of the microgrids. For widespread deployment of microgrids, a modular and standardized Microgrid Building Block (MBB) is essential to help reduce the cost and increase reliability. This paper proposes the conceptual design of an MBB with integrated features of power conversion, control, and communications, resulting in a systemwide controller for the entire microgrid. The results of a feasibility study indicate that, in a utility-connected mode, MBB-based microgrids can exchange power with the hosting power grid while serving regulation and optimal dispatch functions. In a resiliency (islanded) mode when the microgrid is disconnected from the utility system, the MBB control system acts to stabilize the system frequency and voltage under small or large disturbances. The microgrid controller is supported by a communication system that meets the latency requirements imposed by the microgrid dynamics as well as data acquisition time. The extended IEEE 13-node system is used as a microgrid model to validate the proposed MBB design and functionality.


I. INTRODUCTION
A MICROGRID can be deployed to sustain electricity service when the hosting bulk power grid (to which the microgrid is connected) becomes unavailable. Technologies validated through simulations [1] and field demonstrations [2] have shown that a microgrid can operate smoothly in a utility-connected or an islanded mode and during its transition between modes. Electric energy in a microgrid is often produced by Distributed Energy Resources (DERs), including renewable energy and energy storage facilities as well as traditional synchronous generators of ratings up to a few MWs. As the level of penetration of renewable energy becomes higher, the need for improving primary frequency response using inverter-based resources (IBRs) becomes essential to support power grid operation [3]. Grid forming IBRs [4] and managing interactions between grid forming and grid following DERs [5] is important for stable operation of microgrids in the islanded mode. Resilience of the distribution system with respect to extreme events (such as Hurricanes Sandy and Maria) is a great concern for industry, government, and communities [6]. During islanded operation in an extreme event, it is essential to maintain the balance between economic objectives and resilience of the grid [7]. This is accomplished by sustaining service to critical loads while efficiently dispatching the available resources [8]. When microgrids have available generation resources after meeting their own critical load [9], they can enhance resilience [10] of the distribution system by picking up and serving critical load outside the microgrid's jurisdiction and possibly providing black start power for power system restoration.
Renewable energy is an important part of the global response to climate change, which requires widespread installation of solar, wind, and other clean energy resources. Operation and control of power grids with a high-level penetration of renewable energy is a challenging task as, with a reduced proportion of fossil fuel-based generators, control capabilities will be reduced significantly [11]. A promising solution to this problem is to facilitate widespread deployment of microgrid controller capabilities [12] based on the available DERs, load, and control resources [13].
The proposed Microgrid Building Block (MBB) concept is to facilitate the deployment of microgrid capabilities, resulting in a future grid with numerous microgrids. To reduce the cost of development, installation, and maintenance, the proposed MBB is designed to be modular and ultimately standardized. While research aimed at standardized development of microgrids is lacking, similar efforts have previously been completed for power electronics [14]. There has been significant progress in development and deployment of the Power Electronics Building Blocks (PEBBs) over the last two decades [15]. Modular design concept of PEBBs has also been extended from the power stage to control systems [16]. The concept of microgrid building block is a new vision motivated by the need for widespread deployment of microgrid capabilities with clusters of DERs and load in the future grid environment. Networked operation of these MBB based microgrids [17] will enhance grid resilience by providing energy sharing opportunities amongst microgrids. Development of algorithms which maximize the utility function of each MBB based microgrid while ensuring grid stability will be essential [18].
With support from the Microgrid Program of the U.S. Department of Energy (DoE), the first workshop on MBB took place in 2019 which was hosted by Virginia Tech and attended by leading researchers and managers from DoE national laboratories. To comply with the IEEE 2030.7 standard [19], several MBB functions are proposed, including power conversion, microgrid control, protection, islanding and reconnection, and storage. The performance requirements for MBBs include stability, interoperability, security, and scalability. The DoE Microgrid program also produced a white paper on Building Blocks for Microgrids as part of the future R&D plan [20]. As conceptualized in the white paper, MBB development will fulfill technology, analysis and tool development goals of the Microgrid R&D program. MBB aims at reducing microgrid capital costs and reducing their development, construction, and commissioning times to facilitate widespread deployment of microgrids towards the development of resilient distribution systems.

A. COMPARISON OF MICROGRID BUILDING BLOCK CONCEPT WITH STATE-OF-THE-ART
Research on microgrids tends to be focused on different areas that may be integrated to create a microgrid. Optimal dispatch of DERs within a microgrid to maintain voltages and satisfy other network constraints [21] is one key area stated in IEEE 2030.7. However, optimal power flow algorithms implemented in commercial microgrid controllers may be limited to single phase balanced models [22] and may use sub-optimal rule-based microgrid restoration algorithms [23]. Stability enhancement of microgrids under small and large disturbances is critical as penetration of inverter-based resources (IBRs) increases [24]. Primary droop-based controls alone cannot provide accurate frequency regulation and secondary control is typically used [25]. Transient stability is typically not considered, and frequency control is achieved using open loop frequency control [26]. Small communication delays in secondary control have been shown to be essential for stability of microgrids [27]; however, the latency is often not explicitly incorporated in the design of control algorithms. There is thus a lack of integration between optimal dispatch, control, and communication functions. It is for this reason that integration has been a major challenge for microgrid deployment as highlighted in several field demonstrations [28], [29]. The proposed MBB integrates three-phase optimal dispatch [30] with state feedback compensation based control algorithm which explicitly includes communication latency [31], to enhance transient stability of a microgrid in a utility connected mode or an islanded resiliency mode.
As expected, there is a gap between control algorithms proposed in research and those implemented in commercial microgrid controllers. A comprehensive survey in 2016 [22] showed that commonly available functions for microgrid controllers include economic dispatch, peak saving, loss minimization, reserve management, load shedding, and islanding/resynchronization. Existing functions are developed primarily for steady state operations. In contrast, the proposed MBB is developed in the context of microgrid stability [32], involving microgrid frequency and voltage stability under small or large disturbances. Dispatch and transition functions stated in IEEE 2030.7 such as islanding, reconnection, black start, and power exchange with networked microgrids will be essential for resilience enhancement. This requires robust control over the power conversion interface with the bulk grid. The power conversion interface may be a traditional automatic voltage regulator with a circuit breaker and relay [33], or a back-to-back (B2B) AC-DC-AC converter as shown in Fig. 1.
The AC-DC-AC converter-based power conversion is more comprehensive and integrates voltage regulation, control, and protection capabilities. It provides dynamic decoupling which prevents power quality issues (such as voltage and current harmonic distortion, individual harmonics, voltage sags, voltage swells, rapid voltage changes and flicker) stated in IEEE 2030.7 from propagating across the point of common coupling (PCC) between the microgrid and bulk grid. The B2B converter can prevent low frequency oscillatory modes [34] between reactive power controllers of wind generators and synchronous generators in the microgrid [35]. It avoids the need for adjusting phase angles of DERs in the microgrid (MG) during synchronization which can cause circulating currents and undesirable tripping [35]. This also simplifies resynchronization required for implementation of the reconnection transition function required as per the IEEE 2030.7 standard. Medium voltage B2B converters can help with voltage regulation, enhance PV hosting capacity [36], and enable flexible power exchange between MGs [37].
The proposed concept of MBB is an enabling technology to provide the capabilities of a microgrid for a cluster of generation, load, and control devices. MBB design serves as a microgrid controller (MGC) with integrated power conversion, control, and communication functions. As highlighted in Fig. 1, MBB includes the power conversion interface between the bulk grid and the microgrid. MBB also includes the dispatch and control algorithms designed to work in coordination, while explicitly incorporating communication latency and sampling rate within the algorithms.
The proposed MBB design has the following novel features: • Power conversion, control and communication capabilities are closely integrated to form a building block that can be standardized, facilitating widespread deployment of microgrids.
• Power converters support bidirectional power flow and grid forming features while providing dynamic decoupling -one of the important features of an electronically controlled tie between two systems. Voltage and frequency disturbances happening on one side of MBB will not propagate on its other side allowing two systems to operate asynchronously. These also simplify the implementation of IEEE 2030.7 mandated dispatch and transition functions.
• Integration of three phase optimal dispatch generated references with state feedback compensation commands. The feedback compensation is generated while explicitly including communication latency in the control algorithm for stability enhancement under small and large disturbances.
• Wireless and wired communications are subject to an analytically evaluated latency requirement based on practical constraints of the control and data acquisition functions. The remaining of this paper is organized as follows. Section II presents the interactions of various dynamic systems in a microgrid. Section III provides details of the power conversion, communication, control, and optimal dispatch methodologies integrated within MBB. Finally, section IV presents simulation cases based on IEEE 2030.7 which serve to validate the proposed MBB capabilities. Section IV also presents a detailed comparison of proposed MBB functionalities with state-of-the-art microgrid deployment approaches.

II. MICROGRID MODEL A. CONVENTIONAL MICROGRID MODEL/STRUCTURE
In this paper, lower-case letters (x) represent scalar quantities, upper-case letters (X) represent root mean square quantities, boldface lower-case letters (x) represent (column) vectors, while matrices are represented by boldface upper-case letters (X). Sets are represented using italicized capital letters. Symbols with a bar represent parameters. A dynamic MG model, consisting of synchronous generators (SGs), inverter-based resources, and loads, is used to analyze the dynamic performance of a MG under small or large disturbances. The components of a microgrid model and their mathematical representation are shown in Fig. 2. The dynamics of a synchronous generator set are represented as a seventh order generator [38] with standard primary controllers such as the steam turbine governor (TGOV1) and Simplified excitation system (SEXS) models [38]. The 7 th order synchronous generator model is chosen as it is one of the highest order models available for synchronous generators and accurately models the behavior of synchronous generators in actual microgrids. Similarly, the TGOV1 and SEXS primary controller models are chosen from DIgSILENT's commercial library which are IEEE standards and used in actual microgrids.ẋ (1) where the state variables include seven states of synchronous generator, and states of TGOV1 and SEXS mod- . Specifically, the state variables of the i th SG include its terminal frequency (ω i ), electrical rotor angle (δ i ), and stator and rotor flux linkages, The stator VOLUME 10, 2023 flux linkages include the state phasor windings on d-q frame, ψ s = ψ d , ψ q T . The rotor flux linkages include the field winding and armature circuits on d-q frame, The state variable for torque of the first-order governor system is denoted as The state variables of the second-order excitation system are, The input variables of the set of generator system are the terminal quantities, the average voltage at the terminal of i th SG. The control outputs of governor and exciter are mechanical torque The state variables for all SGs can be represented by x g .
Three-phase AC-DC power electronics converters are used as an interface between a MG and a renewable source that can be interfaced via DC-link: photovoltaics (PV), batteries, fuel-cells, etc. For wind turbine or flywheel sources, another DC-AC stage interfaced via DC-link must be added (backto-back) to the source side. The 3-phase power electronics converter dynamics can also be described using (1), but the number of states can be very high depending on the topology, structure of the output filter, phase-locked loop (PLL), inner current and outer voltage (or power) loop [39], [40]. Even medium voltage power electronics converters can feature a very large number of states. Hence, it can be assumed, without loss of generality, that state variables for power converters can be represented using variables x c j for the state variables of j th converter. All converters can be represented using x c .
The state variable vector x c contains state variables averaged over the converter's switching cycle T = 1 f sw , where f sw is switching frequency: The j th converter's vector x c j contains states of the power stage inductor currents and capacitor voltages, filter inductor currents and capacitor voltages, phase-locked loop, and inner current and outer voltage (or power) control loop states, rendering the number of state variables from dozens to even hundreds in the case of modular-multi-level converters for grid applications [41]. In general, for j th converter this vector is: The input variables depend on the converter operation mode and can be written as for the gridforming converter. Note that grid-forming converters can set the reference system frequency for other sources to follow, in which case ω ref j becomes an input variable. The better option in most practical cases is to let ω j (which is the output of H PPL (s) controller shown in Fig. 5), hit the frequency limit and stay at it until other sources come in. This will significantly improve PLL response as no switching action from one mode to another is required. This, of course, requires implementation of the integrator anti-windup inside the H PPL (s) compensator, but it is a straightforward and common procedure. In the case of a j th converter operating in grid-following mode, the input vector becomes where p * j , q * j are the real and reactive power set points. The topology of a MG with N buses is defined using the admittance matrix Y.The ij th element of the Y matrix is given by y ij = g ij + jb ij , (i, j ∈ {1, . . . , N }). The impact of load demand and network admittances is implicit in (1) since the electrical torque used in the SG's swing equation is determined using the electrical power P e i , given by Ignoring SG's internal resistance, its internal voltage E i , i ∈ ℵ g where ℵ g is the set of all SG buses, is related with its terminal voltage V k i by, Under steady state conditions, generator terminal voltages match with the supplied references and constant P and Q demands are met at the load buses. Several quantities of interest can be measured from the MG model. These include the vector of terminal nodal voltages of all phases v, the vectors of active and reactive power outputs of DERs, p DER and q DER , the vectors of active and reactive power consumptions of loads p l and p l , the frequency at the point of common coupling (PCC) between the bulk grid and microgrid ω PCC and the vector of frequencies at all DER terminals ω DER .
These quantities need to be communicated to and from a central controller, the microgrid controller (MGC), which performs secondary control and optimal dispatch, among others. This calls for a communication infrastructure with appropriate parameters (e.g., latency, sampling rate, etc.). Under certain conditions, such as during a restoration process, the MGC may be required to reconfigure the microgrid structure. Consequently, switches with remote control capabilities are encountered in the network. Let ℵ d be the set of all load nodes without generation such that sensors are installed and/or the loads are connected through remote-controlled switches. It should be noted that ℵ d ∩ ℵ g = ∅. Nodes that have both generation and load are classified under ℵ g , and, for such nodes, it is assumed that the size of generation at that node exceeds the demand. Also, let ℵ s be the set of all line switches with remote control capabilities in the network. Now let

B. PERFORMANCE REQUIREMENTS OF A MICROGRID
Modern microgrids should have the following key functionalities: • Modern microgrids feature electronically controlled links to the bulk electric grid [42], [43] with remotecontrol capabilities. This can significantly improve system stability as it enables millisecond-level control of active and reactive power, as well as voltage and frequency regulation, superior to electromechanical counterparts.
• In an islanded microgrid, system instability can be caused by the disturbance of operating conditions due to low system inertia. Large disturbances such as a fault or tripping of a generation resource may lead to frequency or voltage instability. Small disturbances such as constant changes in load demand may lead to frequency and voltage deviation. It is thus essential to maintain MG frequency (ω) and nodal voltages (v) within thresholds during both small and large disturbances. This is challenging for grids with high penetration of DERs. System parameters need to be maintained in a desired range during steady state conditions as well by maintaining load and generation balance through optimal DER dispatch using secondary centralized control.
• Modern microgrids require secure low-latency communication. This ensures that measurements and control commands are communicated between field devices and centralized secondary controller in a timely manner, while maintaining integrity of the communicated messages. The critical latency required for maintaining system stability differs among SGs, being dependent on inertia. To ensure message integrity, a message authentication scheme is deployed.
• The bidirectional power conversion functionality, secondary centralized control and the communication system need to be integrated effectively in a modularized structure of an MBB. It forms the fundamental unit at the PCC which provides smooth operation between the external grid and the microgrid.

III. MBB FUNCTIONS AND THEIR INTEGRATION A. DISPATCH AND FEEDBACK CONTROL
As mentioned in section II-B, one of the important performance requirements for a MG is its ability to maintain stability. The low system inertia in a highly inverter-based resource (IBR) penetrated MG makes it challenging to maintain system stability during disturbances. It is also essential to maintain generation and load balance and minimize renewable energy curtailment while meeting voltage and capacity constraints. This is achieved using a MGC which implements state feedback control to maintain system stability under small and large disturbances and provides optimal dispatch set points for all DERs. The enhancement of system stability requires centralized control from MGC. This is achieved by feeding system states to the primary controller [44]. In this paper, output feedback is used to determine the feedback gain. The MG system (1)-(5) is represented as a linearized state space model given by,

x(t) = Ax(t) + Bu(t) y(t) = Cx(t)
where The output variables y = v; ω DER ;p DER ;q DER ;p l ;q l are measurements obtained through metering devices such as micro phasor measurement units; and A, B, and Care state, input, and output matrices, respectively.
The state feedback considering cyber latency is represented by where Kis the feedback gain, and τ is the one-way latency between MGC and the field devices.
Because of the short distance in a distribution system, the one-way latencies back and forth between MGC and field devices are assumed to be identical, which is τ . To apply the control law, MGC takes states from field devices with latency τ ; therefore, the control law in MGC uses the states with latency τ , u MGC (t) = −Kx(t − τ ). Then, the commands are transmitted from MGC to field devices also with the same latency τ . Consequently, the actual input commands are the command issued by MGC with latency τ , u (t) = u MGC The feedback gain, K, is designed such that all eigenvalues of the closed-loop system under continuous state-space, A − BK, are in open left-hand plane to achieve asymptotic stability. In a mixed microgrid consisting of both synchronous generators and IBRs, the control signals are fed back only to IBR systems because they have programmable primary controllers unlike synchronous generators. For instance, to stabilize a MG consisting of a battery energy storage system (BESS) and a SG during a transient event, the frequency deviation between them is used to compensate for the power command (8) to the storage system [44], i.e., where, p * b ∈ u c j , ω b ∈ x c j , ω sg ∈ x g i and k is the feedback gain. p * b will be added to p * b , the optimal steady state real power dispatch setting of the BESS obtained using (10)- (12).
Since most state variables are not measurable, e.g., flux linkage, torque, and field voltage, an observer is needed to determine the system state. Instead of the actual states, the estimated states are used for the control law considering the cyber latency, u = −Kx(t − 2τ ). The closed loop system with output feedback is given by where e is the error between actual and estimated states, and L is the observer gain.
If the system is stable, the microgrid settles at a stable operating point following a disturbance. This operating point may not be the same point as the pre-disturbance condition. The steady state operating point is determined to meet an objective and is implemented by optimally dispatching the DERs. A mixed integer linear programming (MILP) based three phase unbalanced optimal power flow (OPF) formulation is developed to generate optimal DER dispatch settings using a subset of MG measurements y(t) = Cx(t) as inputs. The objective (10) is to minimize the curtailment of PV systems (p pv ). Expression (10) along with the load-generation balance constraint (11) ensure that PV generation is prioritized over generation from SG (p sg ) and BESSs are charged (p b ) [30].
The MG topology is considered in the OPF formulation using a three-phase unbalanced linearized power flow constraints (12)-(15) based on the distFlow model [45]. The elements of the R and X matrices were evaluated using grid probing techniques which can reduce customized engineering effort.

v t n = R p t pv + p t sg −p t l + p t b + a s v s 1 (12)
where, B is the set of all nodes in the microgrid; C is the set of all nodes with capacitor banks and C c is the set of all nodes with controllable capacitor banks. The optimal state (ON or OFF) of the capacitor bank is modeled using a binary variable δ t,φ c,i ∈ {0, 1} as shown in (16). The optimal tap position of the automatic voltage regulators, if present in the microgrid, can be obtained using a six-bit binary code as described in [46].
Any BESS i has a maximum kW rating (p kW. The maximum rate at which a BESS may be charged at any time t can thus be obtained as, Similarly, the maximum rate at which a BESS may be discharged is given by, The real power injection from BESS is constrained to be within these charging and discharging limits (19). Reactive power injections from BESS are constrained to be within a vendor defined percentagek  (20). The real and reactive power injections are constrained to be within their kVA rating (21). This quadratic constrained is linearized using the approach described in [47].
Real and reactive power injections for PV and SG are evaluated in a similar manner. Real power injections from PV systems are constrained to be within maximum irradiance measurements while the SG real power injections are constrained based on their ramping limits. Line thermal limits and nodal voltage thresholds are also included as constraints. This formulation works with any combination of DERs. This OPF formulation is solved in real time within the MGC. The decision variables of this formulation r = p * DER T , q * DER T , (v * ) T are used as the input references by the primary controllers (exciter, governor, and/or inverter) of DERs. Fig. 3 summarizes the approach used for integrating optimal dispatch and feedback control. The measurements from the MG model are used as inputs by both the OPF and feedback control modules. The feedback control u = −Kx helps the system reach the optimal references r under normal as well as perturbed operating conditions. Owing to the significantly different time scales of operation of the control and dispatch loops, hunting behavior is not observed.

B. COMMUNICATION
In [27] the impact of communication latency (τ ) on DC microgrids was evaluated. The authors' prior work [31] shows that along with communication latency τ , the sampling rate (h) also impacts the stability of the microgrid. Both parameters must be determined prior to commissioning and operation of the microgrid. Instead of relying on time consuming studies to determine h and τ which increases MG installation and commissioning time, the analytical method provided in [31] can be used to evaluate h and the maximum tolerable one-way communication latency (τ max ). The equivalent matrix (13) proposed in [31] can be used to analyze MG's stability considering h and τ using only the linearized state space model of the MG (6), and the feedback control gain, K, (7) It is worth noting that cyber latencies can be different and time-varying at each node within a microgrid. However, in small area microgrids, the communication technology used is typically identical across nodes, meaning that cyber latencies are considered similar. The proposed method is designed to identify the critical values of cyber latencies, allowing for the determination of communication system implementation requirements. Specifically, the communication system must have a cyber latency that is less than the critical values identified through the proposed method to ensure stable operation within the microgrid.
As shown before, τ is the one-way latency between when measurements are available at a field device (t 0 ), and when measurements are received at the MGC (t 3 ). Then, from Fig. 4, the inequality (15) must be satisfied. Here, t fd auth is the time it takes the field device to authenticate an outgoing measurement packet, t ch is the communication channel delay, and t MGC authc is the time taken by the MGC to perform authentication checks on the incoming measurement message. Similar delays are introduced in the return trip from MGC to field devices.
It is noted that t fd auth is dependent on the complexity of the authentication scheme employed and on the processing power of the field device, as does t MGC auth on the processing power of the MGC. The communication channel latency, t ch , is dependent on the type of network used. The choice of a cellular network is particularly favorable [48]. The current 4G cellular technology is among the fastest and most VOLUME 10, 2023 reliable wireless networks for connecting widely dispersed units. With the advent of 5G technology, higher reliability and lower latencies are expected [49]. Here, it is assumed that the cybersecurity measure enforced, and the physical communication network are both provided by a single network provider. Thus, the one provider needs to adhere to the limits of τ max .

C. POWER CONVERSION
As mentioned earlier, MBB is a modular building block that provides integrated power conversion, control, and communication capabilities. It consists of a three-phase converter comprising two AC-DC stages in back-to-back configuration, featuring DC-link in-between, and output connections on both sides that can be either both AC, or both DC, or one AC and another one DC, whenever is so needed. These different functions can be achieved by invoking different control algorithms without a change of topology or internal structure. This allows for bidirectional power flow to and from the bulk grid. The DC link helps in isolating the microgrid from any voltage or frequency disturbances from the bulk grid. A reduced-order model of MBB's AC-DC stage converter is shown in Fig. 5. PV and BESS inverters are modeled using this reduced-order model as well. The full MBB model comprises two of these models interfaced back-to-back via the common DC-link.
Variable averaging over the switching frequency eliminates switching effects unnecessary for system-level simulation. For instance, pulse width modulation operates at a much higher bandwidth than the bandwidth of microgrid dynamics from small and large disturbances. The next fastest dynamics of interest in power converters are associated with the inner current loop with a bandwidth typically around one tenth of the switching frequency. Modeling of system-level power electronics can be reduced further, one decade of frequency below the current loop bandwidth (about two decades below the switching frequency) with no loss of generality. Assuming a well-designed inner current loop in the power electronics converters, the new reduced-order average model shown in Fig. 5 can use an ideal current source at the output stage for all three phases. This still allows that outer voltage loop can be closed over the ideal current loop, thus dominating converter's dynamics in the frequency range from DC to several hundred Hz. Therefore, the model in Fig. 5 is based on a power-balance between input (DC) and output side (that can be either AC or DC). The model preserves protection/current limiting features, and the circuit can be treated as a plant for (any) outer loop design. The model preserves its non-linearity and can be linearized using fewer equations (and state variables) which simplifies the study of dynamic interactions.
To synchronize converters with a network they are connecting to on the AC-side and/or other converters in a system, Phase-Locked Loops (PLL) present an essential element of converter control. PLL in Figure 5 was implemented using measured voltages at AC terminals: where H PLL (s) (often of the form k p +k i /s) represents a compensator used for the phase alignment, v q represents terminal voltage in q axis, and T dq_abc = T −1 abc_dq represents the power-invariant Clarke's and Park's transformation [38]. As shown in [40] states of the vector x PLL j are output of the integrator in H PLL (s) and angle θ. It is noted that control uses expressions (v 2 d + v 2 q )/3 and (i 2 d + i 2 q )/3 that conveniently provides instantaneous rms values of terminal voltage and terminal currents, respectively, assuming they are sinusoidal, and the system is relatively well balanced.
With inner current loop closed (ideal in this case), outer control loops can be closed depending on the mode of operation a power converter will be operating in within the microgrid environment. Two major control approaches can be defined -grid forming and grid following.
Grid forming control is a mode where power converter regulates the voltage and frequency at its terminals. This control is modeled as shown in Figure 5: Here, v * MBB is the reference voltage set point for MBB generated by the dispatch functions (10)- (12). In the case where power converter is the only source in the islanded system, or appointed to define the frequency of the system, angular frequency and phase angle can be imposed by: PLL is disabled in this case. Grid following control is a mode where power converter does not regulate voltage or frequency at its terminal (point of common coupling), but instead regulates active and reactive power delivery (or consumption in a bidirectional case):

IV. SIMULATION RESULTS
As shown in Fig. 6, the microgrid model used for validation of the proposed MBB is a balanced 3-phase system which is a modified version of the original IEEE 13-node system. It consists of a BESS at node 680, a PV unit at node 675, a generator at node 633 with 5 MVA capacity and MBB present at the PCC, i.e., node 650. The BESS and PV inverters are modeled as shown in Fig. 5 and have a capacity of 2 MVA each. Loads at node locations 670, 634, 675 and 671 are 3-phase and balanced. While a balanced system is considered for control design, MBB can be used for optimally dispatching an unbalanced microgrid as well. These microgrid, MBB and DER models are created in DIgSILENT PowerFactory to accurately simulate system dynamics.
The state feedback control given by (6)-(9) and evaluation of critical communication latency (22) requires a linearized state space model. This linearized state space model is developed using Simulink from the non-linear dynamic microgrid model in DIgSILENT. Matlab based functions are then used to evaluate the feedback compensation for enhancing transient stability. The R and X matrices needed for the three-phase unbalanced linearized DistFlow model (12) are evaluated using grid probing techniques in OpenDSS. The MILP based OPF formulation is solved using the Python package PYOMO using the GLPK solver to generate the references r for the primary controllers of the DERs. The references and feedback compensation are added as shown in Fig. 3, before simulating their impact in DIgSILENT. In this co-simulation environment DIgSILENT acts as the actual microgrid with detailed models, whereas the control and dispatch commands are generated using linearized approximations of the actual microgrid. The use of the reduced-order model of MBB's AC-DC stage converter as proposed in section III-C reduced simulation time by 20-30%. The scenarios discussed below highlight MBB's effectiveness in maintaining MG stability and are often not considered by state-of-the-art MG deployment approaches.

A. SCENARIO 1: DYNAMIC DECOUPLING
The decoupling functionality of MBB is simulated in this scenario. MBB interface has the capability to filter the harmonics and voltage sags and fluctuations from the bulk grid side and, therefore, there is no voltage fluctuation on the microgrid side. This functionality helps in satisfying the metrics associated with both the dispatch and transition functions of IEEE 2030.7. As shown in Fig 7(a), at t=3 s, there are harmonics with increased amplitude and at t=3.1 s, there are harmonic distortion on the bulk grid. However, due to MBB providing dynamic decoupling, the harmonics do not propagate to the microgrid -as phase voltages measured at the PCC shown in Fig. 7(b) demonstrate. Similarly, disturbances happening on the microgrid side will not be seen on the bulk grid side. Moreover, frequency of two systems linked via MBB can be different, enabling asynchronous system operation.

B. SCENARIO 2: STARTING THE MICROGRID
This use case demonstrates MBB's black start capability as defined in IEEE 2030.7. The microgrid is in OFF state with VOLUME 10, 2023 the utility grid disconnected. The distributed energy resources (DERs) in the microgrid are in offline mode. MBB sends control command to the battery unit at node 680 to start the microgrid in the grid-forming mode at t=4 s as shown in Fig. 8, with PLL engaged to maintain the system frequency. It starts with picking up the critical load at node 675 at t=4 s. At t=8 s, the synchronous generator starts operating, works as reference machine, regulates the system frequency at around 60 Hz, and serves the critical load. It also picks up non-critical loads at Node 671 at t=10 s and Load 634 at t=12 s. The generator power output curve can be seen as shown in Fig. 8(b). From Fig. 8(a), it is noticed that the battery unit supports the critical load in the microgrid until generator starts and can meet the power demand.

C. SCENARIO 3: PROVIDING CRANKING POWER TO THE BULK GRID USING MBB OPTIMAL DISPATCH FUNCTIONS
This scenario models the MBB capability to send optimal dispatch commands to provide constant cranking power for system restoration on the bulk grid even when PV output drops suddenly and significantly. This use case also demonstrates MBB's capability to regulate power flows at the microgrid's PCC with the bulk grid as required by IEEE 2030.7. The microgrid is operating in an islanded mode with the battery unit working in the grid-following mode, and the synchronous generator maintaining the microgrid frequency. Initially, these DERs in the microgrid provide active power to meet the demand of the critical loads till t=15 s as shown in Fig. 9. Fig. 9(a) and Fig. 9(b) show the real and reactive power injections from all DERs respectively. Thereafter, MBB helps in bulk grid restoration by providing cranking power to the generators in the distribution/transmission system upstream of the microgrid, leveraging its bidirectional power flow capabilities. Fig. 9(c) shows the uniform cranking power being supplied from microgrid to the bulk grid at its PCC. This is achieved by evaluating the maximum cranking power MBB can provide using the DERs within the microgrid using the optimal dispatch functions. This value was 3.3 MW considering the constraints as described in section III-A. The PV unit is kept offline initially to avoid uncertainties in generation. The synchronous generator and the battery unit are dispatched optimally to provide desired 3 MW cranking power to the bulk grid while still supplying the critical load. As can be seen in Fig. 9(a) and Fig. 9(b) the battery unit and the synchronous generator also provide reactive power based on the optimal dispatch commands communicated to them by MBB to maintain desired voltages. The MBB itself provides reactive power support of 0.022 MVAR.
The PV is brought online at t=45 s to supplement the battery unit and synchronous generator which leads to a reduction in their power output. However, PV generation can change suddenly due to cloudy conditions, and this is simulated by reducing the PV demand from 2 MW to 1 MW at t=60 seconds. The optimal dispatch commands from MBB to increase the battery unit output by 1 MW are received at t=60.04 s after a communication delay of τ = 40 ms. However, as can be seen in Fig. 9(c), that despite these sudden changes in generation and communication delays, MBB can provide constant 3 MW cranking power to the bulk grid. Generating optimal active and reactive power dispatches for DERs, while maintaining stable operating conditions throughout the microgrid as demand and generation changes rapidly, can only be achieved using the centralized network-aware dispatch functions provided by MBB.

D. SCENARIO 4: STABILIZING THE MICROGRID UNDER HIGH PV PENETRATION USING MBB CONTROL FUNCTIONS
This scenario demonstrates the ability of MBB's state feedback-based control algorithm to ensure stability of a microgrid in an islanded mode. With the high penetration of PV system, unstable operating conditions can occur as PV output changes rapidly. In this scenario, the PV system provides 55% of demand which is assumed to drop to zero due to cloud cover, and the SG and storage system exhibit dynamic behavior as they compensate for this reduced generation. Fig. 10(a) shows the real powers of all DERs when state feedback control is not used whereas in Fig. 10(b) the real power of all DERs is shown when state feedback control described in section III-A is applied to maintain system stability (8). Fig. 10(c) shows the frequencies with and without feedback control. Pre-disturbance frequency is set slightly higher at 60.368 Hz using the droop curve to avoid large frequency drops under heavy load conditions in the islanded mode. It can be seen in Fig. 10(a) and Fig. 10(c) that the primary controllers of SG and storage system are unable to stabilize the microgrid after the PV generation drops to zero. In Fig. 10(b) and 10(c), however, the feedback (8) compensates for the PV power drop during the transient, and the microgrid is stabilized.

E. SCENARIO 5: COMMUNICATION LATENCY AND STABILITY OF MICROGRIDS
In scenario 4, feedback control was shown to be essential to maintain microgrid stability. However, it forms a secondary control loop and requires a communication system. Scenario 4 considered zero latency while in this scenario the impact of communication delay discussed in section III is considered. Considering the impact of latency in dispatch functions described in IEEE 2030.7 is essential for microgrid stability, however, is often not addressed. Figure 11, shows the control performance with different communication delays. This figure shows that the feedback control maintains system stability if communication delays stay under 80 ms. When the delay increases to 90 ms, the delayed measurements degrade the control performance, and the system becomes unstable. The critical values of cyber latency, τ max , vary depending on the overall system conditions and were determined using (22). Table 1 provides a comparison of the scenarios discussed above with how they are presently managed by state-of-theart MG deployment approaches. The comparison highlights the benefits and necessity of using MBB, especially as the penetration of IBRs increases in microgrids.

V. CONCLUSION
This paper provides a new concept of microgrid building blocks (MBB) together with a feasibility study by modeling and simulations. Microgrid building blocks are an enabling technology to facilitate widespread deployment of microgrids. MBB provides standardized operation and control capabilities to clusters of distributed generations and loads in microgrids, thereby reducing customized engineering effort. MBB integrates power conversion, communication, and control functions in a standardized block to meet the operation, control, and cost challenges in a grid environment with high penetration of renewable energy. Using a co-simulation environment, the IEEE 2030.7 standard based scenarios presented in this paper validate MBB's feasibility. The development of an MBB prototype will require development of modularized controls, communications, and power conversion blocks and a real-time simulation-based testbed for validation. The future steps for MBB will include the design, prototyping, and field demonstration of these modularized MBB blocks using an unbalanced microgrid model. Future standardization and modularization of the MBB will be critical for widespread deployment of microgrids. Key MBB features proposed in this paper and validated theoretically and experimentally are as follows: • Integration of optimal dispatch and control functions. • Theoretical evaluation of critical communication latency for maintaining microgrid stability and explicitly including it in the proposed control algorithms.
• Dynamic decoupling capabilities to comply with the IEEE 2030.7 dispatch and transition metrics and to allow optimal power exchange with the bulk grid.
• Validation of critical microgrid capabilities such as black start and transient stability in a co-simulation environment, developed using open source and commercial software.