**1. Introduction**

In recent years, renewable energy sources (RESs) such as wind and solar are attracting a grea<sup>t</sup> deal of attention due to the scarcity of fossil energy and environmental issues [1]. For the purpose of integrating various RESs into the utility grid (UG), distributed generations (DGs), which are the main parts of microgrids (MGs), have been considered and developed [2]. Due to the advantages of easy resource integration, flexible installation location, and reliable operation, DG-based MGs have become a future trend in constructing electric power systems [3]. Energy storage systems (ESSs) are usually integrated with MG in order to improve the reliability of system operation by reducing the e ffect of the intermittent nature of RESs [4].

According to the types of bus voltage, MGs can be classified into DC microgrids (DCMGs), AC microgrids (ACMGs), and hybrid AC/DC microgrids [5]. In comparison with other configurations, the control of DCMG is simpler, since the system power balance can be guaranteed only by regulating the DC-link voltage (DCV) to its nominal value without consideration of reactive power, current harmonics, frequency stability, and phase imbalance [6,7].

Regarding the communication perspective, the DCMG control method can be mainly divided into three categories: decentralized control [8–10], distributed control [11,12], and centralized control [6,13,14]. In decentralized control, DC-bus signaling (DBS) is well known as a simple and effective autonomous

power control method [9]. In the DBS approach, the DCV is used as an indicator to determine the operating mode of system units according to predefined voltage thresholds. Even though the DBS method has the advantage of simplicity of control, its performance depends significantly on the selection of appropriate voltage thresholds. If the difference between two voltage thresholds is too large, the DCV begins to fluctuate. In contrast, if the selected difference is too small, the determination of operating modes is strongly affected by sensor inaccuracies, which may lead to unnecessary and frequent mode switching [15]. In Ref [10], a communication-free method is proposed to manage the power in the system. In this study, the power managemen<sup>t</sup> strategy is based on the fixed setpoints of the DCV and the active power outputs. Generally, the decentralized control has the performance limitations of the entire system control, since each system unit lacks information about the others. In order to overcome this weakness, the distributed control, which constructs a simple communication network to share the information among neighboring system units, has been considered and developed [11]. Because only neighboring units are connected, a consensus algorithm is required in this method to obtain global information. In spite of the advantages of distributed control, it still has the limitations, such as the effect of measurement errors and the complexity of analytical performance analyses for the convergence speed of the consensus algorithm [12,15]. Unlike the above two methods, in the centralized control approach, a central controller (CC) is formed to collect the necessary data from local controllers (LCs), which then sends optimal decisions back to LCs to control power exchanges and to guarantee the system's stability under various conditions [5]. By implementing CC, other concerns in DCMG, such as the cost minimization [13] and adaptive protection [14], can also be realized easily.

Recently, many power flow control strategies (PFCSs) based on the centralized control approach have been presented for the purpose of ensuring the system power balance under various conditions [16–19]. In Ref [16], an improved voltage control strategy for a DCMG composed of photovoltaic and hybrid ESSs, such as batteries and supercapacitors, is proposed to stabilize the DCV. In this scheme, the entire system operation is divided into four states with individual control modes considering the photovoltaic generation power, load demand, and battery state of charge (*SOC*). In Ref [17], a PFCS based on the peak load demand durations in UG, and the optimal usage of RES is studied. However, in this work, the maximum charging and discharging power limit of the battery are not taken into account, which may a ffect the power control strategy in some cases. For instance, in case of power shortage, it is probable that the DCMG would request the discharging power from battery, exceeding the maximum capability. Similarly, the required charging power to the battery may be greater than the maximum absorbed capability in power surplus situations. In both cases, maintaining the power balance in DCMG by a battery is not possible due to the power limit. To deal with this issue, the maximum charging and discharging currents of the battery are considered in the design of PFCS under the grid-connected mode in Ref [18]. In Ref [19,20], to avoid the system collapse in case of power shortage, an appropriate load shedding (LS) is implemented to disconnect less important loads. On the other hand, to prevent the DC-link from overvoltage in case of power surplus, another approach halts the RESs conversion system [9] or uses the voltage control mode (VCM) [16,21]. In practice, it is necessary to reconnect some disconnected loads as the entire system becomes stable after the LS action [22]. Even though a load reconnection (LR) is considered in Ref [23,24], a reliable sequence of reconnection is neither completely analyzed nor presented in these studies.

