**1. Introduction**

In recent years, the concept of microgrids (MGs) has been introduced as an e ffective and potential solution to integrate various renewable energy sources (RESs) such as wind and solar into the grid [1]. For the purpose of stabilizing the system operation under the intermittent nature of RESs and continuous variations of load demand, energy storage systems (ESSs) are usually used in MGs [2]. With the development of technology, electric vehicles can be utilized as multiple ESSs to stabilize the system operation of MGs by precise control strategy and simultaneously to regulate the voltage and frequency of the power grid [3]. Under the normal grid conditions, MG operates in the grid-connected mode in which the system power balance is ensured by the grid. In the case of grid fault, however, the MG is completely independent of the grid, operating in the islanded mode. In this sense, the system power balance of MG should be achieved by means of a coordinated operation of power units such as RESs, ESSs, and grid according to load demands [4]. As the reliability issue becomes a primary interest, there has been an approach to develop a fast proactive hybrid DC circuit breaker which interrupts the DC

fault [5]. As another approach to enhance the reliability, the DC-link voltage (DCV) control method has been presented for MG by the conventional centralized power flow control strategy [6].

Depending on the types of bus voltage, MGs can be mainly classified into DC microgrids (DCMGs), AC microgrids (ACMGs), and hybrid AC/DC microgrids [7]. Among them, DCMGs are known to be more attractive due to several advantages as compared with the other configurations. DCMGs provide a convenient interface in connecting various DC loads and operate with better e fficiency in transmission and distribution. Moreover, the consideration for the harmonic injection and frequency stability is not necessary. As a result, DCMGs can be considered as an e fficient, reliable, and cost-e ffective option in some applications [8].

In view of the communication perspective, the control of DCMGs can be divided into three methods: centralized control, decentralized control, and distributed control [9]. In centralized control, the data from distributed power units are collected in a central controller (CC). Then, the CC processes the acquired data to send the feedback commands back to units via digital communication links (DCLs). The centralized control normally su ffers from many drawbacks related to the single point of failure, reliability, flexibility, and scalability [10]. On the other hand, the decentralized approach can provide high reliability and flexibility due to the absence of CC and DCLs among distributed power units in the system [11]. Nevertheless, it is quite di fficult to ensure the global optimization of the entire system because each distributed unit lacks the information of others. By analyzing two above control methods, the distributed control is introduced as an optimal solution which combines the advantages as well as restricts the disadvantages of both methods [12]. In particular, the single point of failure as in the centralized control can be avoided since CC does not exist in the system. In addition, as compared to the decentralized approach, the problem of global optimization is e ffectively solved by implementing the DCLs among neighboring units. Therefore, a distributed control is considered as a potential alternative for the control of the power system in the future.

For the distributed control, a multi-agent system (MAS) is employed as an advanced technique which is able to handle complex problems in DCMGs including the system power balance, reliability, and stability in a more flexible and intelligent way [13]. Therefore, several studies relied on the MAS-based distributed control strategy of DCMG have been presented recently in the literature [14–18]. In [14], an intelligent control based on the MAS technique is presented to control the MG in both the grid-connected and islanded modes. In this scheme, the optimization in real-time control of the MG is achieved by the negotiation among agents to share the available energy. In [15], a novel distributed optimal control which applies the consensus algorithm-based MAS is introduced in order to realize the optimal control as well as to provide fast frequency recovery under various load conditions. With the aim of developing secondary control by MAS-based distributed control for the frequency recovery in islanded MG, a distributed robust control strategy is presented in [16]. To obtain the accurate reactive power-sharing among agents, a MAS-based hierarchical distributed coordinated control strategy is proposed in [17]. In [18], both reactive power-sharing and voltage control are taken into account by implementing a distributed MAS-based finite-time consensus algorithm in two layers. Although the aforementioned schemes can achieve key functions of control for MG such as the system stability, energy management, active and reactive power controls, the implementation of system control only focuses on purely inverter-based distribution generations (DGs). However, in practice, most present MG applications involve the networks of mixed agents such as inverter-based DGs, RESs, ESSs, and loads. Because these MG components have di fferent characteristics, each type of agen<sup>t</sup> should be designed considering a specific control strategy during operation. Furthermore, the problems of communication network in the implementation of MAS-based distributed control have not been considered yet.

