A Power Flow Control Strategy for Hybrid Control Architecture of DC Microgrid under Unreliable Grid Connection Considering Electricity Price Constraint

: This paper presents a power ﬂow control strategy for a hybrid control architecture of the DC microgrid (DCMG) system under an unreliable grid connection considering the constraint of electricity price. To overcome the limitation of the existing schemes, a hybrid control architecture which combines the centralized control and distributed control is applied to control DCMG. By using the hybrid control approach, a more optimal and reliable DCMG system can be constructed even though a fault occurs in the grid or a central controller (CC). The power ﬂow control strategy for the hybrid DCMG control architecture also takes the constraint of electricity price into account for the purpose of minimizing the electricity cost. In the proposed hybrid control, the high bandwidth communication (HBC) link is used in the centralized control to connect the CC with DCMG power agents. On the other hand, the low bandwidth communication (LBC) link is employed to constitute the distributed control. A small size of data is used to exchange the information fast between the agents and CC, or between each agent and its neighbors, which increases the reliability and robustness of the DCMG system in case of a fault in the communication link of the centralized control. A DCMG system with 400-V rated DC-link voltage which consists of a wind power agent, a battery agent, a grid agent, a load agent, and a CC is constructed in this study by using three power converters based on 32-bit ﬂoating point digital signal processor (DSP) TMS320F28335 controller. Various simulation and experimental results prove that the proposed scheme improves the system stability and robustness even in the presence of a fault in the communication link of the centralized control. In addition, the proposed scheme is capable of maintaining the DC-link voltage stably at the nominal value without severe transients both in the centralized control and distributed control, as well as both in the grid-connected case and islanded case. Finally, the scalability of the DCMG system is tested by adding and removing additional wind power agent and battery agent during a certain period.


Introduction
Environmental concern and economic factors make microgrid (MG) research more intense lately. In general, an MG is a small power system which integrates loads, sources, and storage devices in an electric network by connecting them through power electronic converters [1]. MGs are supplemented by the distributed generation (DG) power from renewable energy sources such as photovoltaic (PV), wind turbine, and hydroelectric. The output from renewable energy sources often fluctuates from time to time as the renewable energy is highly dependent on natural conditions. To overcome this power fluctuation, an energy storage system (ESS) is usually added into the MG system [2]. In addition to the (i) A power flow control strategy for a hybrid DCMG control architecture is proposed by combining the centralized control and distributed control. The proposed hybrid DCMG control scheme stably maintains the DC-link voltage at the nominal value with high reliability and robustness against the communication link fault and the absence of utility grid. (ii) The proposed hybrid power flow control provides a stable and smooth DCMG operation during the transition between the distributed control and the centralized control, which overcomes the limitations such as the common single point of failure in the centralized control as well as the limitations related with the lack of information exchange in the decentralized control. (iii) The proposed scheme can be implemented by the exchange of only a small size of data through the HBC and LBC links, which reduces communication burden and helps the DCMG system reach the optimum solution. (iv) This study also focuses on minimizing the electricity cost on the consumer side by introducing a power flow control for a hybrid DCMG system with the consideration of electricity price constraint.
This paper is organized as follows: Section 2 describes the configuration of DCMG and each power agent. Section 3 describes the proposed hybrid DCMG architecture and power flow control strategy under various conditions. Sections 4 and 5 present the simulation and experimental results. Finally, Section 6 concludes the paper. Figure 1 shows the configuration of the DCMG system considered in this study. The DCMG system consists of four agents, which are the grid agent, battery agent, wind power agent, and load agent. The grid agent and battery agent can export or import the power from the DC-link, while the wind power agent only provides the power to the DC-link and the load agent only absorbs the power from the DC-link. In this figure, P G , P B , P W , and P L denote the power from or into the grid agent, the power from or into the battery agent, the power from the wind power agent, and the power into the load agent, respectively. Figure 1 also shows the current direction of each power agent. For convenience, the reference direction of all the currents are taken as out of the DC-link. In order to connect the main grid source to the DCMG system, a transformer and a bidirectional AC-to-DC converter are employed. To supply the power from the wind turbine into the DCMG system, a permanent magnet synchronous generator (PMSG) and a unidirectional AC-to-DC converter are used. A battery is connected with a bidirectional DC-to-DC converter to exchange the power with the DCMG. In the load agent, load shedding or reconnection is achieved through electronic switches.

Configuration of DCMG System
Sustainability 2020, 12, x FOR PEER REVIEW 4 of 28 stably maintains the DC-link voltage at the nominal value with high reliability and robustness against the communication link fault and the absence of utility grid. (ii) The proposed hybrid power flow control provides a stable and smooth DCMG operation during the transition between the distributed control and the centralized control, which overcomes the limitations such as the common single point of failure in the centralized control as well as the limitations related with the lack of information exchange in the decentralized control. (iii) The proposed scheme can be implemented by the exchange of only a small size of data through the HBC and LBC links, which reduces communication burden and helps the DCMG system reach the optimum solution. (iv) This study also focuses on minimizing the electricity cost on the consumer side by introducing a power flow control for a hybrid DCMG system with the consideration of electricity price constraint.
This paper is organized as follows: Section 2 describes the configuration of DCMG and each power agent. Section 3 describes the proposed hybrid DCMG architecture and power flow control strategy under various conditions. Sections 4 and 5 present the simulation and experimental results. Finally, Section 6 concludes the paper. Figure 1 shows the configuration of the DCMG system considered in this study. The DCMG system consists of four agents, which are the grid agent, battery agent, wind power agent, and load agent. The grid agent and battery agent can export or import the power from the DC-link, while the wind power agent only provides the power to the DC-link and the load agent only absorbs the power from the DC-link. In this figure, PG, PB, PW, and PL denote the power from or into the grid agent, the power from or into the battery agent, the power from the wind power agent, and the power into the load agent, respectively. Figure 1 also shows the current direction of each power agent. For convenience, the reference direction of all the currents are taken as out of the DC-link. In order to connect the main grid source to the DCMG system, a transformer and a bidirectional AC-to-DC converter are employed. To supply the power from the wind turbine into the DCMG system, a permanent magnet synchronous generator (PMSG) and a unidirectional AC-to-DC converter are used. A battery is connected with a bidirectional DC-to-DC converter to exchange the power with the DCMG. In the load agent, load shedding or reconnection is achieved through electronic switches.  Figure 2 shows the configuration of the grid agent. In order to damp the harmonic currents caused by the main grid source, an inductive-capacitive-inductive (LCL) filter is placed between the grid transformer and AC-to-DC converter. The parameters R1, R2, L1, L2, and Cf represent the filter   Figure 2 shows the configuration of the grid agent. In order to damp the harmonic currents caused by the main grid source, an inductive-capacitive-inductive (LCL) filter is placed between the grid transformer and AC-to-DC converter. The parameters R 1 , R 2 , L 1 , L 2 , and C f represent the filter resistances, filter inductances, and filter capacitance, respectively. The inverter-side current and grid-side current are denoted as i 1 and i 2 , respectively. To regulate the currents in bidirectional way, an integral state feedback current controller with a full state observer is employed based on only the measurements of the grid currents and grid voltages [30]. The detailed control design process and observer implementation for the integral state feedback current controller in the grid-connected inverter is presented in [30][31][32].

