Multi-Mode Master-Slave Control Approach for More Modular and Reconfigurable Hybrid Microgrids

The increasing demand for energy and the high penetration of distributed energy resources require the evolution of current electrical systems toward smarter and more reliable electric grids. In this regard, microgrids (MG) play a vital role in integrating distributed energy resources (DER), loads, and storage systems. However, microgrid architectures lack versatility and flexibility in terms of control, limiting their expansion. This paper presents a multi-mode master-slave control approach to increase the flexibility of DC-coupled hybrid microgrids. The proposed control scheme allows optimal coordination of the power units connected to each bus. Coordination among buses is also achieved through interlinking and interfacing converters; thus, ensuring the reliable operation of the microgrid. Moreover, this approach considers the possible expansion of the capacity of the MG, providing more degrees of freedom for optimization and control. An MG with two DC distribution buses connected to the main grid is selected as a case study to develop dynamic modeling and establish a control architecture. The advantages of the proposed control are discussed via MATLAB simulation results considering the operation of the MG in several scenarios.


I. INTRODUCTION
The higher penetration of distributed energy resources (DERs), and the rapid deployment of new loads and sources such as electric vehicles (EVs) and energy storage systems (ESS), has given rise to the need for smarter and more reliable electrical systems [1], [2]. The future distribution network must consider interactive power systems that use scalable configuration in DC, AC, and hybrid types [5], [6], [9]. Moreover, AC MGs are well established and have been studied thoroughly during the last few years [3], [10]. Conversely, DC-based MGs have caught the attention of the scientific community as they reduce the system's operational complexity because they do not require reactive power control and frequency regulation. Fewer conversion stages are needed as most of the renewable-based generators have a DC nature, and no synchronization algorithms make DC MGs more efficient than other types of MGs [11], [12], [13]. Although AC MGs have higher power ratings, DC MGs applications range from space applications [14] to industrial applications of around 100 kW [15]. Additionally, promising results have been demonstrated, such as energy savings of about 5 − 15% [16], [17], [18]. However, most DC MGs are proposed to analyze particular applications in which defined architectures and controls are applied to fulfill the corresponding power requirements [4], [6], [8], [19], [20], [21].
Hierarchical control structures are applied and recommended for MGs, which usually comprise primary, secondary, and tertiary control layers [22]. The primary level operates on power converters, used as interfaces, and is therefore characterized by the use of local variables and by having the highest bandwidth. On the other hand, the secondary level is a multi-objective control layer, commonly related to power and voltage control [5]. Indeed, for hybrid MGs, the power exchange between buses is also controlled by this layer, which operates the interlinking converters (power conversion units exchanging power between the buses of an MG). Finally, the tertiary level is related to optimization of objectives as well as interaction with the main grid [9].
Hierarchical control has been widely applied to MGs' control. For instance, in [23], the event signals approach is used between the primary and the secondary layers to minimize communication issues. Other hierarchical control approaches are proposed considering an adaptive operation. However, in these approaches, previous knowledge of the operation modes is needed for the proper operation of the control strategy [24], [25]. Conversely, master-slave control is another hierarchical control approach applied to MGs and hybrid systems that provides good control performance. Although it was initially used for the disconnection of DERs in a grid-connected to islanded operation switch [26], [27], [28], it is currently applied to hybrid systems composed of wind generators and PV systems [29]. In fact, in [28], a control method is proposed to minimize the communication bandwidth requirement in complex MGs, which is one of the frequently criticized drawbacks of this configuration. Additionally, in [26] and [27], seamless techniques are proposed to minimize the transition effect from islanded to grid-connected modes and vice versa.
In master-slave control, the DERs or the ESSs operate as master units regulating the voltage of the buses of a microgrid, and therefore, the rest of the elements of the system operate as slaves. However, transitions of one element between master and slave roles can trigger oscillation problems in the distribution buses [25]. Currently, there are no further studies that analyze the transition between multiple operational modes in DC MGs [5]. In this context, this paper proposes a multi-mode control approach that allows to some power converters to be configured as master units that regulate the main variables of the system while the others remain as slaves. The proposed operation ensures adaptability and reliability through a multi-mode operation with limited communication bandwidth. The proposed approach focuses on facilitating the expansion capability of a DC MG while maintaining its control robustness.
In view of the presented literature review, the main contributions of this work are.
i) A hierarchical control structure based on a master-slave approach is proposed ensuring adaptability and modularity through a multi-mode operation with limited communication bandwidth, also facilitating the expansion capability of a DC MG.
ii) In the proposed scheme, the tertiary control level is in charge of determining the operation mode and the secondary level regulates the voltage of each DC bus based on novel state-transition diagrams for the main elements of DC MGs. Note that the proposed scheme considers the THD (among its variables) to determine the MG's operation mode.
iii) A logistic function is proposed to ensure the smooth transition of the conversion stages between master and slave roles determined by the tertiary control level. Note that the transition from master to slave and vice versa is produced only when the MG's operation conditions change, and this is smooth, avoiding stability issues.
The architecture with two DC distribution buses and AC source capability shown in Fig.1 is chosen for case-study VOLUME 11, 2023 55335 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
to validate the proposed theoretical approach. The selected architecture feds loads in the three buses, integrates RES in both DC buses and uses an ESS in only one DC bus. As a particular feature, this microgrid can support the AC loads with high quality voltage despite the quality of the voltage of the grid or an auxiliary generator. Extensive simulation studies validate the good performance of the proposed control strategy in this architecture under different operation modes, i.e., grid-connected, generator-connected and island mode. Finally, Table 1 shows the features of this proposal compared to some previously related works.
The rest of the paper is organized as follows. Section II describes the modular MG scalability process while, in Section III, the architecture selected for the case-study is modeled dynamically. Subsequently, in Section IV, the model of a DC-coupled hybrid MG selected for the case study is presented. The proposed multi-mode master-slave control approach is explained in Section V providing details about the mode-transition logic and the design of the required control loops. The correct operation of the proposed control is validated in Section VI via simulation results in the selected MG architecture operating in several scenarios. Conclusions are presented in Section VII.