In the MAS-based distributed control, the communication network problems such as delay or failure are ubiquitous during the process of information transmission among agents, which may cause the system malfunction, instability, or even collapse [19]. In order to analyze the e ffect of communication network problems on the system stability, the control scheme has been tested under the presence of time delay in [20,21]. However, since the e ffect of time delay on system performance has been only validated by the simulation tests in these studies, the reliability of system operation is not completely ensured in reality. Moreover, as shown in the simulation results of these studies, larger time delay results in longer and stronger fluctuation of the controlled variables such as the voltage and frequency in case of load variation. For the purpose of improving the control performance further, the time delay is considered in the designs of the secondary controllers [22,23]. In [24,25], a local controller based on the delay-dependent *H* ∞ method is presented to deal with the transmission time delays. Although the schemes in [22–25] can guarantee the system stabilization, the control performance is still limited due to the requirement of an allowable maximum upper bound for the time delay. Motivated by this concern, a communication-based control strategy that can maintain the system stability with unbounded time delays is presented in [26]. In comparison to time delay, the communication failure is known to be more serious in the communication-based systems. To address the drawback of the data loss caused by communication failure, a prediction scheme is constructed in [27], in which each agen<sup>t</sup> forecasts the lost data by using an extreme learning machine.

As mentioned earlier, the problems of the communication network result in the performance deterioration or even system instability, which is more serious in cases of grid fault and grid recovery. When DCMG operates in the grid-connected mode, the system power balance is normally achieved by implementing the DC-link voltage control mode (DCVM) by the grid agent. When the grid fault occurs, the grid agen<sup>t</sup> informs the other agents of the fault state via the communication links, and then, the DCMG operation is switched into the islanded mode. After receiving the grid fault information, the remaining agents automatically undertake the system power balance by implementing their own DCVM. Unfortunately, however, unexpected communication problems prevent the remaining agents from recognizing the grid fault information instantly. As a result, any agents cannot serve to achieve the system power balance. On the contrary, as soon as the grid is recovered from the fault, the grid agen<sup>t</sup> should inform the recovery state to the other agents, and then switch the operation mode into DCVM. In compliance with this mode change, the remaining agents should stop their DCVM operation, turning over the authority of DCV to the grid agent. However, the remaining agents may fail to recognize the grid recovery in the presence of communication problems, which causes the conflict in the system control because two voltage control sources exist in DCMG.

To deal with the aforementioned drawbacks caused by the communication network problems in both the grid fault and grid recovery cases, an improved power managemen<sup>t</sup> strategy (PMS) using MAS-based distributed control of DCMG is presented in this paper. In this study, DCMG consists of a grid agent, a battery agent, a wind power generation system (WPGS) agent, and a load agent. To ensure the system power balance under various conditions, each agen<sup>t</sup> investigates the information obtained from both the local measurement and the neighboring agents via the communication lines. Then, the decision for local control mode and communication data is optimally made for the system power balance. By using this control scheme, the control mode of agents can be determined locally without any intervention of CC, which e ffectively avoids the single point of failure as in the centralized control. Also, all the agents can operate in a deliberative and cooperative manner to ensure globally optimal operation by means of the communication network. In addition, to deal with the impact of communication problems in the case of the grid fault, a DCV restoration algorithm is introduced to restore the DCV stably to its nominal value. Furthermore, to recognize the grid recovery reliably in other agents even under the communication failure, the grid recovery identification algorithm is introduced. For this purpose, a special current pattern is generated on DC-link by the grid agen<sup>t</sup> once the grid is recovered. By detecting this current pattern on DC-link, the remaining agents can reliably identify the grid recovery even without the communication. To validate the feasibility of the MAS-based distributed control as well as the proposed schemes under the communication problems, the simulations based on the PSIM software and the experiments based on laboratory prototype DCMG testbed are carried out.

This paper is organized as follows: Section 2 describes the system configuration of DCMG with MAS-based distributed control. Power managemen<sup>t</sup> and control strategies of local agents are discussed in detail in Section 3. Section 4 presents the proposed control strategies under communication network problems. The simulation and experimental results are given in Sections 5 and 6, respectively. Finally, Section 7 concludes the paper.

#### **2. System Configuration of DCMG with MAS-based Distributed Control**

#### *2.1. MAS-based Distributed Control of DCMG*