In the centralized control approach, the UG is a main source to guarantee the system power balance in the grid-connected mode. When a fault in the UG is detected by a fault detection device, the fault signal is sent to the CC by a communication line. Then, the CC changes the system operation into the islanded mode and assigns other units such as battery or wind power generation systems (WPGS) to maintain the system power balance. In practice, however, the CC cannot instantly change the system operation into the islanded mode due to the delay caused by fault clearance time, data transmission time, and the processing time of CC. Consequently, any source or power converter does not take on the role of temporarily regulating the DCV, resulting in a power system imbalance. To address this problem, much research focusing on grid fault detection schemes has been carried out for the purpose of reducing the time delay [25,26]. However, detecting the grid fault accurately and rapidly is still a challenging issue [27].

This paper presents an e ffective PFCS and a reliable DCV restoration algorithm for DCMG under grid fault conditions. The e ffective PFCS is achieved based on the centralized control method for DCMG, which consists of a UG connection system, a WPGS, a battery-based ESS, and DC loads. The power flow in DCMG can be autonomously and reliably controlled under both the grid-connected and islanded conditions by using the relationship of supply-demand power and battery status. By implementing the constant current-constant voltage (CC-CV) method for the battery charging operation with the consideration of the battery power limit, the overheating or damage caused by undesirable overcharging/overdischarging is avoided, which expands the battery life significantly. This paper also develops an e ffective LS algorithm considering the *SOC* and the maximum capability of the battery to maintain the system power balance, even in the critical cases. Beside LS, an LR algorithm is also implemented for the purpose of reconnecting the loads which are initially disconnected due to power shortage in DCMG. In both the LS and LR algorithms, a time delay is applied to avoid undesirable load disconnections or reconnections caused by noise. In order to deal with the system power imbalance caused by the delay of grid fault detection, the DCV restoration algorithm is proposed in this paper. In the proposed DCV restoration algorithm, a local emergency control mode (LECM) is introduced to restore the DCV quickly to a nominal value. The LECM, which is achieved by LCs either with the battery-based ESS or the WPGS, operates regardless of the control signals from the CC under critical conditions for the purpose of ensuring the system power balance. To validate the effectiveness of the PFCS including LS and LR, as well as the proposed DCV restoration algorithm, both simulations based on the PSIM software and experiments based on prototype laboratory DCMG testbed are carried out.

This paper is organized as follows: Section 2 describes the configuration of DCMG. The details of the PFCS and system control methods of DCMG are discussed in Section 3. Section 4 presents the proposed DCV restoration algorithm. The simulation and experimental results are shown in Sections 5 and 6, respectively. Section 7 presents the discussion. Finally, Section 8 concludes the paper.

#### **2. System Configuration of DCMG**

Figure 1 shows the configuration of a DCMG which consists of four main units, namely, WPGS, battery-based ESS, UG connection system, and DC loads, where *PG* is output power of UG connection system, *PB* is battery power, *P W* is output power of WPGS, and *PL* is load power. In the WPGS, a permanent magne<sup>t</sup> synchronous generator (PMSG) is employed to convert the wind turbine mechanical output power into electrical power. The PMSG is widely used in WPGS because it has a simple structure, high e fficiency, and a wide operating range. The output power of the PMSG is injected into the DC-link through a unidirectional AC/DC converter. Due to the fluctuation of wind power, battery-based ESS is normally coordinated with WPGS in DCMG to stabilize the DCV and system power flow. To interface the battery-based ESS, an interleaved bidirectional DC/DC converter, which exchanges the power between the battery and DC-link, is employed. By using the interleaved bidirectional converter, the output current ripples are notably reduced. As a result, this improves the charging performance and extends the battery life [28]. For the purpose of interacting DCMG with UG in the grid-connected mode, a UG connection system, including a transformer and a bidirectional AC/DC converter, is constructed. The UG connection system not only maintains a supply-demand power balance of the DCMG, but also injects high quality current into UG depending on the DCMG operation modes. In the system configuration, a CC determines all the operating modes of the DCMG units. A power converter equipped with LC is implemented to operate each DCMG unit according to the control mode assigned from the CC. Load managemen<sup>t</sup> is also achieved by the CC to accomplish the LS and LR algorithms.