II. MODULAR MICROGRID ARCHITECTURES
The development of more flexible DC MG architectures presents important challenges along with attractive opportunities. This action will facilitate, for example, the incremental integration of new loads and sources, helping to solve the problem of limited access to electricity in some rural developing regions and potentially improving agricultural production activities. However, technological and economical shortcomings must be first solved to bring robustness to this solution. Therefore, the progressive power expansion capability as well as the possibility to boost the use of ESS as backup energy to provide stability become indispensable [30], [31], [32].
There is no single methodology that outlines the best way to expand or modify MGs. Interesting works related to increasing their power capacity have been presented in [30], [31], and [32] where scalable DC MGs were developed; however, these papers only address a particular case, which is satisfied in a business-as-usual context. Therefore, to show different architectures and how they could be expanded, a family of modular MGs is depicted in Fig. 2. The main idea is to demonstrate the incremental method that is used to obtain vast interconnected sub-systems from the simplest canonical single-bus MG, thus illustrating the context in which the main contribution of this paper can be applied. Fig.2 (a) shows a stand-alone single DC-bus MG used to feed a single load employing only one DER generator and one ESS. The power conversion stages required in this case are used only by the generator and the ESS (and eventually the load). Note that multiple loads, generators and ESSs can be modularly incorporated to this canonical system into a single DC bus. The new elements can be connected either through the same power converters or by parallel converters.
The first scaling step of the MG capacity involves integrating an additional DC distribution bus as shown in Fig.2 (b). This architecture allows the power to be distributed into two different DC voltage levels (Extra Low Voltage Direct Current -ELVDC or Low Voltage Direct Current -LVDC, for example, [33]). The controlled power exchange between different buses must be conducted through bidirectional interlinking converters (ILCs). Thus, the power in this configuration can also be increased by using multiple ILCs connected in parallel. The second scaling step is to add a DC-AC interfacing converter (a power conversion unit allowing exchange of power between the microgrid and an external element such as the grid) to this structure; hence, AC loads can be supplied. Moreover, due to the interfacing converters (IFCs), the system can operate as a stand-alone DC-coupled hybrid MG or as a grid-connected hybrid MG, as depicted in Fig.2 (c) [9].
Note that the linear interconnection of many buses is the simplest way to increase the MG's capacity. However, if any component in the chain fails, it can jeopardize the entire system's operation. Therefore, individual IFCs are added between each DC bus and the AC bus, thus providing an extra power transfer path and increasing reliability, as suggested by the architecture in Fig.2 (d). Finally, beyond a local organization of the MG, Fig.2 (e) depicts the interconnection of multiple modular MGs with different current types (DC or AC) and distinct voltage levels. Moreover, the use of various buses or even the use of clusters of MGs [3], [33] increases the number of elements absorbing and/or injecting energy between buses, the main grid and between clusters. Nevertheless, multi-system architectures require more complex controls and communication techniques to apply the energy management system (EMS) properly. An interesting way to address the problem is to have power units ensuring the reliable operation of the MG operating as masters, while others operate as slaves. In this way, several units can be added without affecting the control architecture. This last aspect points in the direction of having more modular and reconfigurable MGs.