Figure 1 shows the configuration of DCMG with the MAS-based distributed control approach, in which system units are represented by corresponding autonomous agents, namely, grid agent, battery agent, WPGS agent, and load agent. The functions of each agen<sup>t</sup> are summarized as follows.

**Figure 1.** DCMG with MAS-based distributed control.

Grid agent: the grid agen<sup>t</sup> receives the information on the grid statuses such as the normal, fault, or recovery from the grid operator (GO) to determine the operation mode of DCMG in the grid-connected or islanded. In the grid-connected mode, the grid agen<sup>t</sup> ensures the supply–demand power balance in DCMG by controlling the exchange power between DCMG and grid within the maximum exchange power. In addition, the grid agen<sup>t</sup> is responsible for the seamless transfer between the grid-connected and islanded modes.

Battery agent: the battery agen<sup>t</sup> receives the information on the state of DCV control from the grid agen<sup>t</sup> via a communication line. If the grid agen<sup>t</sup> is incapable of controlling the DCV, the battery agen<sup>t</sup> is switched into the DCVM to regulate the DCV at the nominal value. Furthermore, by collecting the state of charge (*SOC*), battery voltage, and battery current, the battery agen<sup>t</sup> realizes relevant control modes to ensure that the battery is operated in a safe range.

WPGS agent: generally, the WPGS agen<sup>t</sup> is operated in order to extract the maximum power from the wind into DC-link by the maximum power point tracking (MPPT) mode. However, when both the grid and battery agents are incapable of regulating the DCV, the WPGS agen<sup>t</sup> changes the operation from the MPPT mode to DCVM to regulate the DCV.

Load agent: the load agen<sup>t</sup> is responsible for monitoring the load demand, and also, providing the information on load demand to other agents. Another role of this agen<sup>t</sup> is to implement the load shedding (SHED) and load reconnection (RECO) to keep the system stable as well as to optimize the available power on DC-link.

As can be seen in Figure 1, each agen<sup>t</sup> can not only monitor and control the corresponding power units but also communicate with other agents through the communication network. By using the communication among agents, the system control is realized in a distributed way in which each agen<sup>t</sup> makes its control decision locally. This enhances the control performance and system reliability as compared with the centralized and decentralized control approaches.

#### *2.2. System Communication Topology*

In general, the communication network plays an important role in MAS-based distributed control. Figure 2 presents the system communication topology used in this study, in which each agen<sup>t</sup> communicates with others via communication lines. Defining an appropriate communication network that specifies the data information exchanged among agents is the crucial step in the design procedure of MAS-based distributed control [28]. In this paper, the exchange data, data type, and data information are described in Table 1 in detail. For example, the maximum supplied power, the maximum injected power, and the grid states are transmitted through the communication line 1 into the grid agen<sup>t</sup> in the format of double and binary data.

**Figure 2.** System communication topology.


#### **3. Power Management and Control Strategy of Local Agents**

#### *3.1. Control Strategy of Grid Agent*

Figure 3 shows the control strategy which is designed in this study for local operation of the grid agen<sup>t</sup> in MAS-based distributed control approach. As can be seen, the entire algorithm is divided into three layers, namely, the information collection, the decision of control mode, and the decision of communication. In the information collection layer, the information is gathered from the local measurement as well as GO and neighbor agents. The GO provides the information on the maximum exchange powers and grid states to the grid agen<sup>t</sup> through the communication line 1 as in Table 1. Local measurement and neighbor agents o ffer the information on the voltage, current, and supply–demand power relationship. After gathering the necessary information, the grid agen<sup>t</sup> determines appropriate control modes as shown in the decision of control mode layer. If the grid has a fault, the grid agen<sup>t</sup> switches the operation to IDLE mode, and the variable *Gctrl* is set to 0, which indicates that the grid agen<sup>t</sup> is incapable of controlling the DCV. This information is transmitted to other agents.

**Figure 3.** Control strategy of grid agent.

When the grid fault does not occur, the grid agen<sup>t</sup> further investigates whether the grid is being normal or the grid is recovered. If the grid is being normal, the grid agen<sup>t</sup> determines the operation as DCVM-REC or DCVM-INV to regulate the DCV and to guarantee the system power balance depending on the supply–demand power relationship. While the operation DCVM-REC compensates the power deficit by injecting the power from the grid to DCMG, the operation DCVM-INV makes the grid absorb the power surplus on DC-link. When the required power to maintain the system power balance becomes larger than the maximum level obtained from GO, the grid agen<sup>t</sup> switches the operation into