**Figure 1.** Configuration of DCMG.

#### **3. Power Flow Control Strategy and System Control of DCMG**

#### *3.1. Power Flow Control Strategy*

Figure 2 shows the PFCS of DCMG in this study. Based on the correlation of wind power and load demand, UG status, and battery status, thirteen operating modes of DCMG are determined to ensure the system power balance under various conditions. The control and operation of DCMG units according to each operating mode are described in Table 1 in detail. The control mode with an asterisk in the power converter indicates that this converter is in charge of the DCV regulation and system power balance. Symbols in Figure 2 and Table 1 are defined as follows: *SOCmax* is the maximum battery state of charge; *SOCmin* is the minimum battery state of charge; *Ireq B*,*cha* is the required battery charging current; *Ireq B*,*dis* is the required battery discharging current; *Imax B*,*cha* is the maximum battery charging current; *Imax B*,*dis* is the maximum battery discharging current; *VB* is the battery voltage; *Vmax B* is the maximum battery voltage; REC denotes rectifier mode; INV denotes inverter mode; DIS denotes disconnected mode in case of UG fault; IDLE denotes idle mode; BVCM denotes battery voltage control mode; BCCM denotes battery current control mode; DCVM-D denotes DCV control mode by battery discharging; DCVM-C denotes DCV control mode by battery charging; SHED denotes LS mode; NC/RECO denotes no change/LR mode; MPPT denotes maximum power point tracking mode.

**Figure 2.** PFCS of DCMG.


**Table 1.** Detailed description of thirteen operating modes in PFCS.

The entire control and operation of DCMG units corresponding to the thirteen operating modes are explained as follows.

Operating mode 1: The WPGS is operated in the MPPT mode to inject the maximum power from the wind turbine into the DC-link. In this mode, however, the injected power to the DC-link is not sufficient to supply the load demand (*PW* < *PL*). In this case, the power deficit is compensated by the UG via REC mode operation of AC/DC bidirectional converter. All loads are fed in this operating mode. The battery is controlled in BCCM with the charging current of *C*/10, where *C* denotes the rated capacity of battery [29]. This charging current level is selected to prevent the battery from overheating and damage.

Operating mode 2: Similar to operating mode 1, the WPGS is operated in the MPPT mode. Because wind power is still not sufficient to supply the load, the DCV is regulated by the UG through AC/DC bidirectional converter with REC mode operation. The only difference from operating mode 1 is that the battery is operated in BVCM in order to avoid the battery damage caused by overvoltage since the battery voltage is greater than its maximum value of *Vmax B* . All loads are fed in this operating mode.

Operating mode 3: The battery *SOC* reaches its maximum value of *SOCmax*. To prevent the battery from overcharging, the battery operation is switched into IDLE mode. The WPGS is still operated in the MPPT mode and the entire power balance is maintained by the UG. All loads are fed in this operating mode.

Operating mode 4: When a grid fault occurs, the UG is disconnected from DCMG. This mode corresponds to the islanded operating mode of the DCMG. Since the battery *SOC* is higher than the minimum value of *SOCmin* and the required battery discharging current is below the allowable maximum limitation (*Ireq B*,*dis* ≤ *Imax <sup>B</sup>*,*dis*), the battery starts the discharging in DCVM-D mode to regulate the DCV. The WPGS works in the MPPT mode and all loads are fed.