III. DESCRIPTION OF THE CASE STUDY
MIREDHI-Lab is a research project funded by the Ministerio de Ciencia, Tecnología e Innovación de Colombia (MinCiencias). The project's main objective is to develop a pilot facility for a smart hybrid MG capable of providing electricity to rural zones and facilitating the use of technology in agricultural activities, and, in general, in daily life. The proposed MG architecture depicted in Fig.3 was scaled through the linear interconnection of one AC and two DC buses. The two DC buses, Bus 1 and Bus 2, have different voltage levels and are connected to an AC sub-system (Bus 3) which, in turn, is properly connected to the main grid or a diesel generator (DG). Hence, for this architecture, grid-connected, generatorconnected and island mode are operational modalities that can be derived. Additionally, as a particular feature, Bus 1 can support the autonomy of the whole system when the  microgrid is operating in island mode. To this end, the Bus 1 is composed of a PV generator (PVG 1 ), a wind turbine based generator (WTG 1 ) and an energy storage system (ESS 1 ). Similarly, Bus 2 integrates PV generation (PVG 2 ) to supply the power consumption in both DC buses, exchanging power between them through an ILC. Moreover, to coordinate with the main grid and supply AC loads, Bus 2 is connected to Bus 3 through an IFC [9]. Note that the only function of Bus 3 is power distribution because when either the grid or the auxiliary generator are present, they impose the voltage and the IFC converter only shares power. When operating in island mode, a Stand Alone Converter (SAC) feeds the loads, thus ensuring a high-quality voltage. Under these considerations, the MG is modeled differentiating the AC side and the DC side, where the latter is responsible for the dynamic behavior. Additionally, converters are considered ideal elements to simplify theoretical development. In terms of control, the MG needs to regulate the voltages of the DC buses which will be achieved using separate controllers (primary control level). However, as will be described in detail later, the ILC that interconnects the two DC buses can only regulate one of them, thus enforcing another converter to regulate the voltage of the remaining bus. The secondary control layer is in charge of determining both the converter's instantaneous VOLUME 11, 2023 operation mode (''master'' or ''slave'') and the overall mode of the microgrid, i.e., grid-connected or island modes among others.

