## 2 Microgrid Hierarchical Control Group
### Primary Control  
Also called the internal control or local control, the primary control is defined as the first stage in the control hierarchy group by presenting locally collected information at the fastest response and requires no communication between the controllers. All information are gathered locally and have a certain intelligence level to operate in a decentralized operation mode. According to [22], the decentralized approach should highlight the following fundamental concerns: the integrated units should share the desired total load, stability assurance is provided on a global scope, and the inverter control is capable of providing DC voltage offset avoidance.  
The inverter output control's architecture is distinguished from the outer loop for voltage control and internal control for current regulation, as illustrated in Figure 3. The state-of-the-art inner-loop control for the grid-side converter controllers are mainly associated with their reference frames: synchronous frame (_dc_), stationary frame (_a_\(\beta\)), and natural frame (_abc_). The synchronous and stationary reference frames served the _dc_ and sinusoidal variables, respectively, and are associated with the proportional integral (PI)-based controllers and proportional resonant (PR)-based controllers, respectively. Generally, the natural reference frame is employed in the controllers' approach as PI, PR, dead-beat, and hysteresis controls. The use of PI controllers is the most comprehensive method for control loop design [23].  
On the other hand, the state-of-the-art outer loop serves as the power sharing control. This control is significant to control the DG unit as well as the associated local loads to meet the balancing between the active and reactive powers. As for the synchronous generator, three prime components are used to realize the output control and power sharing, which are the voltage regulator, governor, and the inertia obtained from the synchronous machine itself [24]. Droop controllers have been used to emulate the droop traits of the synchronous generator; by purposely simulating the synchronous generator, it has shown the fastest response. It utilizes the correlation of active power-frequency (_P_\(\beta\)_) and reactive power-voltage (_Q_\(V\)_) by controlling the values of voltage amplitude and frequency to realize power sharing. The droop-based approach attracts a lot of research efforts due to the advantage it provides over other control options, such as the capability of plug-and-play implementation, flexibility due to non-communication network, simple design, etc. From another perspective, a virtual synchronous generator's (VSG) concept also generally being adopted as presented in [25; 26]. The relationship between power productions and voltage-frequency regulations can be achieved through virtual inertia and damping factor into the control loop that mimics the dynamics of the existing synchronous  
Figure 3: Primary control structure’s block diagram.  
generator. By means the characteristic of the VSG-inverter based is accessible to the main upstream grid system.  
In addition, the independency on non-communication control also can be offered as a communication control between the devices and could be applied according to the requirements. Hence, power sharing and voltage regulation could be achieved accurately. Despite adjustment accuracy, communication-link methods can increase the capital cost of microgrids over non-communication methods [27]. Various ways have been presented over the years; for instance, these include master and slave; concentrated control, which has two variants--central limit control and power deviation; instantaneous current sharing; circular chain; and distributed control, among others. Subsequently, the communication-based approach is enormously intricate in extended microgrids and it can degrade system performance during faults at the communication network.