constant power control mode (CPCM). Since the exchange power between the grid and DCMG is at the maximum possible level under the CPCM, the grid agen<sup>t</sup> is not able to control the DCV.

In case that the grid is recovered from the fault, a grid recovery control algorithm is triggered. The details of this algorithm and function for the flags *FG*1, *FG*2, and *FG*3 will be explained in Section 4. After the decision of local control mode is released, the information on the ability of the DCV control by the grid agen<sup>t</sup> is transmitted to other agents via communication lines.

Based on the control strategy of the grid agen<sup>t</sup> in Figure 3, the local control block is implemented to realize all the operating modes [6].

#### *3.2. Control Strategy of Battery Agent*

Figure 4 shows the control strategy which is designed in this study for local operation of the battery agen<sup>t</sup> in MAS-based distributed control approach. Similarly, the entire algorithm is divided into three layers. In the information collection layer, the information is collected from the local measurement and neighbor agents. By using the local measurement, the information of battery state, *SOC*, voltage, and current can be obtained locally. The information on the supply–demand power relationship and the ability of the DCV control by the grid agen<sup>t</sup> is obtained via communication lines from neighbor agents. In this figure, the DCV restoration, the grid recovery identification algorithm, and the function of flags *FB*1 and *FB*2 will be explained in Sections 4.1 and 4.2.

**Figure 4.** Control strategy of battery agent.

If the battery has a fault, the battery agen<sup>t</sup> switches the operation into IDLE mode and the variable *Bctrl* is set to 0 to imply that the battery agen<sup>t</sup> is incapable of controlling the DCV. This information is also transmitted to other agents.

In case the battery is normal, the battery agen<sup>t</sup> determines appropriate control modes according to the supply–demand power relationship, battery *SOC*, voltage, and current to ensure the system power balance in DCMG under various conditions. When the battery statuses such as *SOC*, voltage, and required power are within their predefined ranges, the battery agen<sup>t</sup> determines the operation as DCVM-DIS to inject the power to DC-link or DCVM-CHA to absorb the power from DC-link for the purpose of regulating the DCV to its nominal value. If the battery *SOC* goes beyond the safe range defined by *SOCmin* and *SOCmax*, the battery agen<sup>t</sup> switches the operation into IDLE mode to avoid overcharging or overdischarging. In addition, if the required charging power of *Preq B*,*cha* and the required discharging power of *Preq B*,*dis* exceed the maximum levels of *Pmax B*,*cha* and *Pmax B*,*dis*, the operation CPCM is realized to charge/discharge the battery with its maximum capability. As a result, the overheat or damage during the battery operation can be avoided. Similarly, in order to prevent the battery from overcharging voltage, the constant voltage control mode (CVCM) is realized to charge the battery with the maximum voltage level. After the decision of local control mode is given, the information on the ability of the DCV control by the battery agen<sup>t</sup> (*Bctrl*) is simultaneously informed to other agents via communication lines.

Based on the control strategy of the battery agen<sup>t</sup> in Figure 4, the local control block is implemented to realize all the operating modes [6].

#### *3.3. Control Strategy of WPGS Agent*

Figure 5 shows the control strategy for local operation of the WPGS agen<sup>t</sup> in MAS-based distributed control approach. Similar to the above agents, the entire algorithm is also divided into three layers. In the information collection layer, the information is obtained from the local measurement and neighbor agents. By using the local measurement, the extracted power from wind turbine ( *P W*) can be obtained. The information on the supply–demand power relationship and the ability of the DCV control of battery and grid agen<sup>t</sup> is gathered from neighbor agents. In this figure, the DCV restoration, the grid recovery identification algorithm, and the function of flag *FW* will be presented in Sections 4.1 and 4.2.

**Figure 5.** Control strategy of WPGS agent.

If the WPGS has a fault, the WPGS agen<sup>t</sup> switches the operation into IDLE mode, and the variable *Wctrl* is set to 0 to indicate that the WPGS agen<sup>t</sup> is incapable of controlling the DCV. Otherwise, the WPGS agen<sup>t</sup> determines appropriate control modes according to the supply–demand power relationship to ensure the system power balance. In particular, the MPPT mode is used to extract the maximum power from wind into DC-link. Meanwhile, the DCV control mode by limiting the output power of wind turbine (DCVM-LIM) is implemented to adjust the output power of wind turbine to load demand. Similarly, after the decision of local control mode is given, the information on the ability of the DCV control by the WPGS agen<sup>t</sup> (*Wctrl*) is simultaneously informed to other agents via communication lines.