IV. MICROGRID MODELING A. BUS VOLTAGE MODEL
A simplified mathematical model of the DC side of the MG is developed considering that the primary control level is dynamically faster than the secondary control level. This assumption is valid for hierarchical structures, as a time-scale separation of usually ten times is established, i.e., the primary control is ten times faster than the secondary control [3]. Therefore, the dynamics of the power unit do not influence the model of the DC buses. Bus 1 and Bus 2 are modeled as nodes with a constant capacitance C n (n = 1, 2) which is large enough that the input capacitance of the connected loads is negligible. Then, for the analysis, the state variables v 1 and v 2 are defined as the voltages of Bus 1 and Bus 2, respectively. The types of loads considered for this case study are constant power loads (P CPL n ), constant resistive loads (R n ) and constant current loads (i CCL n ). The resistive and inductive components of the wires interconnecting different elements into the MG are considered negligible. Thus, the expressions for each bus are defined as: It should be noted that (1) and (2) comprise two main terms. The first term includes the currents of the power units which can operate as control variables (i PVG 1 , i ESS 1 and i ILC 1 in (1), and i ILC 2 and i IFC 2 in (2)). The second term comprises other power generation units which are not used for control purposes (P WTG 1 in (1) and P PVG 2 in (2)), and the loads. The proposed strategy consists of selecting the proper variables to control the system while the other variables are considered disturbances. Then, the currents selected as the control for each bus are defined as i comp 1 and i comp 2 while the sum of the other currents is grouped in the terms i1 and i2 , respectively. Also, the power of the elements that are not used for the control and the constant power loads are grouped in the terms p1 and p2 , respectively. Then, expressions (1) and (2) are rewritten as follows: By imposing zero dynamics on (3) and (4), the following equilibrium point coordinate (v 1 ,v 2 ) is found: where These parameters are the values of the variables defined at a specific operation point. By linearizing (3) and (4) around the equilibrium point defined by (5) and (6), equations (7) and (8) are obtained: Then, by applying the Laplace transformation, the following expressions are derived: where Pr 1 = P WTG 1 − P CPL 1 and Pr 2 = P PVG 2 − P SAC − P CPL 2 . By considering zero dynamics in the perturbation variables, the transfer functions that represent the dynamics of the bus voltages with respect to the compensation currents are derived as follows: On the other hand, the AC side is modeled using simple algebraic expressions, which allows the operation modes (island, grid-connected and generation-connected) to be easily defined. Therefore, the power contributions of the involved elements are defined as: (15) where N gr , N gn and N pq are integer variables that take values in the set [0, 1] and define the mode of operation of Bus 3. N gr and N gn are active (value equal to 1) when either the grid or the auxiliary generator are connected to the system, respectively. N pq is active when the grid or the generator comply with the power quality requirements (amplitude and frequency of the voltage into admissible ranges), thus they can feed the AC loads. Note that P SAC 3 and P IFC 3 are variables that define the power exchange between Bus 2 and Bus 3; they are given directly by the consumption of the loads connected to Bus 3 or the power balance in Bus 2, respectively. In terms of hardware, this functionality can be obtained by integrating a multi-port static transfer switch. The same type of loads defined for DC buses are considered for the AC side and are defined in (16).
The excursion of the MG variables is limited to provide adequate rules for its operation. The following equations define the corresponding constraints: where P PV 1 , P ESS 1 , P WTG 1 , P ILC , P PV 2 , P IFC , P LDS 1 , P LDS 2 , P LDS 3 ∈ R, P PV nmax , P WT max , P ESS 1max , and P LDS nmax are positive.

B. BUS VOLTAGE REGULATION SCHEME
As can be observed by analyzing the resulting transfer functions in (17) and (18), the following inequalities must be satisfied to achieve open-loop stable behavior: Then, a unitary-gain feedback control loop is proposed to ensure stability for a wide range of P CPL n and P SAC values in both buses. To regulate the bus voltages, outer control loops are designed using proportional-integral compensators VOLUME 11, 2023 which are tuned using conventional techniques. The resulting control scheme for each DC bus is depicted in Fig. 4.

V. MULTI-MODE MASTER-SLAVE MICROGRID CONTROL A. FUNDAMENTALS OF THE PROPOSED CONTROL
The primary control level of the MG is modeled to ensure the power balance in capacitances C 1 and C 2 for Bus 1 and Bus 2, respectively. Then, at the secondary control level, the proposed master-slave control guarantees the proper operation of the MG in its multiple modes (MG-modes). The individual capabilities of the units are essential for the system as a whole. Therefore, a set of rules allows a power conversion unit that has the capability to regulate the bus voltage to be selected as a ''master.'' Once this is defined, the remaining power conversion units connected to the same bus operate as ''slaves.'' According to these rules, if a conversion unit operating as a ''master'' loses the regulation capability, one of the units operating as a ''slave'' replaces it and takes on the ''master'' role. To ensure proper operation of the master/slave strategy, it is necessary to have at least two units that can function as either master or slave. A common state machine defines the operational modes and the conditions required for transitioning between them. In addition, every unit has a local state machine that determines the required operation mode when the selected unit performs the master role.
The role of ''master'' in Bus 1 can be assumed by either the ILC, the ESS, or the PV units. Similarly, in Bus 2, the ''master'' role can be performed by either the IFC or the ILC. Note that under this consideration, PVG 2 cannot perform the master function and is limited to work at maximum power by design consideration. To obtain the needed control action for each bus, the currents of the ''master'' units are used as main variables. When a transition is enforced, the current reference given by the actual ''master'' is transferred to the new ''master'' using a smooth transition characterized by the logistic function. The amount of current required to keep the bus voltage regulated is computed by the outer regulation loops (PI controllers) via the control actions I comp n (s), as can be seen in the block diagram of Fig. 4.

