*5.2. Islanded Case*

Since the grid agen<sup>t</sup> is incapable of controlling the DCV in the islanded case, the DCV control is achieved by the negotiation of remaining agents in DCMG such as the battery, WPGS, and load agents. The operation conditions used for the simulation tests are listed in Table 4.


**Table 4.** Operation conditions for simulation test in islanded mode.

The simulation results for the islanded mode according to the operation conditions in Table 4 are shown in Figure 11. Initially, the system power balance is guaranteed by the grid agen<sup>t</sup> with DCVM-REC. Meanwhile, the WPGS works in the MPPT mode to produce 2 kW, the battery is in IDLE mode and all loads are fed.

When the grid fault occurs at t = 1 s, the system operation is changed to the islanded mode. After receiving the fault information from GO, the grid agen<sup>t</sup> switches the operation to IDLE mode, and simultaneously sends the data (*Gctrl* = 0) to other agents. Because the wind power of 2 kW is smaller than the load demand of 3.5 kW, the battery agen<sup>t</sup> rapidly enters DCVM-DIS to compensate for the deficit power.

At t = 1.5 s, as the wind power suddenly drops to 1 kW, the battery agen<sup>t</sup> tries to increase the discharging power to maintain the supply–demand power balance. However, due to the discharging power limit of 2 kW, the battery agen<sup>t</sup> starts CPCM. In this instant, the battery agen<sup>t</sup> cannot maintain the system power balance as well as control the DCV. After recognizing that both the grid and battery agents are not able to control the DCV by communication information, the load agen<sup>t</sup> activates SHED to disconnect the load 3 which has the lowest priority. A time delay *Tshed* is used in SHED to avoid

undesirable load disconnection caused by noise. After SHED, the battery can return to DCVM-DIS to continue the DCV regulation.

**Figure 11.** Simulation results for islanded mode. (**a**) *a*-phase grid voltage and current; (**b**) Output power of each agent; (**c**) Battery *SOC*; (**d**) DCV.

At t = 2 s, as the battery *SOC* reaches the minimum level of 10%, the battery agen<sup>t</sup> switches the operation into IDLE mode, and the load agen<sup>t</sup> executes the operation SHED again to disconnect the load 2. With the disconnection of the load 2, the wind power is sufficient to supply the remaining load power of 0.5 kW. Then, the battery agen<sup>t</sup> starts DCVM-CHA to absorb the surplus power in DCMG.

At t = 2.5 s, as the wind power increases from 1 kW to 2 kW, the DCV is continuously regulated with DCVM-CHA by the battery agent. This operation is still maintained when the load 2 is reconnected to the DC-link at t = 3 s.

The grid is recovered at t = 3.5 s. Assuming that there are no communication problems, the grid agen<sup>t</sup> informs the grid recovery to other agents by sending the data (*Gctrl* = 1). Then, the battery agen<sup>t</sup> switches the operation into IDLE mode while the DCV is regulated by the grid agen<sup>t</sup> with DCVM-INV. From Figure 11, it can be concluded that the DCV is regulated stably at the nominal value in all the operating conditions by using the MAS-based distributed control strategy under the variations of wind power and load demand in the islanded case.

#### *5.3. Case of Communication Problems*

In this Section, the simulation results are presented to validate the effectiveness of the proposed control schemes under communication problems. The results of the DCV restoration scheme to deal with the delay in grid fault detection and communication are shown in Figure 12, Figure 13, and Figure 14. The results for the grid recovery detection under communication failure are presented in Figures 15 and 16.

**Figure 12.** Simulation results of the proposed DCV restoration by battery agen<sup>t</sup> without SHED. (**a**) *a*-phase grid voltage; (**b**) Output power of grid agen<sup>t</sup> and total load power; (**c**) Output power of battery agen<sup>t</sup> and WPGS agent; (**d**) DCV.

**Figure 13.** Simulation results of the proposed DCV restoration by battery agen<sup>t</sup> with SHED. (**a**) *a*-phase grid voltage; (**b**) Output power of grid agen<sup>t</sup> and total load power; (**c**) Output power of battery agen<sup>t</sup> and WPGS agent; (**d**) DCV.

**Figure 14.** Simulation results of the proposed DCV restoration by WPGS agent. (**a**) *a*-phase grid voltage; (**b**) Output power of grid agen<sup>t</sup> and total load power; (**c**) Output power of battery agen<sup>t</sup> and WPGS agent; (**d**) DCV.

**Figure 15.** Simulation results for the grid recovery identification under communication failure by battery agent. (**a**) DCV; (**b**) Output power of grid agent; (**c**) Load power; (**d**) Output power of WPGS; (**e**) Battery current.