Based on the control strategy of the WPGS agen<sup>t</sup> in Figure 5, the local control block to realize all the operating modes is implemented [6].

#### *3.4. Control Strategy of Load Agent*

Figure 6 shows the control strategy for local operation of the load agen<sup>t</sup> in MAS-based distributed control approach. In the information collection layer, the information is collected from the local measurement and neighbor agents. Total load demand is obtained from the local measurement and the information on the ability of the DCV control is provided by neighbor agents via the communication lines. If the grid, battery, and WPGS agents can not control the DCV, the operation SHED is activated to remove some less important loads. Similar to the battery and WPGS agents, the load agen<sup>t</sup> is equipped with the DCV restoration algorithm which will be explained in Section 4.1.

**Figure 6.** Control strategy of load agent.

#### **4. Proposed Control Strategies under Communication Network Problems**

Once the fault is detected in the grid by a detection device, the GO informs the grid fault to the grid agent, and then, the grid agen<sup>t</sup> informs the grid fault to the remaining agents in DCMG. The remaining agents negotiate via communication lines to determine substitute agen<sup>t</sup> which takes over the authority of the DCV regulation.

Unfortunately, in reality, the grid fault cannot be detected instantly by the fault detection device due to the large total response time [29]. Furthermore, delay in transmission lines is unavoidable in the communication-based system. As a result, a significant time delay may exist to recognize the fault. In the worst case of communication failure, the remaining agents may determine operating modes without the information on the grid fault. During such circumstances, the DCV may be increased or decreased rapidly due to the absence of supply–demand power balance since any agents do not serve to regulate the DCV.

As is well known, the DCV stabilization and system power balance should be ensured even in the islanded mode by the DCVM of the remaining agents such as battery or WPGS agent. When the grid is recovered from the grid fault, DCMG operation should be back to grid-connected mode. For this purpose, the GO provides the information on the grid recovery to the grid agent. The grid agen<sup>t</sup> informs the grid recovery to remaining agents by means of the communication network. After receiving the grid recovery information, the battery or WPGS agen<sup>t</sup> can stop the operation DCVM to release the authority of the DCV control to the grid agent. Unfortunately, however, communication problems often prevent the battery or WPGS agen<sup>t</sup> from recognizing the grid recovery instantly. Consequently, these agents keep regulating the DCV with DCVM, which causes a conflict in the DCV control by two voltage control sources at the same time: one by the grid agen<sup>t</sup> and the other by the battery or WPGS agent.

In order to deal with the DCV variation caused by the delay in grid fault detection and communication in the presence of grid fault, the DCV restoration algorithm is adopted in the battery and WPGS agents to restore the DCV rapidly. In addition, to avoid the DCV control by two voltage control sources at the same time under communication problems, a grid recovery identification algorithm is proposed in this paper.

#### *4.1. Control Strategy for Grid Fault Case*

Figure 7 shows the DCV restoration algorithms to ensure the DCV stabilization caused by the delay in grid fault detection and communication in the presence of grid fault. Figure 7a shows the detailed DCV restoration algorithm implemented in the battery agen<sup>t</sup> which is mentioned in Figure 4 and Section 3.2. If the DCV is greater than the first threshold level *VTH*<sup>1</sup> *DC*, *f ault*, the battery agen<sup>t</sup> operates with IDLE mode. As soon as the DCV is decreased lower than *VTH*<sup>1</sup> *DC*, *f ault*, the CPCM starts to restore the DCV by discharging the battery with the maximum discharging power. Simultaneously, the flag *FB*1 is set to 1. As long as the DCV is lower than *VTH*<sup>2</sup> *DC*, *f ault*, the battery agen<sup>t</sup> keeps operating with CPCM to restore the DCV as quickly as possible. Once the DCV is increased higher than *VTH*<sup>2</sup> *DC*, *f ault*, the battery agen<sup>t</sup> automatically switches the operation into DCVM-DIS to regulate the DCV at the nominal level, setting the flag *FB*2 to 1. With the flags *FB*1 and *FB*2 equal to 1, the battery agen<sup>t</sup> continues to work with DCVM-DIS and the status of the battery agen<sup>t</sup> are transmitted to other agents as shown in Figure 4.