B. LOGIC STATE-TRANSITION FUNCTION FOR MULTI-MODE OPERATION
The multi-mode operation of the studied MG is designed using a state-transition logic function. The five modes are briefly defined as follows.
• Grid-connected: in this mode, the MG is connected to the grid through the IFC and the AC load is supplied by the common connection point.
• Island: in this mode, the MG has no connection with any AC source, and the AC loads are supplied from the MG through the SAC unit.
• Poor quality grid: this mode is activated when the quality of the voltage provided by the grid is poor. In this mode, the MG is connected to the grid through the IFC but the AC loads are fed through the SAC ensuring a high quality voltage. • AC Generator: in this mode, the grid is usually absent, and the MG cannot cover the power consumption of the loads. The generator, the MG and the AC loads configure a power sharing node. Note that, unlike in grid-connected mode, the generator has a unidirectional power flow.
• Poor quality generator: in this mode, the generator cannot ensure the power quality threshold to feed AC loads, and they are, therefore, powered through the SAC.
As depicted in the state-flow diagram presented in Fig. 5, different events in the MG variables enforce the transition from one mode to another. For example, if the system is operating in ''grid-connected mode'', and the grid fails, then the MG will operate in ''island mode'' until the auxiliary generator starts and the MG can be connected to it. When the auxiliary generator is ready to be connected, if it can provide a voltage with acceptable quality (with adequate Total Harmonic Distortion (THD) and RMS voltage), the system will change to the ''AC generator mode''. Conversely, if the quality of the voltage of the generator is poor, the system will operate in ''poor quality generator mode''. The set of transitions to jump from one mode to another is defined by thresholds in the THD and the RMS values of the grid and generator voltages as they were summarized in Table 2. Note that the operation of the system following the proposed state-flow logic is independent of the method used to measure the THD. Depending on the mode in which the microgrid operates, the IFC and ILC converters perform the regulation task in one of the buses. In Fig. 5, M 1 represents that a unit is regulating the voltage of the bus 1 and similarly M 2 represents that a unit is regulating the voltage of the bus 2.
The reconfiguration of the MG is performed according to its operational modes, which is achieved changing the power units logic state-transition. For instance, the ESS unit can operate in four different modes: a) deactivated mode (OFF), b) charge regulation mode c) discharge regulation mode, and d) limited power charging mode. In deactivated mode, the unit can be disconnected for maintenance or wait in stand-alone operation to cover a subsequent energy shortage condition. In limited power charging mode, the control enforces either a constant power, a constant current, or a constant voltage regime, depending on the selected criteria. In discharging or charging regulation modes, the unit can provide a constant amount of power to regulate the voltage of the bus (master role). The state of charge (SOC) of the batteries defines the constraints to enforce transitions between the modes of the ESS (20% < SoC < 80%). These values are defined based on several criteria, including the type, age, and particular features of the battery [34]. Additionally, the output current 55340 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.   can be either positive or negative, particularly when ESS operates regulating the bus, which implies the freedom to change between charge and discharge regulation modes. The variable S.S.AC is used to synchronize the operational modes between microgrid and the units. The state-transition diagram for the ESS is depicted in Fig. 6.
Similarly, the PVG and WTG units (DER units) can operate in three modes: a) deactivated mode (OFF), b) maximum power point tracking (MPPT) mode, and c) limited power generation mode. The MPPT mode is preferable because it allows the system to leverage the maximum power produced by the DER. However, in some cases, the power demanded by the MG can be lower than the instantaneous production, thus forcing the system to limit its generation. If multiple units are integrated into the same bus, some can operate in OFF-mode, others in MPPT mode and others in limited power mode. The DER units' OFF-mode can be triggered by several conditions including failure or reconfiguration. The state-transition diagram for DER units is depicted in Fig. 7.