Operating mode 5: This operating mode occurs when the required battery discharging current exceeds its maximum rating (*Ireq B*,*dis* > *Imax <sup>B</sup>*,*dis*) or the battery *SOC* is lower than the minimum level (*SOC* < *SOCmin*). In order to prevent the battery from overdischarging, in case of *Ireq B*,*dis* > *Imax B*,*dis*, the battery is discharged with the maximum discharging current, which is achieved by a current limiter in DCVM-D mode. In the latter condition, the battery operation is switched into IDLE mode. In both cases, the battery is not able to regulate the DCV any longer. To avoid system collapse under this critical condition, the LS is activated to disconnect some less important loads. After the LS is completed, there are three possible cases that may happen next as seen from Figure 2. If *Ireq B*,*dis* becomes smaller than *Imax B*,*dis* after the LS, the system operation is returned to operating mode 4, in which the battery undertakes the task of the DCV control again by means of DCVM-D mode. In another situation, if the remaining load demand becomes lower than the power extracted from the WPGS, and the required battery charging current *Ireq B*,*cha* is smaller than *Imax B*,*cha*, the system operation is switched into operating

9

mode 10, in which the battery regulates the DCV by DCVM-C mode. Otherwise, the system operation is switched to operating mode 12, in which the WPGS starts to control the DCV by VCM in case that the required battery charging current *Ireq B*,*cha* is greater than *Imax B*,*cha*. From the above analysis, it is worth mentioning that operating mode 5 only works as a transient mode. After the LS is accomplished at this mode, the system operation is changed to other operating modes, in which the DCV is continuously regulated by the battery or WPGS.

Operating mode 6: This operating mode corresponds to the system operation when the wind power is higher than load demand. If the available power on the DC-link is large enough and the system is stable, the disconnected load in operating mode 5 can be reconnected by using LR algorithm. Since the battery *SOC* is smaller than the maximum value of *SOCmax*, and the battery voltage and required charging current are less than their predefined rating ( *VB* < *Vmax B* and *Ireq B*,*cha* ≤ *Imax <sup>B</sup>*,*cha*), the battery has a capability to regulate the DCV by using DCVM-C mode. Since the UG is available in this case, the UG may control the DCV through INV mode. However, by considering the unpredictable fault of the UG as well as the variation of wind power, the battery operation with DCVM-C is chosen by priority, which ensures that the battery power can be maintained as high as possible to deal with later critical conditions. As a result, the UG connection system enters IDLE mode, which indicates the UG does not participate in the power exchange of system.

Operating mode 7: Similar to operating mode 6, the wind power is higher than load demand without the UG fault. However, the battery voltage reaches the maximum value of *Vmax B* . To protect the battery from overvoltage, the battery is charged with BVCM mode, absorbing a portion of the surplus power. The remaining surplus power is absorbed by the UG through INV mode of the bidirectional AC/DC converter.

Operating mode 8: In this mode, the wind power is higher than the load demand without the UG fault. In addition, the required charging current is higher than the maximum rating (*Ireq B*,*cha* > *Imax <sup>B</sup>*,*cha*). In this case, the battery is controlled by charging it with the maximum charging current of *Imax B*,*cha*. Similar to operating mode 7, the UG takes charge of the DCV regulation through INV mode of bidirectional AC/DC converter.

Operating mode 9: As the battery *SOC* reaches the maximum value of *SOCmax*, the battery operation is changed into IDLE mode to prevent the battery from overcharging. The UG conducts the role of the DCV regulation by INV mode.

Operating mode 10: This mode corresponds to the islanded operation due to grid fault. In this condition, the battery *SOC* is smaller than the maximum *SOCmax*, also the required charging current and the battery voltage are still less than their maximum rating ( *VB* < *Vmax B* and *Ireq B*,*cha* ≤ *Imax <sup>B</sup>*,*cha*). In this case, the battery can e ffectively regulate the DCV in DCVM-C mode by absorbing surplus power.

Operating mode 11: As the battery voltage reaches the maximum value of *Vmax B* , the battery operation is changed from DCVM-C to BVCM to avoid battery overvoltage. As a result, the authority to control the DCV is released to the power converter of WPGS. For this purpose, the WPGS changes the control mode into VCM in which the DCV is maintained at the nominal value by limiting the injected power from wind to DC-link.

Operating mode 12: This operating mode is the same as the operating mode 8 except for the UG fault. The required battery charging current is higher than the maximum rating (*Ireq B*,*cha* > *Imax <sup>B</sup>*,*cha*) due to the continuous increase in wind power. As a result, the battery is incapable of regulating the DCV. In this case, BCCM is applied to charge the battery with the maximum charging current and the DCV is kept stable by the WPGS with VCM.