Grid Agent
Sustainability 2020, 12, x FOR PEER REVIEW  5 of 28 resistances, filter inductances, and filter capacitance, respectively. The inverter-side current and gridside current are denoted as i1 and i2, respectively. To regulate the currents in bidirectional way, an integral state feedback current controller with a full state observer is employed based on only the measurements of the grid currents and grid voltages [30]. The detailed control design process and observer implementation for the integral state feedback current controller in the grid-connected inverter is presented in [30][31][32]. The grid agent has three operating modes in the DCMG system, which are VDC control converter (CON) mode, VDC control inverter (INV) mode, and IDLE mode. The grid agent operates as VDC control CON mode when the wind power cannot supply the load demand, or the wind power cannot supply both the load demand and battery power in the charging mode of battery. In this operating mode, the grid agent maintains the DC-link voltage at the nominal value by injecting the required power from the grid to the DCMG. The second operating mode, namely, VDC control INV mode is used when the wind power is sufficient to supply the load demand. The grid agent also operates in this operating mode when the wind power can supply both the load demand and the maximum charging power of the battery (PB,Max,chr). In VDC control INV mode, the grid agent absorbs the surplus power from DCMG to inject it to the main grid, while regulating the DC-link voltage at the nominal value. The grid agent operates in IDLE mode instead of VDC control CON mode when the CC operates under the condition of high electricity price. In IDLE mode, the grid agent avoids the use of additional power from the grid to reduce utility cost.
When the grid agent regulates the DC-link voltage both in VDC control CON mode and VDC control INV mode, the grid agent implements two cascaded control loops as shown in Figure 2. In the outer control loop, the DC-link voltage controller is designed by using the proportional-integral (PI) controller to generate the current reference. Otherwise, the current reference is also generated as zero according to the operating modes of the grid agent. The inner control loop is designed to control the grid-side currents by using the integral state feedback control and full state observer. The full state observer estimates the system states from the system model and the measurement of the grid currents and grid voltages in the synchronous reference frame (SRF). The voltage references from the inner control loop are applied through the space vector pulse width modulation (PWM) modulation  The grid agent has three operating modes in the DCMG system, which are V DC control converter (CON) mode, V DC control inverter (INV) mode, and IDLE mode. The grid agent operates as V DC control CON mode when the wind power cannot supply the load demand, or the wind power cannot supply both the load demand and battery power in the charging mode of battery. In this operating mode, the grid agent maintains the DC-link voltage at the nominal value by injecting the required power from the grid to the DCMG. The second operating mode, namely, V DC control INV mode is used when the wind power is sufficient to supply the load demand. The grid agent also operates in this operating mode when the wind power can supply both the load demand and the maximum charging power of the battery (P B,Max,chr ). In V DC control INV mode, the grid agent absorbs the surplus power from DCMG to inject it to the main grid, while regulating the DC-link voltage at the nominal value. The grid agent operates in IDLE mode instead of V DC control CON mode when the CC operates under the condition of high electricity price. In IDLE mode, the grid agent avoids the use of additional power from the grid to reduce utility cost.
When the grid agent regulates the DC-link voltage both in V DC control CON mode and V DC control INV mode, the grid agent implements two cascaded control loops as shown in Figure 2. In the outer control loop, the DC-link voltage controller is designed by using the proportional-integral (PI) controller to generate the current reference. Otherwise, the current reference is also generated as zero Sustainability 2020, 12, 7628 6 of 28 according to the operating modes of the grid agent. The inner control loop is designed to control the grid-side currents by using the integral state feedback control and full state observer. The full state observer estimates the system states from the system model and the measurement of the grid currents and grid voltages in the synchronous reference frame (SRF). The voltage references from the inner control loop are applied through the space vector pulse width modulation (PWM) modulation to generate the converter drive signals. Figure 3 shows the configuration of the battery agent. The battery is connected to the DCMG system with an inductive (L) filter and interleaved bidirectional DC-to-DC converter for the purpose of reducing current ripples. The battery agent has four operating modes which are V DC control by charging, V DC control by discharging, charge with the maximum allowable current (I B,Max ), and IDLE mode. The battery agent operates in V DC control mode by charging if a fault occurs in the grid, and the wind power generation P W is higher than load demand P L . This operating mode is also chosen when the battery SOC is lower than the minimum SOC level, SOC min , and P W is lower than P L . Under the condition that P W is lower than P L , and the grid agent cannot operate in V DC control CON mode, the battery agent operates in V DC control mode by discharging. When the battery SOC is less than the maximum SOC level (SOC max ) and the grid agent is connected to the DCMG, the battery operates in charge with I B,Max . This operating mode increases the battery SOC as fast as possible. The battery agent operates with IDLE mode when the battery SOC is greater than SOC max and other power agents operate with V DC control mode. This operating mode maintains the battery SOC level without exchanging the power with the DCMG.