**Figure 16.** Simulation results for the grid recovery identification under communication failure by WPGS agent. (**a**) DCV; (**b**) Output power of grid agent; (**c**) Load power; (**d**) WPGS current.

Figure 12 shows the simulation results of the proposed DCV restoration algorithm by the battery agen<sup>t</sup> without SHED in the presence of delay in grid fault detection and communication. Before the grid fault, the DCV control and system power balance is taken over by the grid agent. Meanwhile, the battery agen<sup>t</sup> is in the IDLE mode and the WPGS agen<sup>t</sup> works with the MPPT mode. It is assumed that the grid has a fault at t = 0.3 s and GO and all the system agents cannot instantly recognize it due to delay in grid fault detection and communication. In this condition, the grid agen<sup>t</sup> still works with DCVM-REC while the battery is in IDLE mode. As a result, the DCV decreases rapidly because of power imbalance as can be seen in Figure 12c. However, according to the proposed DCV restoration algorithm in Figure 7, the battery agen<sup>t</sup> executes CPCM and DCVM-DIS in turn to restore the DCV to the nominal value of 400 V. When the grid fault is detected at t = 0.5 s, the operation of the grid agen<sup>t</sup> is switched into IDLE, and the battery agen<sup>t</sup> continuously controls the DCV by DCVM-DIS.

Figure 13 shows the simulation results of the proposed DCV restoration algorithm by the battery agen<sup>t</sup> with SHED under the delay in grid fault detection and communication. The algorithm operates similarly to Figure 12. Only the difference is to apply SHED when the DCV cannot be restored with CPCM. It is shown in Figure 13c that the DCV still decreases even when the battery agen<sup>t</sup> operates with CPCM. As soon as the DCV reaches *Vmin f ault*, the load agen<sup>t</sup> triggers SHED to support the DCV restoration. Once the DCV ceases decreasing, the battery agen<sup>t</sup> executes CPCM and DCVM-DIS in turn to restore the DCV completely to the nominal value of 400 V.

Figure 14 shows the simulation results of the proposed DCV restoration algorithm by the WPGS agen<sup>t</sup> in the presence of delay in grid fault detection and communication. Before the grid fault, the WPGS agen<sup>t</sup> operates with the MPPT mode, the battery is in IDLE, and the DCV is regulated to 400 V with DCVM-INV by the grid agent. As before, it is assumed that the grid has a fault at t = 0.3 s, and GO and all the system agents cannot instantly recognize it due to delay in grid fault detection and communication. This results in the rapid increase of the DCV due to supply–demand power imbalance. However, even in this case, the WPGS agen<sup>t</sup> can effectively restore the DCV with DCVM-LIM by using the proposed DCV restoration algorithm in Figure 7. Once the grid fault is detected at t = 0.5 s, the operation of grid agen<sup>t</sup> is switched into IDLE, and the WPGS agen<sup>t</sup> continuously controls the DCV by DCVM-LIM.

Figures 15 and 16 shows the simulation results for the grid recovery identification under communication failure by the battery agen<sup>t</sup> and WPGS agent, respectively. In Figure 15, the DCV is regulated with DCVM-CHA by the battery agen<sup>t</sup> before the grid is recovered. Even if the grid is recovered at t = 0.2 s, the battery agen<sup>t</sup> cannot recognize it under the communication failure, keep operating with DCVM-CHA. To prevent this situation, the grid agen<sup>t</sup> activates the SCCM to inject a special current pattern (square wave with frequency of 20 Hz) to DC-link. Based on the proposed grid recovery identification algorithm in Figure 8b, the battery current waveform is analyzed to identify the grid recovery by detecting current pattern. The grid recovery can be detected in 0.6 s to ensure the reliable detection under the effect of wind power and load demand variations as can be shown in Figures 15c and 15d. When the battery agen<sup>t</sup> recognizes the grid recovery, the battery agen<sup>t</sup> stops the operation DCVM-CHA to release the authority of DCV control to the grid agent. As a result of ceasing the DCV control, the DCV varies instantly according to supply–demand power balance in DCMG. By sensing this DCV variation, the grid agen<sup>t</sup> can switch the operation SCCM into DCVM-INV to restart the DCV regulation under the communication failure.

In Figure 16, the DCV is regulated with DCVM-LIM by the WPGS agen<sup>t</sup> before grid is recovered. By using the similar procedure, the WPGS can identify the grid recovery by the proposed grid recovery identification algorithm. Then, the WPGS agen<sup>t</sup> switches the operation DCVM-LIM into MPPT to release the authority of DCV control to the grid agent. As a result, it is confirmed from the simulation results that the grid recovery can be detected by using the proposed scheme even under the communication failure irrespective of the variations of wind and load power. In addition, the DCV can be stably regulated without any conflict in the DCV control by two voltage control sources at the same time.