Operating mode 13: When the battery *SOC* reaches the maximum value of *SOCmax*, the battery operation is changed into IDLE mode same with operating mode 9 to avoid overcharging. The WPGS is still in charge of the DCV regulation with VCM.

#### *3.2. Control Scheme of Gird-Connected Converter*

Figure 3 shows the control loops of the bidirectional AC/DC converter (converter 1) used for the UG connection, where *VDC* is the DCV, *Id* and *Iq* are currents in the synchronous reference frame (SRF), and superscript '*ref*' denotes the reference quantity. As seen in Figure 3, the DCV is controlled by an outer loop proportional-integral (PI) controller either in REC or in INV mode. The outer loop DCV controller generates a positive reference current in INV mode, and a negative one in REC mode. The limiters are located after the PI controllers to avoid high undesirable reference currents. A decoupling current controller in the SRF is used for the inner current control loop to ensure zero steady-state tracking error [10,30]. The obtained reference voltages are applied by a space vector modulation (SVM). The IDLE and DIS modes are easily implemented by switching off the connection switch between the UG and DCMG.

**Figure 3.** Control loops of converter 1 used for UG connection.

#### *3.3. Control Scheme of Wind Power Converter*

As described in Section 3.1, the WPGS is operated in two operating modes, namely, the MPPT and VCM modes. The MPPT mode is employed to maximize the power extracted from wind while the VCM mode is employed to regulate the DCV in DCMG. Figure 4 shows two control loops of unidirectional AC/DC converter (converter 2) for the WPGS.

**Figure 4.** Control loops of converter 2 for WPGS.

The MPPT control algorithm is realized by three cascaded control loops. The outer loop determines the maximum power point using the MPPT algorithm. The output of the MPPT algorithm is the optimal rotor angular speed which is used as the reference of the inner control loop. Inner control loops are composed of two cascaded controllers. The first inner loop controls the rotor angular speed to the reference by using the PI controller. The control output generates the current references which are regulated by subsequent inner control loop based on the synchronous PI decoupling current controller.

In VCM mode, the control loop is cascaded by two control loops. The outer loop is realized to regulate the DCV by the PI controller. The controller outputs are employed as the current references in the inner control loop based on the synchronous PI decoupling current controller.

#### *3.4. Control Scheme of Battery Energy Storage System*

As explained in Section 3.1, the battery-based ESS is operated at five different operating modes, namely, DCVM-C, DCVM-D, BVCM, BCCM, and IDLE mode. The IDLE mode is easily accomplished

by opening the connection switch between the battery and DC-link. Figure 5 shows the control loops for four other operating modes of interleaved bidirectional DC/DC converter (converter 3) to interface the battery-based ESS, where *IB* is the battery current and *d* is the duty cycle. In both DCVM-C and DCVM-D modes, the DCV control is carried out in the outer control loop. By using the current reference generated from the outer control loop, the inner control loop regulates the charging or discharging currents to guarantee zero tracking errors of the current. In the battery system, the charging current is denoted by a positive value while the discharging current by a negative one.

**Figure 5.** Control loops of converter 3 for battery-based ESS.

In BVCM, two control loops are employed to charge the battery with constant voltage. The outer control loop controls the battery at the maximum voltage (*Vmax B* ) and the inner control loop is designed in the same way as the DCVM-C and DCVM-D modes. Unlike the above three modes, BCCM is realized by only one current control loop to charge the battery with a desired constant current. In all cases, the output of the current controller is the duty cycle *d*, which is fed to a pulse width modulation (PWM) block to drive the switches in DC/DC converter (converter 3).

#### *3.5. Load Management Algorithm*

Normally, when the battery is used as the main source to regulate the DCV in case of grid fault, the LS algorithm is not necessary. However, in some critical situations, the LS should be used as the last solution to prevent the system from collapsing. Figure 6 shows the LS algorithm presented in this paper, where *i* is flag describing the load status, n is the total quantity of load, *Cshe*, *Tshe*, and Δ*T* are the counter, predefined time delay, and step size, respectively.