Battery Agent
Sustainability 2020, 12, x FOR PEER REVIEW 6 of 28 Figure 3 shows the configuration of the battery agent. The battery is connected to the DCMG system with an inductive (L) filter and interleaved bidirectional DC-to-DC converter for the purpose of reducing current ripples. The battery agent has four operating modes which are VDC control by charging, VDC control by discharging, charge with the maximum allowable current (IB,Max), and IDLE mode. The battery agent operates in VDC control mode by charging if a fault occurs in the grid, and the wind power generation PW is higher than load demand PL. This operating mode is also chosen when the battery SOC is lower than the minimum SOC level, SOCmin, and PW is lower than PL. Under the condition that PW is lower than PL, and the grid agent cannot operate in VDC control CON mode, the battery agent operates in VDC control mode by discharging. When the battery SOC is less than the maximum SOC level (SOCmax) and the grid agent is connected to the DCMG, the battery operates in charge with IB,Max. This operating mode increases the battery SOC as fast as possible. The battery agent operates with IDLE mode when the battery SOC is greater than SOCmax and other power agents operate with VDC control mode. This operating mode maintains the battery SOC level without exchanging the power with the DCMG. To implement the power flow control, the battery agent uses two PI controllers in the outer control loop and inner control loop. Similar to the grid agent, the outer control loop regulates the DClink voltage stably and produces the current reference of the battery agent. The inner control loop controls the battery charging/discharging currents in a bidirectional way. In addition to the battery current reference, the inner control loop uses the information on the battery current feedback, the battery SOC, and the operating modes of the battery agent. If the battery agent operates in VDC control mode by charging or discharging, the battery current reference is determined from the outer PI control loop for the DC-link voltage regulation. The battery current reference is selected as IB,Max when the battery agent operates in charge with IB,Max. Otherwise, the battery current reference is set to zero for IDLE mode operation of the battery agent. Figure 4 shows the configuration of the wind power agent. An L filter is interfaced between the PMSG and unidirectional AC-to-DC converter, and the output of AC-to-DC converter is connected To implement the power flow control, the battery agent uses two PI controllers in the outer control loop and inner control loop. Similar to the grid agent, the outer control loop regulates the DC-link voltage stably and produces the current reference of the battery agent. The inner control loop controls the battery charging/discharging currents in a bidirectional way. In addition to the battery current reference, the inner control loop uses the information on the battery current feedback, the battery SOC, and the operating modes of the battery agent. If the battery agent operates in V DC control mode by charging or discharging, the battery current reference is determined from the outer PI control loop for the DC-link voltage regulation. The battery current reference is selected as I B,Max when the battery agent operates in charge with I B,Max . Otherwise, the battery current reference is set to zero for IDLE mode operation of the battery agent. Figure 4 shows the configuration of the wind power agent. An L filter is interfaced between the PMSG and unidirectional AC-to-DC converter, and the output of AC-to-DC converter is connected to the DC-link. The wind power agent has two operating modes which are the maximum power point tracking (MPPT) mode and V DC control mode. The MPPT mode in which the wind power agent operates mostly aims to draw the maximum power from the wind turbine. On the other hand, when the wind power is higher than the load demand and other power agents cannot absorb the surplus power from the wind power, the wind power agent initiates V DC control mode to maintain the DC-link voltage of DCMG reliably. The V DC control mode is implemented by two cascaded control loops, i.e., the outer loop PI controller for the DC-link voltage regulation and inner loop synchronous PI decoupling current controller. The MPPT mode is implemented by the MPPT algorithm, PI speed controller, and inner current control loop.

Wind Power Agent
Sustainability 2020, 12, x FOR PEER REVIEW 7 of 28 the wind power is higher than the load demand and other power agents cannot absorb the surplus power from the wind power, the wind power agent initiates VDC control mode to maintain the DClink voltage of DCMG reliably. The VDC control mode is implemented by two cascaded control loops, i.e., the outer loop PI controller for the DC-link voltage regulation and inner loop synchronous PI decoupling current controller. The MPPT mode is implemented by the MPPT algorithm, PI speed controller, and inner current control loop.  Figure 5 shows the configuration of the load agent. In a critical situation, the load agent can shed unnecessary load to prevent the DCMG from collapsing. After the termination of a critical situation, the load agent may reconnect the shedded load through the load reconnection algorithm. The load shedding algorithm is activated when all the agents cannot provide the demanded power of load. In this condition, the load agent disconnects load one by one from the least important load. This process lasts until the system power balance of DCMG is ensured by supplying the necessary load demand at some point. When the grid is reconnected to DCMG or the battery has a sufficient SOC level, the load reconnection algorithm is initiated to reconnect the shedded load [16].   Figure 5 shows the configuration of the load agent. In a critical situation, the load agent can shed unnecessary load to prevent the DCMG from collapsing. After the termination of a critical situation, the load agent may reconnect the shedded load through the load reconnection algorithm. The load shedding algorithm is activated when all the agents cannot provide the demanded power of load. In this condition, the load agent disconnects load one by one from the least important load. This process lasts until the system power balance of DCMG is ensured by supplying the necessary load demand at some point. When the grid is reconnected to DCMG or the battery has a sufficient SOC level, the load reconnection algorithm is initiated to reconnect the shedded load [16]. the load agent may reconnect the shedded load through the load reconnection algorithm. The load shedding algorithm is activated when all the agents cannot provide the demanded power of load. In this condition, the load agent disconnects load one by one from the least important load. This process lasts until the system power balance of DCMG is ensured by supplying the necessary load demand at some point. When the grid is reconnected to DCMG or the battery has a sufficient SOC level, the load reconnection algorithm is initiated to reconnect the shedded load [16].  Figure 6 shows the concept of a hybrid control architecture in the DCMG system. In the hybrid control architecture, the centralized and distributed control schemes are combined. In this figure, the blue dashed line represents an HBC link for the centralized control architecture, while the black solid line represents an LBC link for the distributed control architecture. The exchange of information between the CC and power agents in the centralized control architecture is achieved through the HBC link. On the contrary, all the power agents exchange the information with adjacent neighbors in the distributed control architecture by using one-bit binary data format through the LBC link. In the centralized control of DCMG, the CC collects the information from all the power agents, processes the acquired data, and determines the operating modes of all the power agents to achieve a global optimum solution of the DCMG system. On the other hand, the distributed control of DCMG aims to improve the system reliability and robustness against a fault in the communication link.

Hybrid DCMG Architecture
Sustainability 2020, 12, x FOR PEER REVIEW 8 of 28 Figure 6 shows the concept of a hybrid control architecture in the DCMG system. In the hybrid control architecture, the centralized and distributed control schemes are combined. In this figure, the blue dashed line represents an HBC link for the centralized control architecture, while the black solid line represents an LBC link for the distributed control architecture. The exchange of information between the CC and power agents in the centralized control architecture is achieved through the HBC link. On the contrary, all the power agents exchange the information with adjacent neighbors in the distributed control architecture by using one-bit binary data format through the LBC link. In the centralized control of DCMG, the CC collects the information from all the power agents, processes the acquired data, and determines the operating modes of all the power agents to achieve a global optimum solution of the DCMG system. On the other hand, the distributed control of DCMG aims to improve the system reliability and robustness against a fault in the communication link. In this study, the control mode transition between the centralized control and distributed control is determined based on the availability of the CC. Figure 7 describes the control mode transition in the hybrid DCMG architecture. During the normal condition without the CC fault, the CC operates the entire DCMG system by the centralized control architecture. Once a fault occurs in the CC, the distributed control takes control to operate the DCMG system. In this study, the control mode transition between the centralized control and distributed control is determined based on the availability of the CC. Figure 7 describes the control mode transition in the hybrid DCMG architecture. During the normal condition without the CC fault, the CC operates the entire DCMG system by the centralized control architecture. Once a fault occurs in the CC, the distributed control takes control to operate the DCMG system. In this study, the control mode transition between the centralized control and distributed control is determined based on the availability of the CC. Figure 7 describes the control mode transition in the hybrid DCMG architecture. During the normal condition without the CC fault, the CC operates the entire DCMG system by the centralized control architecture. Once a fault occurs in the CC, the distributed control takes control to operate the DCMG system.  In the centralized control mode, the data is exchanged between the CC and all power agents. All the power agents send specific data to the CC through the HBC link. At the same time, the CC also investigates the electricity price condition from the external sources like the internet. Based on the acquired information, the CC makes the best decision for the operating mode of all agents. Finally, the CC sends data which contains the agent operating mode along with a control signal (CS) to all the agents. Each power agent uses the CS value to determine the operation by the centralized control mode (CS signal is high) or distributed control mode (CS signal is low). When the CS signal is high, all the agents obviously use the operating mode given by the CC. On the other hand, when the CS signal is low, all the agents determine the operating modes based on the agent internal data and received information through the LBC link. In the distributed control mode, all the agents send specific data in a one-bit binary format to the adjacent neighbors. In this scheme, the data transfer by the HBC and LBC methods is accomplished every control period.