C. SMOOTH TRANSITIONS BETWEEN MASTER AND SLAVE ROLES
When a change between modes is enforced, i.e., the master role is transferred from one unit to another, the control must ensure a smooth transition of the control action between them. After evaluating the use of step-based and ramp-based transitions, the logistic function was selected for the advantageous smooth evolution of its derivative [35]. This function can be programmed using the following mathematical expression.
in which the main parameters are β 1 and β 2 , where β 1 is the logistic growth rate and β 2 is t is the midpoint of the logistic function. A graphical comparison is shown in Fig. 8, where a slope of 1 was used in the ramp transition and β 1 = 20 and β 2 = 1 were used in the logistic function. These parameters were selected in order to have a transition time of half a second, as shown in Fig. 8. The smooth transition is activated simultaneously in the acting master unit and the slave unit that will take the master role. Once the transition starts, a new transition cannot be ordered until the final values are achieved.
The diagram in Fig. 9 summarizes the proposed control structure detailing the hierarchical levels, the signal interaction between units and the required control loops.

VI. SIMULATIONS AND RESULTS
To validate the performance of the proposed control strategy, the MG model and proposed control structure were implemented in MATLAB/Simulink using the parameters listed in Table 3 and Table 4. The values of capacitances for bus 1 and bus 2 are computed assuming that a discharge event implies a time of 40 ms to reach a limit of 80% of the nominal voltage when a power load of 1 kW is connected to each bus. Compensators are synthesized using the   SISO Design Tool in MATLAB considering a time response without overshoot and a settling time of about 1 s. Validation is presented in three consecutive steps. First, the bus voltages' closed-loop dynamic performance is assessed. This first validation scenario considers two separate tests, which are load disturbances and transitions between modes when disturbances are present. Note that the latter is the worstcase scenario. After validating the correct operation of the inner elements of the proposed control, a per-day scenario is performed to assess the adequate operation of the entire system. 55342 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.   Table 5. Fig. 10 shows the regulation control loops response to the power disturbances, which are introduced by load transitions. The initial conditions are shown in Table 4. These initial conditions are chosen to start the power balance equal to zero. The applied stimulus can be listed as follows.
▶ T 0 : The MG starts from a self-compensated operation which implies that i comp1 = 0 A and i comp2 = 0 A. ▶ T 1 : The resistive load R 2 = 144 is connected which implies that i comp 1 = 0 A and i comp 2 = 1.66 A. ▶ T 2 : The constant current load I CCL 1 = 8.33A is connected which implies that i comp 1 = 8.33 A and i comp 2 = 3.33 A. ▶ T 3 : The constant current load I CCL 2 = 1.66 A is connected which implies that i comp 1 = 8.33 A and i comp 2 = 4.99 A. ▶ T 4 : The constant power load P CPL 2 = 400 W and the resistive load R 1 = 5.8 are simultaneously connected which implies that i comp 1 = 16.6 A and i comp 2 = 8.31 A. ▶ T 5 : The load P CPL 1 = 400 W is connected and the load R 2 = R 2 min is disconnected which implies that i comp 1 = 24.93 A and i comp 2 = 8.33 A. ▶ T 6 : The loads I CCL 1 ,I CCL 2 ,P CPL 2 ,R 1 ,P 2 are disconnected which implies that i comp 1 = 8.33 A and i comp 2 = 1.66 A. ▶ T 7 : The load R 2 = R 2 min is disconnected which implies that i comp 1 = 0 A and i comp 2 = 0 A, returning to the initial conditions.   10 illustrates that the proposed control regulates properly the bus voltages when disturbances are applied. Moreover, the response does not present overshoots and has a fast settling time.