As explained in operating mode 5, the LS is activated by one of two critical reasons that the required battery discharging current exceeds its maximum rating, or that the battery *SOC* is lower than the minimum level. The first critical case represents the power deficiency of battery, while the other comes from the insufficiency of energy stored in the battery. For the LS procedure, loads need to be classified into different priority levels to ensure that the load with lower priority should be disconnected first. In this paper, load priority levels are assigned as load 1 < load 2 < ... < load n, where load 1 has the lowest priority and load n has the highest priority. Moreover, different shedding time delay levels are added into the LS algorithm to avoid undesirable load disconnection caused by noise. Table 2 shows the description of load status by using the flag *i*. During the LS, the algorithm checks the value of *i* to recognize the load which is already disconnected as well as disconnecting the load at next step. As shown in Figure 6, the counter *Cshe* starts counting up with the step size of Δ*T*. As soon as *Cshe* reaches the predefined *Tshe*, the loads denoted by *i* are disconnected from DC-link according to Table 2. After load disconnection, *Cshe* is reset for next operations.

**Figure 6.** LS algorithm.

**Table 2.** Description of load status.


Once the system is back to normal, the disconnected load can be reconnected when necessary. In this paper, UG is assumed as a huge source which can feed any required consumed load. For instance, in case of grid connection, all the disconnected load can be reconnected regardless of the battery and WPGS status. In case of the islanded mode, however, the LR is determined based on the available power on DC-link which can be expressed as

$$P\_{DC}^{\text{arauil}} = P\_W + P\_{B, \text{dis}}^{\text{max}} - P\_L \tag{1}$$

where *Pavail DC* is the available power on DC-link and *Pmax B*,*dis* is the maximum discharging power of the battery. Figure 7 shows the LR algorithm where *Crec* and *Trec* are the counter and predefined time delay, respectively. When the LR is activated, the algorithm checks the value of *i* to recognize the reconnecting load. If *i* is equal to zero, it indicates that no load has been disconnected. As a result, the reconnection algorithm is unnecessary. When *i* is not zero, the UG status is checked first to reconnect all the loads. In case of the UG fault, *Pavail DC* is computed and is compared with the disconnected load having the highest priority to reconnect it first. The LR algorithm operates similarly to the LS algorithm, with a time delay of *Trec* to avoid the effect due to noise. The counter *Crec* starts counting and the LR is accomplished when *Crec* reaches *Trec*.

**Figure 7.** LR algorithm.

#### **4. Proposed DC-Link Voltage Restoration Algorithm**

In the grid-connected condition, converter 1 operates in the voltage control mode such as REC or INV to regulate the DCV. On the other hand, converter 2 works in the MPPT mode to maximize the extracted power from wind and converter 3 works in BCCM, BVCM, or IDLE to optimize the battery charging sequence. If the grid fault is detected right after fault occurrence, the system operation is quickly switched into the islanded mode in which the WPGS or battery undertakes the role of the DCV regulation. Unfortunately, the grid fault cannot be detected instantly by the fault detection algorithm in some cases due to a large total response time (TRT). In the centralized control approach, TRT is defined as the time interval from the fault occurrence to the final control action by the CC, which includes the fault clearance time, the data transmission time from the fault detection device to the CC, and the processing time for the controller to make a decision. Figure 8 shows TRT period when the grid fault occurs. In Figure 8, the fault clearance time, which consists of sensing time and opening time, is defined as the time duration from the fault occurrence instant to the instant at which DCMG is separated from UG [31]. Because the data transmission time and processing time are negligibly small in comparison with the fault clearance time, the delay of fault detection is considered to be equal to the fault clearance time. During the TRT period, any source or power converter does not serve to regulate the DCV. As a result, the DCV may be increased or decreased rapidly due to the imbalance between the supplied and consumed power, which ends up a catastrophic situation in DCMG. In order to prevent such a circumstance, an effective DCV restoration algorithm based on LECM is proposed in this paper. Figure 9 describes the control structure including the LECM for the proposed DCV restoration. It is worth noting that this paper focuses only on the effect of grid fault detection delays on system stability; the fault detection method is not considered.