Power Flow Control Strategy
The power flow control strategy in the hybrid DCMG architecture is autonomously and reliably determined under both the centralized control and distributed control by using the relationship of supply-demand power. To determine the operating modes of power agents, several conditions and key parameters such as the availability of the CC and grid agent, battery SOC level, generated power from the wind power agent, and electricity price are primarily considered. In the proposed hybrid DCMG control scheme, the distributed control mode is composed of ten operating modes as the power flow control strategy. In the centralized control mode, an additional operating mode is added for the power flow control to consider explicitly the constraint of electricity price. Figure 8 shows the power flow control strategy in the distributed control mode. The detailed operating modes of each power agent for power flow control are listed in Table 1. from the wind power agent, and electricity price are primarily considered. In the proposed hybrid DCMG control scheme, the distributed control mode is composed of ten operating modes as the power flow control strategy. In the centralized control mode, an additional operating mode is added for the power flow control to consider explicitly the constraint of electricity price. Figure 8 shows the power flow control strategy in the distributed control mode. The detailed operating modes of each power agent for power flow control are listed in Table 1.   The power flow control strategy of DCMG in the distributed control mode is explained as follows.
• Operating mode 1: This operating mode occurs when the generated wind power P W is higher than the required load power demand P L and the battery SOC is higher than SOC max under a fault in the grid agent. Because P W cannot be absorbed by other agents, the operating mode of the wind power agent is changed into V DC control mode while the battery agent is in IDLE mode.

•
Operating mode 2: This operating mode is selected when the generated wind power P W is higher than the required load demand P L , and the battery is not fully charged (SOC < SOC max ) under the grid fault. This operating mode also requires an additional condition that P W is less than the sum of load demand P L and the maximum charging power of battery P B,Max,chr . In this case, the wind power agent operates with the MPPT mode and the battery agent operates with the V DC control mode by charging to regulate the DC-link voltage.

•
Operating mode 3: This operating mode is used when the grid agent is normal, the generated wind power P W is higher than the required load demand P L , and the battery has been fully charged. In this case, the grid agent operates in V DC control INV mode to absorb the surplus power from the wind power agent which operates in the MPPT mode, while the battery agent operates in IDLE mode.

•
Operating mode 4: This operating mode requires the conditions that the grid agent is normal and the generated wind power P W is higher than the required load demand P L . Additional conditions to select this operating mode are the battery SOC is less than SOC max , and P W is less than the sum of load demand P L and the maximum charging power of battery P B,Max,chr . In this mode, the wind power agent operates in the MPPT mode, the battery agent charges the battery with the maximum current I B,Max , and the grid agent provides the insufficient power from the grid by operating in V DC control CON mode.

•
Operating mode 5: This operating mode requires the conditions that the generated wind power P W is less than the required load demand P L and the battery SOC is less than SOC max without a fault in the grid agent. The wind power agent draws the maximum power by operating in the MPPT mode, the battery agent charges the battery with the maximum current I B,Max , and the grid agent provides the insufficient power from the grid by operating in V DC control CON mode. • Operating mode 6: Operating mode 6 follows the same flow with the operating mode 5. The only difference is that this mode is used with the condition of SOC > SOC max . In this operating mode, while both the wind power agent and grid agent maintain their operations with the same as in the operating mode 5, the battery agent changes its operation into IDLE mode. • Operating mode 7: When the generated wind power P W is less than the required load demand P L and the battery SOC is higher than SOC min under a fault in the grid agent, the operating mode 7 is chosen. In this mode, the wind power agent operates in the MPPT mode and the battery agent regulates the DC-link voltage by operating in V DC control by discharging.

•
Operating mode 8: Operating mode 8 follows the same flow with the operating mode 7. The only difference is that this mode is used with the condition of SOC < SOC min . When the DCMG system operates in operating mode 7 for a long period, the battery SOC is gradually decreased and reaches the threshold level of SOC min . In this case, the battery agent can not supply the power any more.
To avoid the DCMG system collapse under this critical condition, the load shedding algorithm is activated by the load agent. The load agent removes less important loads, the battery agent is in IDLE mode, and the wind power agent changes its operating mode into V DC control mode to regulate the DC-link voltage. • Operating mode 9: Operating mode 9 is selected by following the same flow with the operating mode 4. The difference is that this mode is determined when the generated wind power P W is greater than the sum of load demand P L and the maximum charging power of battery P B,Max,chr . In this mode, the wind power agent still operates in the MPPT mode, the battery agent charges the battery with the maximum current I B,Max . However, contrary to operating mode 4, the grid agent provides excessive power into the grid by operating in V DC control INV mode. • Operating mode 10: Operating mode 10 follows the same flow with the operating mode 2. The only difference is that this mode is chosen with the condition of P W > P L + P B,Max,chr . In this condition, the generated wind power P W is higher than the required load demand P L , and the battery is not fully charged (SOC < SOC max ) under the grid fault. In addition, since P W can supply additional charging power of battery, the battery agent charges the battery with the maximum current I B,Max , and the wind power agent changes its operating mode into V DC control mode to regulate the DC-link voltage. Figure 9 shows the power flow control strategy in the centralized control mode. The detailed operating modes of each power agent for power flow control are listed in Table 2. In the centralized control, all the operating modes are the same as those of the distributed control except for the operating mode 11. The study in [33] shows that 40% of the world wide energy usage comes from the energy consumption in building area. As the number of building is increased, many researchers have been interested in the optimization of energy savings by considering electricity price [21][22][23][24][25][26]. The research in [34] reports that an effective algorithm on EMS can reduce electricity price with the average of 23.1%. Another study in [10] shows that the use of EMS in the centralized control mode leads to cheaper electricity price than in the distributed control mode. Generally, the electricity cost saving is influenced by many factors such as the load profile, distributed power generation, pricing method, optimization algorithm, and total usage of grid power during high electricity cost condition. In spite of such a difficulty, a particular study in [35] shows the electricity cost saving up to 28% by restraining the electricity injection from the grid during high electricity cost period.    For the purpose of minimizing the customer electricity cost in the DCMG system, the electricity price constraint is also considered in this work. In the proposed scheme, the DCMG system avoids the power supplied from the grid during periods of high electricity price, absorbing the least power only in the critical condition to prevent the system from collapsing. In the presented power flow control strategy, contrary to the distributed control, there is additional operating mode 3 (denoted by *1) in the centralized control mode by considering the constraint of electricity price. As shown in the left part of Figure 9 for the case P W > P L , the high electricity price condition in the centralized control changes the DCMG operation from operating mode 4 to operating mode 3. Whereas the operating mode 4 is selected for the DCMG operation in the normal electricity price condition, the DCMG system changes its operation into the operating mode 3 under high electricity price condition to avoid additional cost. Instead of operating converter mode to supply the power from the grid, the grid agent operates in inverter mode in operating mode 3 to avoid the power supply from the grid.
Based on the constraint of electricity price, the operating mode 11 is considered for the DCMG operation. The first condition to choose the operating mode 11 follows the same flow with the operating mode 6. The utility condition having high electricity price divides the DCMG operation into the operating mode 6 and operating mode 11. Instead of operating converter mode to supply the power from the grid, the grid agent operates in IDLE mode to avoid the use of power from the grid. The second condition to choose the operating mode 11 follows the same flow with the operating mode 5. Because of high electricity price condition, the DCMG selects the operating mode 11 rather than operating mode 5 to operate the grid agent in IDLE mode instead of converter mode. Similarly, there is additional operating mode 6 (denoted by *2) by considering the constraint of electricity price as shown in Figure 9 for the case P W < P L . In spite of high electricity price, the grid agent supplies the power into the DCMG as converter mode only when the battery has an extremely low SOC level in this additional operating mode 6 (denoted by *2).