2) RESPONSE TO TRANSITIONS BETWEEN MODES
To test the transient response of the proposed control, a transition from grid-connected mode to island mode is enforced.
Two experiments are considered in this test. The first one consists of a smooth transition between grid-connected mode and island mode without disturbances while the second one considers the presence of a power disturbance during the same transition previously described. Note that this is the worst-case scenario. In both experiments, Bus 1 starts with a resistive load of 400 W . Its ESS is operating in limited power charging mode demanding 100 W , and the ILC is ensuring the voltage regulation of the bus, i.e., the ILC is operating as the ''master''.
The results are provided in Fig. 11, where the blue lines present the controller performance without perturbations and the orange lines illustrate the controller performance under the presence of perturbations. When no perturbation is present it can be seen that during the first time interval (between 0 and 0.5 s), the initial conditions cause that the ILC introduces 500 W to balance the power of Bus 1 while that power is consequently extracted from Bus 2 (see Fig. 11 (a) between 0 and 0.5 s). At 0.5 s, the MG is disconnected from the grid, leading to the change from grid-connected mode to islanded mode. The ILC must, therefore, replace the IFC in executing the ''master'' role of regulating the voltage of Bus 2. In turn, this implies that the regulation of Bus 1 must be assumed by the ESS which operates as the new ''master''. As can be noted in Fig. 11 (a), the transition of the ILC from regulating Bus 1 by introducing 500 W to regulating Bus 2 by extracting 300 W from Bus 1 follows the logistic function defined in the previous section. Likewise, the resulting transition in the ESS from consuming a regulated power of 100 W to contributing 700 W follows the same behavior, see Fig. 11 (b). Additionally, it is observed in Fig. 11 (c) that the voltage of Bus 1 suffers a short transient deviation of around 1.2 V which is compensated during the transition interval (1 s). Fig. 11 (d) depicts the compensation current required to regulate the voltage of Bus 1, which is assumed firstly by the ILC and then by the ESS, showing a smooth change.
Similarly, when the load perturbation occurs, i.e., a sudden reduction of the power load in Bus 1 from 500 to 400 W during the transition, the proposed control structure achieves the same good performance (see the orange lines from Fig. 11). As expected both the ILC power transference and the ESS contribution follow the logistic function (see Fig. 11 (a) and Fig. 11 (b), respectively). Due to the load reduction, the ESS changes its power contribution from 100 to 600 W (see Fig. 11 (b)). Fig. 11 (c) shows that the load perturbation does not affect the voltage regulation, and Fig. 11 (d) depicts that the compensation current required to regulate the voltage of Bus 1 has a smooth change despite the presence of an additional disturbance during the transition.

B. ASSESSMENT OF THE OVERALL PERFORMANCE INTO A DAILY PROFILE
As mentioned in Section V-B, the studied MG in Fig. 9 can operate in five modes. The performance of the proposed control scheme is assessed in a complete daily operation, as shown in Fig. 12. In this figure, three main scenarios are analyzed in the following subsections. In the first one, the MG operates in grid-connected mode. The second one analyses the transition between operation modes; in the last one, the MG operates in island mode. In addition, it should be noted that different load disturbances and master-slave 55344 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.  transitions are conducted in each operation mode to illustrate the robustness of the system's operation.

1) GRID-CONNECTED OPERATION MODE
The grid-connected mode is illustrated in Fig. 12 from ▶ T 0 to ▶ T 2 . In this mode, the MG is supplied by the electrical grid; therefore, the ILC unit controls the voltage of Bus 1 (ELVDC bus), and the IFC regulates the voltage of Bus 2 (LVDC bus).
From ▶ T 0 to ▶ T 1 , it is observed that Bus 1 and Bus 2 voltages start perfectly regulated (see Fig. 12 (a) and Fig. 12 (b), respectively), and the SOC begins at 55% (see Fig. 12 (c)). During this time interval, Bus 1 is regulated by the ILC (see Fig. 12 (h)), and the ESS is charged due to the lack of loads. In ▶ T 1 , a set of loads is connected in both buses (see VOLUME 11, 2023 55345 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. Fig. 12 (e)) enforcing the need for power support from the grid. Thus, from ▶ T 1 to ▶ T 2 , the PI compensators maintain the regulation of the bus voltages using the compensation currents depicted in Fig. 12 (f) and Fig. 12 (g). The currents are provided by the ILC and the IFC, seen in Fig. 12 (h) and Fig. 12 (i), respectively.
When t = 8 h, PV power starts to be generated in both buses (see Fig. 12 (j)), which minimizes the power extracted from the grid and changes the direction of the power flows in the ILC and the IFC (see Fig. 12 (h) and Fig. 12 (i)), thus highlighting the system's bidirectional capability. Note that when more PV energy is generated, some part of the power starts to be injected into the grid. Moreover, at the same time, the ESS is still being charged by power delivered from the wind turbine and the PV system.