In the normal DCMG operation, the CC collects the data from local systems, and then, assigns the proper execution mode (EM) to each LC and load connection/disconnection switches through communication lines as shown in Figure 9, in which EMj (for j = 1, 2, 3, 4) denotes the EM assigned to LCj (for j = 1, 2, 3) and load managemen<sup>t</sup> system. During the normal operation, LCs are operated according to the EM assigned from the CC as specified in Table 1. For example, the WPGS has either MPPT or VCM as normal control mode as shown in Figure 9. In addition to these normal operation modes, LCs of both the WPGS and battery are also equipped with additional LECMs to deal with abnormal DCV variations caused by the delay of grid fault detection as shown in Figure 9, in which the WPGS has only VCM and the battery has either BCCM or DCVM-D as LECM. The proposed DCV restoration algorithm based on LECM for the WPGS and battery are presented in Figure 10 in detail.

**Figure 9.** Control structure including LECM for DCV restoration.

Figure 10a shows the proposed DCV restoration algorithm by the LC2 in the WPGS. In this figure, whereas EM2 denotes the EM from the CC, EM2\* denotes the final operating mode which will be applied for converter 2. During the normal control mode, LC2 is operated in the MPPT or VCM corresponding to EM from the CC. Even if the grid fault occurs, the CC fails to assign appropriate operating mode since it cannot recognize the grid fault due to the delay of grid fault detection, which results in a rapid increase of the DCV. As soon as the DCV reaches the predefined maximum level of *Vmax DC* , the LECM is activated to impose VCM to EM2\* regardless of EM from the CC. As a result, the operation of the WPGS is immediately switched into VCM to restore the nominal DCV quickly. As shown in Figure 10a, when the LECM is activated, flag *F* is set to 1 to indicate the LECM operation. Before the CC recognizes the grid fault due to the delay of grid fault detection, the CC does not change EM2. In this case, flag *F* is still kept to 1, and consequently, the LECM assigns EM2\* to VCM, which indicates that the DCV is regulated with VCM by converter 2 during period of detection delay. Only when the CC finally recognizes the grid fault, the CC assigns a new EM2 to LC2 according to the PFCS in Figure 2. By detecting the change of EM2 from the CC, LC2 resets flag *F* to 0 to terminate the LECM. Then LC2 starts the normal control mode again by assigning EM2\* to new EM2 from the CC.

Figure 10b shows the proposed DCV restoration algorithm by the LC3 in the battery. In this figure, whereas EM3 denotes the EM from the CC, EM3\* denotes the final operating mode which will be applied for converter 3. During the normal control mode, LC3 is operated with one among five operating modes according to the EM from the CC. Similarly, in case of the delay of grid fault detection, the DCV can be rapidly decreased due to the power imbalance. As soon as the DCV becomes lower than the first predefined minimum level of *Vmin*<sup>1</sup> *DC* , the LECM is triggered to restore the DCV. The restoration of the DCV based on the LECM by LC3 is composed of two stages. During the first stage, flag *F1* is set to 1 and EM3\* is assigned to BCCM, in which the battery is discharged with the maximum discharging current. By using this discharging mode, the DCV can be recovered toward the nominal value as quickly as possible. As the DCV approaches the second predefined minimum level of *Vmin*<sup>2</sup> *DC* which is set to higher level than *Vmin*<sup>1</sup> *DC* , the second stage of the LECM is started. During this stage, *F2* is set to 1 and EM3\* is assigned to DCVM-D, in which the battery regulates the DCV to restore it completely to the nominal value. Similarly, before the CC recognizes the grid fault due to the delay of grid fault detection, flags *F1* and *F2* are still kept to 1, and consequently, the LECM assigns EM3\* to DCVM-D, which indicates that the DCV is regulated with DCVM-D by converter 3 during period of detection delay. Only when the CC finally recognizes the grid fault, the CC assigns a new EM3 to LC3 according to the PFCS in Figure 2. By detecting the change of EM3 from the CC, LC3 resets flags *F1* and *F2* to 0 to return back to the normal control mode from the LECM. Then, LC3 starts the normal control mode again by assigning EM3\* to new EM3 from the CC.

**Figure 10.** Proposed DCV restoration algorithms. (**a**) By LC2; (**b**) By LC3.