Simulation Results
To verify the effectiveness of the power flow strategy in the proposed hybrid DCMG control scheme under the CC fault, unreliable grid connection, and uncertainty of electricity price, the simulation has been done using the PSIM software. Table 3 lists the system parameters used for simulation. Simulations are carried out for four cases which are low battery SOC case, safe regional battery SOC case, high battery SOC case, and high electricity price case. In addition to that, the DCMG system scalability is tested by adding and removing additional power agents during a certain period. In the simulations for three different battery SOC cases, the grid has a fault from t = 0.5 s to t = 1.5 s. It is also assumed that the CC fault occurs from t = 0 to t = 0.25 s, from t = 0.75 s to t = 1.25 s, and from t = 1.75 s to t = 2s. Initially, the generated wind power P W is less than the required load demand P L until t = 1 s. After that, P W is increased and greater than P L until t = 2 s. In these simulations, the battery agent current, the grid agent current, the wind power agent current, and the load agent current are represented as I B , I G , I W , and I L with the reference direction as in Figure 1, in which the positive current denotes the current into the agent out of the DC-link and the negative current denotes the current from the agent into the DC-link. Figure 10 shows the simulation results of the power flow strategy in the proposed hybrid DCMG control scheme for the case of low battery SOC level. Initially, the battery SOC is less than SOC min and all the agents start the control operation at t = 0.05 s. Since the generated wind power P W is less than the load demand P L and the battery SOC is very small without a grid fault, the DCMG system initially starts the operation with the operating mode 5, which lasts until a fault occurs in the grid at t = 0.5 s. Figure 10 shows the simulation results of the power flow strategy in the proposed hybrid DCMG control scheme for the case of low battery SOC level. Initially, the battery SOC is less than SOCmin and all the agents start the control operation at t = 0.05 s. Since the generated wind power PW is less than the load demand PL and the battery SOC is very small without a grid fault, the DCMG system initially starts the operation with the operating mode 5, which lasts until a fault occurs in the grid at t = 0.5 s. From this instant, the DCMG operation is changed into the operating mode 8 because both the wind power agent and battery agent cannot provide the required load demand PL. In this case, the load shedding algorithm is activated by the load agent to remove less important load while the battery agent changes the operation into IDLE mode, and the wind power agent is changed into VDC control mode to regulate the DC-link voltage.

Case of Low Battery SOC
When PW is increased higher than PL at t = 1 s, the DCMG changes its operation into the operating mode 2. In this mode, the wind power agent operates in the MPPT mode, and the battery agent regulates the DC-link voltage by operating with the VDC control mode by charging. Because the From this instant, the DCMG operation is changed into the operating mode 8 because both the wind power agent and battery agent cannot provide the required load demand P L . In this case, the load shedding algorithm is activated by the load agent to remove less important load while the battery agent changes the operation into IDLE mode, and the wind power agent is changed into V DC control mode to regulate the DC-link voltage.
When P W is increased higher than P L at t = 1 s, the DCMG changes its operation into the operating mode 2. In this mode, the wind power agent operates in the MPPT mode, and the battery agent regulates the DC-link voltage by operating with the V DC control mode by charging. Because the battery SOC level is still lower than SOC min , the load reconnection algorithm cannot be activated by the load agent.
As the grid is recovered from fault at t = 1.5 s, the DCMG operation is changed into the operating mode 4 and the load reconnection is activated by the load agent at the same time. Consequently, the wind power agent maintains its operation in the MPPT mode, the battery agent charges the battery with the maximum current I B,Max , and the grid agent supplies the inadequate power by operating in V DC control CON mode.
As stated earlier, it is assumed that the CC has a fault from t = 0 to t = 0.25 s, from t = 0.75 s to t = 1.25 s, and from t = 1.75 s to t = 2s in this simulation. During the CC fault, the distributed control scheme takes the role to operate the DCMG. As shown in this result, in spite of the transition between the distributed control mode and centralized control mode, all the agents operate stably within the DCMG system without severe transient, which validates that the proposed scheme contributes to improve the system reliability and robustness against a fault in the communication link of the centralized control. Figure 11 shows the simulation results of the power flow strategy in the proposed hybrid DCMG control scheme for the case of safe regional SOC level between SOC min and SOC max . Similarly, all the agents start the operation at t = 0.05 s and the DCMG initially starts with the operating mode 5. This simulation test considers two cases of P W . Figure 11a represents the case for P W < P L + P B,Max,chr , and Figure 11b represents the case for P W > P L + P B,Max,chr . Figure 11 shows the simulation results of the power flow strategy in the proposed hybrid DCMG control scheme for the case of safe regional SOC level between SOCmin and SOCmax. Similarly, all the agents start the operation at t = 0.05 s and the DCMG initially starts with the operating mode 5. This simulation test considers two cases of PW. Figure 11a represents the case for PW < PL + PB,Max,chr, and Figure 11b represents the case for PW > PL + PB,Max,chr. As soon as a fault occurs in the grid at t = 0.5 s, the DCMG system operation is changed into the operating mode 7 in both cases. In this mode, the wind power agent still operates in the MPPT mode and the battery agent changes its operating mode to VDC control by discharging to regulate the DClink voltage.