2) MULTI-MODE OPERATION
From ▶ T 2 to ▶ T 6 , the MG passes through different operation modes based on changes in the THD on the AC side or if the V rms Grid < V act . For instance, it is observed that during ▶ T 2 the wind and PV generation increase constantly (see Fig. 12 (d) and Fig. 12 (j)), charging the battery and injecting energy to the main grid. During this period several loads are connected to Bus 1 and later to Bus 2 (see Fig. 12 (e)). It is worth mentioning that in the worst-case scenario, the voltage spike produced by the connection of the loads is no longer than 1 V in both buses.
Moreover, during this period, the event defined by THD Grid < THD act causes the first transition to the AC-poor grid quality mode (see the state-transition diagram in Fig. 5). In this scenario, the SAC unit is activated (see Fig. 12 (k)), thus allowing the AC loads to be supplied and compensated for. Similarly, between ▶ T 4 and ▶ T 5 , the MG undergoes a second transition to the AC-generator mode (V rms Grid < V act ). When the diesel generator (DG) is turned on, the poor quality behavior on the AC side is solved. Therefore, the SAC unit is turned off (see Fig. 12 (k)). In this mode, however, the SAC can be activated again if the THD is below the permissible level. Finally, it should be noted that when the MG operates in normal mode, i.e., grid-connected mode, Bus 1 voltage is regulated by the ILC (M 1 ), and Bus 2 voltage is regulated by the IFC (M 2 ), while the other units become slaves.

3) ISLAND-MODE OPERATION
Conversely, in the island mode of the MG, i.e., when the AC subsystem is disconnected from the grid, the system is forced to change the master units regulating the bus voltages. Consequently, the other units automatically become slaves. Thus, in this operation mode defined between ▶ T 7 and ▶ T 8 , the ESS regulates the voltage of Bus 1 and the ILC regulates the voltage of Bus 2, as seen in Fig. 12 (l) and Fig. 12 (h), respectively.

VII. CONCLUSION
A flexible multi-mode master-slave approach has been developed in this paper to control a DC-coupled double-bus hybrid MG architecture. The fundamentals of the proposal are the existence of power conversion units that can operate as masters or slaves, thus fulfilling a regulation function on one side and a power transfer function on the other side. It was demonstrated that, in this approach, simple linear controllers can be employed to ensure the proper operation of the control structure. The proposed control scheme considers the tertiary and secondary levels of the hierarchical structure. The tertiary level provides the mode of operation using a mode-transition logic that follows the conventional operation of programmable automates. Simulated results validate the advantageous features of the proposed control showing a good dynamic performance during transitions between operation modes and ensuring stability under several different operating conditions.
The results show that the transition between operation modes is achieved in less than one second (as designed in the logistic function) where all the controlled variables reach steady-state values before one second. The proposed control permits some units to be used as masters whereas all others, including those that have yet to be added, operate as slaves, thus enhancing the MG's modularity and reconfigurability.
Nevertheless, as linear controllers are employed, it is not possible to include constraints on the controlled variables in the formulation. Therefore, using advanced control strategies, such as model predictive control is proposed as future research. Additionally, applying the proposed control scheme for hybrid AC/DC MGs should be examined along with its experimental validation.  In 2015, he joined with the Advanced Center for Electrical and Electronic Engineering (AC3E), Universidad Técnica Federico Santa María (UTFSM), Valparaíso, Chile, as a Postdoctoral Fellow. Later, in 2017, he was in charge of the energy area with AC3E, Technology Transfer Unit, developing and managing industrial projects related to the energy and electric power systems field. He is currently an Assistant Professor with the Engineering Sciences Department, Universidad Andrés Bello, where he is also the Director of the Energy Transformation Center. His research interests include the design and control of power converters for renewable energies, automotive power systems, and DC microgrids.