**Figure 7.** DCV restoration algorithms. (**a**) By battery agent; (**b**) By load agent; (**c**) By WPGS agent.

In some cases, even if the battery supplies the maximum discharging power with CPCM, the DCV can be still decreased due to the deficit power. To avoid the system collapse under such extreme circumstances, the operation SHED is activated in the load agen<sup>t</sup> as shown in Figure 7b. In this algorithm, as soon as the DCV becomes lower than the minimum DCV level *Vmin DC*, *f ault*, the load agen<sup>t</sup> starts the operation SHED to disconnect less important loads from DC-link.

Figure 7c shows the detailed DCV restoration algorithm in the WPGS agen<sup>t</sup> which is mentioned in Figure 5 and Section 3.3. If the DCV is lower than the maximum level *Vmax DC*, *f ault*, the WPGS agen<sup>t</sup> works with MPPT mode. When the DCV is increased higher than *Vmax DC*, *f ault*, the operation DCVM-LIM is triggered to maintain the DCV at the nominal value stably by limiting the output power of the WPGS to total load demand. Simultaneously, the flag *FW* is set to 1. Similarly, the status of the WPGS agen<sup>t</sup> is transmitted to other agents as shown in Figure 5.

#### *4.2. Control Strategy for Grid Recovery Case*

To improve the DCV stabilization and the DCMG reliability even under communication problems such as delay or failure, a grid recovery identification algorithm is introduced. As can be seen in Figure 3, after receiving the information on the grid recovery from GO, a grid recovery control algorithm in the grid agen<sup>t</sup> is initiated to avoid the DCV control by two voltage control sources at the same time under communication problems.

Figure 8 shows the detailed control strategies for a grid recovery identification algorithm during grid recovery. First, once the grid is recovered from the fault, the grid agen<sup>t</sup> operates with special current control mode (SCCM) as shown in Figure 8a, in which the special current pattern is generated in a square wave with a frequency of *fG* on the DC-link power line. Since periodic signals are superimposed on DC values, these signals can be easily detected with simple signal processing schemes irrespective of chosen frequency and amplitude. In this paper, the special current pattern can be detected in the battery or WPGS agen<sup>t</sup> by monitoring the battery current *IB* or the *q*-axis current of WPGS *IW*,*q*. Figure 8b shows the grid recovery identification algorithm to detect the special current pattern generated by the grid agent, which consists of a high pass filter, zero-crossing detection, and frequency calculation. By comparing the detected frequency *f G* with the generated frequency *fG* by the grid agent, the grid recovery can be effectively identified by the battery and WPGS agents. After the grid recovery is recognized, the battery or WPGS agen<sup>t</sup> stops the operation DCVM, which causes the DCV variation. By monitoring this DCV variation with *Vmin DC*, *reco* and *Vmax DC*, *reco*, the grid agen<sup>t</sup> switches the operation SCCM into DCVM-REC or DCVM-INV to regulate the DCV as shown in Figure 8a. The flags *FG*2 and *FG*3 are used to denote the corresponding operating mode. The output information of the grid recovery identification algorithm is fed back to Figures 4 and 5 to determine the operating modes of the battery and WPGS.

**Figure 8.** Control strategies for reliability improvement of DCMG during grid recovery. (**a**) Special current pattern generation by grid agent; (**b**) Grid recovery identification algorithm of battery and WPGS agents by frequency detection.

Figure 9 shows the illustration to validate the proposed grid recovery identification algorithm by frequency detection in the battery agent. As can be seen in Figure 9c, with the special current pattern generated in square wave with a frequency of *fG* by the grid agent, the battery current *IB* includes two components: low frequency component for the normal operation and high frequency component due to the special current pattern by the grid agent. By using high pass filter and zero-crossing detection, the generated frequency *fG* can be effectively detected to recognize the grid recovery.

**Figure 9.** Illustration of grid recovery identification algorithm by frequency detection. (**a**) Output power of grid agent; (**b**) Battery current without special current pattern; (**c**) Battery current with special current pattern; (**d**) Output of high pass filter; (**e**) Output of zero-crossing detection; (**f**) Generated frequency by the grid agen<sup>t</sup> and detected frequency by grid recovery identification algorithm.