Case of Safe Regional Battery SOC
As the generated wind power PW is increased at t = 1 s, the DCMG operation shows different behavior in Figure 11a,b. Under the condition of PW < PL + PB,Max,chr, the operating mode 2 is used before the grid is recovered. In this mode, the wind power agent operates in the MPPT mode and the excessive power from PW is absorbed by the battery agent which operates in VDC control mode by charging. On the other hand, under the condition of PW > PL + PB,Max,chr, the operating mode 10 is used, in which the battery agent charges the battery with the maximum current IB,Max and the wind power agent regulates the DC-link voltage by operating in VDC control mode.
When the grid is recovered t = 1.5 s, the DCMG operation is changed into the operating mode 4 in Figure 11a, and the operating mode 9 in Figure 11b. In the operating mode 4, the wind power agent maintains its operating mode, the battery agent still charges the battery with the maximum current IB,Max, and the grid agent operates in VDC control CON mode to provide the deficient power in Figure  11a. In the operating mode 9, the wind power agent operates in the MPPT mode, the battery agent Figure 11. Simulation results for the case of safe regional battery SOC level: (a) Case of P W > P L and P W < P L + P B,Max,chr ; (b) Case of P W > P L and P W > P B,Max,chr .
As soon as a fault occurs in the grid at t = 0.5 s, the DCMG system operation is changed into the operating mode 7 in both cases. In this mode, the wind power agent still operates in the MPPT mode and the battery agent changes its operating mode to V DC control by discharging to regulate the DC-link voltage.
As the generated wind power P W is increased at t = 1 s, the DCMG operation shows different behavior in Figure 11a,b. Under the condition of P W < P L + P B,Max,chr , the operating mode 2 is used before the grid is recovered. In this mode, the wind power agent operates in the MPPT mode and the excessive power from P W is absorbed by the battery agent which operates in V DC control mode by charging. On the other hand, under the condition of P W > P L + P B,Max,chr , the operating mode 10 is used, in which the battery agent charges the battery with the maximum current I B,Max and the wind power agent regulates the DC-link voltage by operating in V DC control mode.
When the grid is recovered t = 1.5 s, the DCMG operation is changed into the operating mode 4 in Figure 11a, and the operating mode 9 in Figure 11b. In the operating mode 4, the wind power agent maintains its operating mode, the battery agent still charges the battery with the maximum current I B,Max , and the grid agent operates in V DC control CON mode to provide the deficient power in Figure 11a. In the operating mode 9, the wind power agent operates in the MPPT mode, the battery agent maintains its operating mode, the grid agent regulates the DC-link voltage by operating in V DC control INV mode.
A smooth and reliable transition between the centralized control and distributed control caused by the CC fault is also confirmed from this simulation without affecting the overall performance. Figure 12 shows the simulation results of the proposed hybrid DCMG control scheme for the case of high battery SOC level. Because the battery has been fully charged from the beginning, the DCMG starts with the operating mode 6 and all the agents start the control t = 0.05 s. In the operating mode 6, the wind power agent operates in the MPPT mode, the battery agent is in IDLE mode, and the grid agent operates in V DC control CON mode to regulate the DC-link voltage.  In the presence of the grid fault at t = 0.5 s, while the wind power agent remains in the MPPT mode, the battery agent changes its operation into VDC control by discharging to regulate the DC-link voltage, which realizes the operating mode 7. As the generated wind power PW is increased higher than PL at t = 1 s and the battery agent is still fully charged, the wind power agent executes VDC control to regulate the DC-link voltage.

Case of High Battery SOC
As the grid is recovered from fault at t = 1.5 s, the surplus wind power can be injected into the grid by the grid agent. At this instant, the DCMG system is controlled by the operating mode 3, in which the wind power agent changes the operation into the MPPT mode, the battery agent is still in IDLE mode, and the grid agent uses VDC control INV mode to control the DC-link voltage.
It is also evident in this simulation that the transition between the centralized control and distributed control in a hybrid DCMG structure is very smooth and stable even in the presence of a sudden fault in the CC. Figure 13 shows the simulation results with the constraint of high electricity price with the assumption that the CC has the information on the time-varying price of utility. This simulation test considers two cases of PW. Figure 13a represents the case for PW > PL, and Figure 13b represents the In the presence of the grid fault at t = 0.5 s, while the wind power agent remains in the MPPT mode, the battery agent changes its operation into V DC control by discharging to regulate the DC-link voltage, which realizes the operating mode 7. As the generated wind power P W is increased higher than P L at t = 1 s and the battery agent is still fully charged, the wind power agent executes V DC control to regulate the DC-link voltage.

Case of Electricity Price Constraint
As the grid is recovered from fault at t = 1.5 s, the surplus wind power can be injected into the grid by the grid agent. At this instant, the DCMG system is controlled by the operating mode 3, in which the wind power agent changes the operation into the MPPT mode, the battery agent is still in IDLE mode, and the grid agent uses V DC control INV mode to control the DC-link voltage.
It is also evident in this simulation that the transition between the centralized control and distributed control in a hybrid DCMG structure is very smooth and stable even in the presence of a sudden fault in the CC. Figure 13 shows the simulation results with the constraint of high electricity price with the assumption that the CC has the information on the time-varying price of utility. This simulation test considers two cases of P W . Figure 13a represents the case for P W > P L , and Figure 13b represents the case for P W < P L . Similar to the previous cases, all agents start the operation at t = 0.05 s in both cases. When the generated wind power PW has the condition of PW > PL + PB,Max,chr, the DCMG starts the operation with the operating mode 4, in which the grid agent operates in VDC control CON mode. However, as soon as the distributed control is changed into the centralized control as a result of the recovery of the CC fault at t = 0.25 s, the DCMG operation is changed into the operating mode 3 as shown in Figure 13a. In the operating mode 3 of the centralized control, the battery agent changes the operation into IDLE mode to avoid the use of additional power from the grid, and the surplus power from PW is injected into the grid by operating in VDC control INV mode. If the fault occurs in the CC at t = 0.75 s, the DCMG system operation is returned to the previous operation.

Case of Electricity Price Constraint
With the condition of PW < PL, the DCMG starts with the operating mode 6, in which the battery When the generated wind power P W has the condition of P W > P L + P B,Max,chr , the DCMG starts the operation with the operating mode 4, in which the grid agent operates in V DC control CON mode. However, as soon as the distributed control is changed into the centralized control as a result of the recovery of the CC fault at t = 0.25 s, the DCMG operation is changed into the operating mode 3 as shown in Figure 13a. In the operating mode 3 of the centralized control, the battery agent changes the operation into IDLE mode to avoid the use of additional power from the grid, and the surplus power from P W is injected into the grid by operating in V DC control INV mode. If the fault occurs in the CC at t = 0.75 s, the DCMG system operation is returned to the previous operation.
With the condition of P W < P L , the DCMG starts with the operating mode 6, in which the battery agent is in IDLE mode and the grid agent operates in V DC control CON mode. As soon as the distributed control is changed into the centralized control as a result of the recovery of the CC fault at t = 0.25 s, the DCMG operation is changed into the operating mode 11 as shown in Figure 13b. As a result, the grid agent stops the converter mode operation to avoid the use of power from the grid. Instead, the deficient power in the DCMG is supplied by battery with V DC control mode by discharging. Similarly, the DCMG system operation is returned to the previous operation in case of the CC fault.

