3.1.3. Protection Parameter Constraint

In this part, the constraint of the pickup current *Ip*·*i*, the Time Dial Setting *TDSi*, and the index α*i* are introduced.

The range of values for each relay's pickup current is determined by the network. According to the requirements of the IEC standard, the pickup current must be greater than the maximum load current *IL*·*max* of the line, which is normally set as *Ip*·*<sup>i</sup>* > 1.1*IL*·*max* [23]. In order to ensure the reliability of the protection, the pickup current must be smaller than the minimum fault current *If*·*min*, which is the fault current of the two-phase fault at the remote end of the feeder. The *TDSi* is generally set between 0.05 and 11 s [33]. According to Standard IEC 60255, the inverse time type α*i* is usually between 0.02 and 13.5 [34]. Finally, the lower and upper bounds of the I-ITOCR's parameters are given in (19)–(21).

$$
\alpha\_{\text{min}} < \alpha\_i < \alpha\_{\text{max}} \tag{19}
$$

$$I\_p^{\min} \le I\_{p \cdot i} \le I\_p^{\max} \tag{20}$$

$$TDS\_{\min} \le TDS\_i \le TDS\_{\max} \tag{21}$$

#### *3.2. Parameter Optimization of the I-ITOCR Based on the Beetle Antenna Search Algorithm*

According to the microgrid network structure and the fault condition, the objective function (12) and the constraints (13)–(16) can be obtained. Next, considering the constraints (17)–(21) of the parameter variables, the optimal parameter configuration for each relay can be determined. Since the above problem is a nonlinear optimization problem, the solving process is complicated and difficult. Therefore, in this section, the BAS algorithm is used to solve this nonlinear optimization problem to obtain the optimal configuration of the I-ITOCR's parameters.

The BAS algorithm is a meta-heuristic algorithm for multi-objective function optimization, which imitates the perception function of beetle antennae to judge the fitness of local areas around itself and guides individuals to move to the global optimal solution through the optimal solution of local areas [35]. Compared with the particle swarm optimization algorithm, the BAS algorithm only needs one individual, which greatly reduces the computational complexity.

The algorithm flow of the BAS is shown in Figure 3, and its main steps are explained as follows: Step1:Randomlygeneratethedirectionvector→ *b*ofthebeetleantennaeandnormalizeit.

$$\overbrace{\dots}^{\dots}$$

$$\overrightarrow{b} = \frac{rands(\text{g}, 1)}{||rands(\text{g}, 1)||} \tag{22}$$

where *rands* denotes a random function and *g* presents the dimensions of the position. Here, the size of *g* is related to the number of relays to be optimized.

Step 2: Calculate the left and right spatial coordinates *Xl* and *Xr* of the antennae according to the initialsearchdistance*dt* and→ *b*.

$$X\_l = X^t - d^t \overline{b} \tag{23}$$

$$X\_{\mathbf{f}} = X^t + \mathbf{d}^t \stackrel{\rightarrow}{b} \tag{24}$$

where *X<sup>t</sup>* is the position of the beetle at the *tth* iteration, and *X<sup>t</sup>* can be expressed as Equation (25):

$$X^t = \begin{bmatrix} I\_{p \cdot 1'}^t \, \alpha\_{1'}^t \, \text{TDS}\_{1'}^t \, \cdots \, \, I\_{p \cdot w \prime}^t \, \alpha\_{w \prime}^t \, \text{TDS}\_w^t \end{bmatrix}^T \tag{25}$$

where *w* is the number of relays to optimize.

Step 3: Calculate the odor intensity *f*(*Xl*) and *f*(*Xr*) based on the spatial coordinates and the fitness function *f*(*X*).

$$f(X\_l) = F(X\_l) \tag{26}$$

$$f(X\_{\mathcal{I}}) = F(X\_{\mathcal{I}}) \tag{27}$$

where *F*(.) is the objective function shown in Equation (12).

Step 4: Determine the position *xt*+<sup>1</sup> of the next moment of the beetle according to the fitness function value.

$$X^{t+1} = X^t - \delta^t \overrightarrow{b} \cdot \text{sign}(f(X\_l) - f(X\_r)) \tag{28}$$

where δ*t* represents the step size and sign(.) represents a sign function.

Step 5: Update the step size δ*t* and search distance *d<sup>t</sup>*.

Step 6: Iterate to the maximum number of iterations and output the result.

Through the above steps, the optimal parameters *Ip*·*i*, *TDSi*, and α*i* of each relay in the microgrid can be obtained, and the coordination problem of the microgrid protection can be solved.

**Figure 3.** Flowchart of the beetle antenna search (BAS) algorithm.

#### *3.3. Classification of Microgrid Scenarios Based on DG Status*

Since the connection status of the DG in the microgrid affects the fault current in the network, it is necessary to classify the scenarios of the microgrid according to whether the DG is connected and obtain the optimal protection parameters under the corresponding scenarios. Please note that the information about the connection status of DG can be obtained from the central controller of the microgrid in practice [23].

Figure 4 shows a typical microgrid structure which contains 4 DGs and two branches. The classification of the microgrid scenarios follows the following criteria. First of all, it is not necessary to consider the PCC connection status, because the parameter optimization can comprehensively consider the microgrid operation modes, i.e., the grid-connected and islanded mode. Secondly, during the microgrid grid-connect operation mode, DGs apply conventional PQ control. During the microgrid island operation mode, the widely used master–slave control strategy is applied. DG1, which is assumed as a stable resource, is chosen as the unit to maintain the microgrid voltage and frequency. Finally, the scenarios of the microgrid are classified according to the state changes of the remaining DGs.

**Figure 4.** Schematic diagram of the microgrid.

According to the above classification principle, the microgrid network shown in Figure 4 can be divided into eight scenarios, as shown in Table 1. Relays R1–R10 are directional over-current relays. In different modes of the microgrid, the fault currents flowing through Relays R1, R2, R3, R4, and R5 are obviously different. It is necessary to optimize the parameters according to the above optimization process. The fault current flowing through Relays R6, R7, R8, R9, and R10 is less affected by the change in the operating mode of the microgrid, and the parameters can be configured according to the conventional protection method, which is beyond the scope of this paper.


**Table 1.** Scenarios classification of the microgrid.