Scalability Test
The scalability of DCMG has been one of the important issues in DCMG structure. The scalability test is performed in this study based on the method in [7] by including an additional converter to the DCMG system at steady-state. Figure 14 shows the simulation result of the proposed scheme for the scalability test. In this simulation, the second battery agent is added at t = 0.3 s, and removed at t = 0.9 s. The second wind power agent is added at t = 0.4 s, and removed at t = 0.7 s. The second wind turbine operates in the MPPT mode and the second battery agent operates in charge with I B,Max mode. In addition to that, a fault occurs in the grid at t = 0.5 s, which forces the DCMG system to operate in the islanded mode. It is confirmed from this simulation that the DCMG can still maintain the DC-link voltage at the nominal value stably in spite of the addition as well as the removal of additional power agents even under the grid-connected and islanded cases.
Sustainability 2020, 12, x FOR PEER REVIEW 19 of 28 a result, the grid agent stops the converter mode operation to avoid the use of power from the grid. Instead, the deficient power in the DCMG is supplied by battery with VDC control mode by discharging. Similarly, the DCMG system operation is returned to the previous operation in case of the CC fault.

Scalability Test
The scalability of DCMG has been one of the important issues in DCMG structure. The scalability test is performed in this study based on the method in [7] by including an additional converter to the DCMG system at steady-state. Figure 14 shows the simulation result of the proposed scheme for the scalability test. In this simulation, the second battery agent is added at t = 0.3 s, and removed at t = 0.9 s. The second wind power agent is added at t = 0.4 s, and removed at t = 0.7 s. The second wind turbine operates in the MPPT mode and the second battery agent operates in charge with IB,Max mode. In addition to that, a fault occurs in the grid at t = 0.5 s, which forces the DCMG system to operate in the islanded mode. It is confirmed from this simulation that the DCMG can still maintain the DC-link voltage at the nominal value stably in spite of the addition as well as the removal of additional power agents even under the grid-connected and islanded cases. In all the simulation tests, the maximum deviation of the DC-link voltage from the nominal value of 400V is measured as 1.5325% in Figure 10, Figure 11a,b, Figure 12, and Figure 13b. In Figures 13a  and 14, it is 1.6275% and 1.5225%, respectively. The maximum deviation of the DC-link voltage from the nominal value is quite unnoticeable.

Experimental Results
In order to verify the effectiveness of the power flow strategy in the proposed hybrid DCMG architecture, the experiments were conducted by using a laboratory DCMG testbed system. Figure  15 shows the configuration of the experimental DCMG system. The entire system consists of a dc load and three power converters to connect the main grid source, lithium-ion battery, and wind turbine emulator to the DC-link. The wind turbine emulator is constructed by a PMSG and an induction In all the simulation tests, the maximum deviation of the DC-link voltage from the nominal value of 400 V is measured as 1.5325% in Figures 10-13b. In Figures 13a and 14, it is 1.6275% and 1.5225%, respectively. The maximum deviation of the DC-link voltage from the nominal value is quite unnoticeable.

Experimental Results
In order to verify the effectiveness of the power flow strategy in the proposed hybrid DCMG architecture, the experiments were conducted by using a laboratory DCMG testbed system. Figure 15 shows the configuration of the experimental DCMG system. The entire system consists of a dc load and three power converters to connect the main grid source, lithium-ion battery, and wind turbine emulator to the DC-link. The wind turbine emulator is constructed by a PMSG and an induction machine drive system. DC load is composed of two 800 Ω resistors in parallel connection, and the magnetic contactor works as a switch to shed and reconnect the load. A 32-bit floating-point digital signal processor (DSP) TMS320F28335 controller is employed to implement the proposed power flow control strategy as well as to control the power converters in each agent.  Figure 16 shows the experimental results of the power flow strategy in the proposed hybrid DCMG control scheme when the battery SOC level is lower than SOCmin and the grid fault occurs. Figure 16a shows the operating mode transition from 5 to 8 caused by the grid fault. Figure 16b,c show the steady-state responses at the operating mode 5 and 8, respectively. Initially, PW is less than PL and the battery SOC level is lower than SOCmin. In the operating mode 5, the wind power agent is in the MPPT mode, the battery agent is in charge with IB,Max, and the grid agent is in VDC control CON mode for the purpose of providing the insufficient power from the grid by regulating the DC-link voltage. When a fault occurs in the grid, it is impossible for the battery agent to supply the required power to the load agent, which makes the operating mode transition from 5 to 8. As a consequence, the load agent sheds unnecessary load, the battery agent is in IDLE, and the wind power agent is in VDC control mode to maintain VDC at the nominal value. The activation of load shedding algorithm by the load agent causes 15 ms of time delay due to the coil in the magnetic contactor as is seen in Figure  16a. A small delay (3 ms) is also caused by the data transfer and observed in the experimental results. However, as can be shown in the transient response in Figure 16a, the operating mode transition is quite smooth and the DC-link voltage regulation is very stable. The steady-state responses in Figure  16b,c also validate a reliable operation of the DCMG system.  Figure 16 shows the experimental results of the power flow strategy in the proposed hybrid DCMG control scheme when the battery SOC level is lower than SOC min and the grid fault occurs. Figure 16a shows the operating mode transition from 5 to 8 caused by the grid fault. Figure 16b,c show the steady-state responses at the operating mode 5 and 8, respectively. Initially, P W is less than P L and the battery SOC level is lower than SOC min . In the operating mode 5, the wind power agent is in the MPPT mode, the battery agent is in charge with I B,Max , and the grid agent is in V DC control CON mode for the purpose of providing the insufficient power from the grid by regulating the DC-link voltage. When a fault occurs in the grid, it is impossible for the battery agent to supply the required power to the load agent, which makes the operating mode transition from 5 to 8. As a consequence, the load agent sheds unnecessary load, the battery agent is in IDLE, and the wind power agent is in V DC control mode to maintain V DC at the nominal value. The activation of load shedding algorithm by the load agent causes 15 ms of time delay due to the coil in the magnetic contactor as is seen in Figure 16a. A small delay (3 ms) is also caused by the data transfer and observed in the experimental results. However, as can be shown in the transient response in Figure 16a, the operating mode transition is quite smooth and the DC-link voltage regulation is very stable. The steady-state responses in Figure 16b,c also validate a reliable operation of the DCMG system. VDC control mode to maintain VDC at the nominal value. The activation of load shedding algorithm by the load agent causes 15 ms of time delay due to the coil in the magnetic contactor as is seen in Figure  16a. A small delay (3 ms) is also caused by the data transfer and observed in the experimental results. However, as can be shown in the transient response in Figure 16a, the operating mode transition is quite smooth and the DC-link voltage regulation is very stable. The steady-state responses in Figure  16b,c also validate a reliable operation of the DCMG system.  Figure 17 shows the experimental result of the power flow strategy in the proposed hybrid DCMG control scheme for the case of safe regional SOC level. Initially, the generated wind power PW is less than the load demand PL, and the battery SOC level in the middle of SOCmin and SOCmax. Without the grid fault, the DCMG starts the operation with the operating mode 5. In this mode, the  Figure 17 shows the experimental result of the power flow strategy in the proposed hybrid DCMG control scheme for the case of safe regional SOC level. Initially, the generated wind power P W is less than the load demand P L , and the battery SOC level in the middle of SOC min and SOC max . Without the grid fault, the DCMG starts the operation with the operating mode 5. In this mode, the wind power agent is in the MPPT mode, the battery agent is in charge with I B,Max , and the grid agent is in V DC control CON mode. When a fault occurs in the grid, the DCMG changes the operation into the operating mode 7. Figure 17a shows the operating mode transition from 5 to 7 caused by the grid fault. Figure 17b,c show the steady-state responses at the operating mode 5 and 7, respectively. As a result of the operating mode transition into 7, the battery agent executes V DC control mode by discharging to provide the load remand. These waveforms also confirm a smooth operating mode transition and stable operation of the proposed hybrid DCMG control scheme. Figure 18 shows the experimental result of the proposed hybrid DCMG control scheme for the case of high battery SOC level. Initially, the generated wind power P W is less than the load demand P L , the battery SOC is higher than SOC max , and the grid is in the normal condition, which results in the operating mode 6. In this mode, the wind power agent is in the MPPT mode, the battery agent is in IDLE mode, and the grid agent is in V DC control CON mode. As soon as a fault occurs in the grid, the DCMG operation is changed into the operating mode 7. Figure 18a shows the operating mode transition from 6 to 7 caused by the grid fault. Figure 18b,c show the steady-state responses at the operating mode 6 and 7, respectively. As soon as the operating mode is changed, the battery agent takes the role to regulate the DC-link voltage by operating in the V DC control mode by discharging. Similarly, the usefulness of the proposed hybrid DCMG control scheme can be observed. Figure 19 shows the experimental results of the proposed hybrid DCMG control scheme with the constraint of high electricity price. With the condition that the generated wind power P W is less than the load demand P L , and the battery is fully charged without the grid fault, the DCMG starts with the operating mode 6 at first. If the CC detects high electricity price condition at this instant, the grid agent operation is changed from V DC control CON mode into the IDLE mode to avoid the increase of utility cost. Instead, the battery is discharged to compensate the deficient power in the DCMG system while regulating the DC-link voltage with V DC control mode by discharging. In this case, the resultant DCMG operation is the operating mode 11. Obviously, if the electricity price is returned to the normal condition, the operation of the DCMG system is also restored into the operating mode 6. Figure 19a shows the experimental result of the DCMG operating mode transition when the CC detects high electricity price condition. Figure 19b  in IDLE mode, and the grid agent is in VDC control CON mode. As soon as a fault occurs in the grid, the DCMG operation is changed into the operating mode 7. Figure 18a shows the operating mode transition from 6 to 7 caused by the grid fault. Figure 18b,c show the steady-state responses at the operating mode 6 and 7, respectively. As soon as the operating mode is changed, the battery agent takes the role to regulate the DC-link voltage by operating in the VDC control mode by discharging. Similarly, the usefulness of the proposed hybrid DCMG control scheme can be observed.  Figure 19 shows the experimental results of the proposed hybrid DCMG control scheme with the constraint of high electricity price. With the condition that the generated wind power PW is less than the load demand PL, and the battery is fully charged without the grid fault, the DCMG starts with the operating mode 6 at first. If the CC detects high electricity price condition at this instant, the case, the resultant DCMG operation is the operating mode 11. Obviously, if the electricity price is returned to the normal condition, the operation of the DCMG system is also restored into the operating mode 6. Figure 19a shows the experimental result of the DCMG operating mode transition when the CC detects high electricity price condition. Figure 19b,c show the steady-state responses at the operating mode 6 and 11, respectively.

Conclusions
This paper has presented an effective power flow control strategy for a hybrid control architecture of DCMG under an unreliable grid connection considering the constraint of electricity price. To overcome the limitation of the existing coordination control architectures, a hybrid control method which combines the centralized control and distributed control is applied to control DCMG.

Conclusions
This paper has presented an effective power flow control strategy for a hybrid control architecture of DCMG under an unreliable grid connection considering the constraint of electricity price. To overcome the limitation of the existing coordination control architectures, a hybrid control method which combines the centralized control and distributed control is applied to control DCMG. By using the hybrid control approach, a more optimal and reliable DCMG system can be constructed even though a fault occurs in the grid or the CC. The power flow control strategy is developed for the hybrid DCMG control architecture by taking the constraint of electricity price into account. In the proposed architecture, the HBC link is used in the centralized control to connect the CC with DCMG power agents. Based on the information from all the agents, the CC determines the operating modes of all the agents. On the contrary, the LBC link is employed to constitute the distributed control. To reduce the communication burden, only one-bit binary data is used to exchange the information between the agents via the LBC link. Main contributions of this paper can be summarized as follows: (i) A power flow control strategy for a hybrid DCMG control scheme which combines the centralized control and distributed control is proposed. The proposed scheme improves the system stability and robustness even in the presence of a fault in the communication link of the centralized control. All the power agents operate stably within the DCMG system without severe transients in spite of the transition between the distributed control and the centralized control. The DC-link voltage can be also regulated stably with the proposed scheme in both the centralized control and distributed control even during transition periods. (ii) By using the proposed scheme, the common single point of failure as in the centralized control can be avoided. Even when the distributed control takes control of the DCMG system because of a fault in the CC, the DCMG system stably works. Furthermore, the problems related to the lack of information exchange as in the decentralized control can be solved by means of a communication network. (iii) The proposed scheme proves that the hybrid DCMG control scheme can be implemented by the exchange of only a small size of data through the HBC and LBC links to exchange the information with reduced communication burden. (iv) In the proposed hybrid DCMG control scheme, the constraint of electricity price is also considered to develop the power flow control with the aim to minimize the consumer electricity cost.
To verify the practical usefulness of the power flow control strategy of the proposed hybrid control architecture, a prototype DCMG system has been constructed by using 32-bit floating-point DSP TMS320F28335 controller. The DCMG consists of bidirectional AC-to-DC converter to connect the grid source, unidirectional AC-to-DC converter to connect the wind turbine emulator, and bidirectional DC-to-DC converter to connect the lithium-ion battery. Comprehensive simulation and experimental results have been presented to prove the effectiveness of the proposed power flow control strategy of the hybrid control architecture, which well confirms the stable operation and overall performance of the proposed scheme.