COOT BIRD ALGORITHMS BASED TUNING PI CONTROLLER FOR OPTIMAL MICROGRID AUTONOMOUS OPERATION

This paper develops a novel methodology for optimal control of islanded microgrids (MGs) based on the coot bird metaheuristic optimizer (CBMO). To this end, the optimum gains for the PI controller are found using the CBMO under a multi-objective optimization framework. The Response Surface Methodology (RSM) is incorporated into the developed procedure to achieve a compromise solution among the different objectives. To prove the effectiveness of the new proposal, a benchmark MG is tested under various scenarios, 1) isolate the system from the grid (autonomous mode), 2) islanded system exposure to load changes, and 3) islanded system exposure to a 3 phase fault. Extensive simulations are performed to validate the new method taking conventional data from PSCAD/EMTDC software. The validity of the suggested optimizer is proved by comparing its results with that achieved using the LMSRE-based adaptive control, sunflower optimization algorithm (SFO), Ziegler-Nichols method and the particle swarm optimization (PSO) techniques. The article shows the superiority of the suggested CBMO over the LMSRE-based adaptive control, SFO, Ziegler-Nichols and the PSO techniques in the transient responses of the system.


A. LITERATURE SURVAY
Because of the ever-increasing demand for electric energy and growing environmental concern about pollution and greenhouse gas emissions, the energy market is increasingly embracing distributed energy resources (DERs) such as fuel cells, photovoltaic (PV) systems, micro-turbines, wind farms, etc. [1][2][3][4]. Most of the DERbased distributed generators (DGs) are connected to the electric grid using voltage source inverters (VSIs) [5]. These inverter-based DGs have entirely different physical properties than traditional synchronous generators (SGs). As a result, various control techniques for VSIs based on DGs are necessary for desired control action. The SG, for example, has a high inertia because of its huge spinning mass, which contributes to grid stability by sustaining the grid frequency. The lack of inertia and rotational mass in DGs creates technical difficulties, such as the requirement for storage units and suitable regulatory systems to maintain grid stability. As a result, the concept of the microgrid (MG) is being promoted.
The MG is a controlled structure made up of numerous DG units, loads, and storage facilities that are all tied to a local network. The MG can be operated in off-grid or in grid-connected modes [6]. MGs are frequently located near loads to reduce the transmission losses, offer reliable power supply and permit several RESs to collaborate in a distributed form, leading to greater supply security. The grid sets the operating voltage and frequency in the gridconnected mode. On the other hand, the VSI has to maintain these functions in islanded mode [7][8][9]. In this regard, the control of VSI interfaces becomes more difficult [10][11].
Advanced control systems are therefore employed in off-grid mode to guarantee applicable and reliable operation. These control systems are grouped into 3 classes, droop-based control, centralized control, and multivariable and servomechanism (MVAS) techniques. Droop control is utilized in relying on SG droop characteristics, to offer peer-to-peer control and plug-and-play features by independently managing the power output of separate DG units without the need for interaction or coordination among DGs. A wireless control strategy concentrated on P-Q droop management has been recommended [12]. In [13], a complete decentralized method relying on dualfrequency-droop control is offered. The capacity of autonomously regulate distributed units without interaction among them is one of the advantages of utilizing droopbased control. This scheme outperforms other powersharing and MG frequency regulation methods in terms of robustness and consistency. But, for low voltage MGs with resistor line impedance, droop control efficiency is strongly impacted by line impedance, leading to power couplings [14]. The virtual vector transformation technique has been enhanced [15] to evade power coupling, but it reduces the stability of the system. On the contrary, centralized control techniques need high bandwidth interconnections and any breakdown of such links might result in a microgrid failure. In [16], A centralized control system for DC MG based on autonomous communication has been designed and deployed. To end with, a novel approach for developing multivariable resilient servomechanism systems for multiinput multi-output open-loop stable systems has been suggested in [17]. Unfortunately, its great complexity is a burden.
For nonlinear problems, it is found that the most frequently applied controller is the proportional-integral (PI) scheme due to its great stability margin. Unfortunately, it struggles with parameter fluctuation sensitivity and network nonlinearity. As a result, determining the appropriate PI controller settings in this nonlinear system is a significant problem.

B. RESEARCH GAP AND MOTIVATION
In the past few years, extensive research has been done to design the optimum controller for MG systems to assure successful performance. In this regard, PI controllers maintain the voltage source converter (VSC) voltage with the aid of a d-q frame [18]. PI controllers are regulated using simple approaches like the Zigler Nicholas [19] method when assuming linearity of the system. Conversely, the PI controller creates a saturation outcome, decreasing the control stability margin as a result of a more significant phase lagging. Controllers are frequently responsive to changes in parameters and operating conditions [20]. In [21], a distributed PI controller to regulate a hybrid power system P&Q is presented. Subsequent, numerous optimization techniques, including particle swarm optimization (PSO) [22], Heap optimization algorithm (HOA) [23], genetic algorithm (GA) [24], sunflower optimization algorithm (SFO) [25], hybrid firefly and particle swarm optimization technique [26], Salp swarm algorithm [27], hybrid GWO-PSO optimization technique [28], hybrid cuckoo search algorithm and grey wolf optimizer (CSA-GWO) [29], equilibrium optimization algorithm (EO) [30], and Whale Optimization Algorithm (WOA) [31], have been used in the MG to enhance decentralized controllers. As reported in [32], these approaches have however advantages and disadvantages, being still so far to get a universal framework for MG control.
This paper contributes to this pool by developing a novel methodology for optimal control of islanded MGs based on the coot bird metaheuristic optimizer (CBMO). In this research, this optimizer is used in a PI controller optimal control scheme with various PI controller gains to enhance the efficacy of the islanding microgrid operation. Furthermore, the Response Surface Methodology (RSM) is considered to attain a compromise solution among objectives under a multi-objective optimization paradigm. To validate the new proposal, various simulations are carried out to show the superiority of the suggested CBMO in the transient responses of the system over Ziegler-Nichols and some other optimization techniques, such as the LMSRE-based adaptive control, SFO and the PSO techniques.

C. CONTRIBUTION AND PAPER BODY
To cover the gaps previously exposed, this article contributes with: 1) Developing a novel methodology based on CBMO to adjust PI controllers to improve the efficiency of the MG system, 2) Evaluate the reliability of the suggested optimizer through experiment the MG under various operating modes, i) cut the system off the grid (autonomous mode), ii) islanded system interrupted by a load changes, and iii) islanded system interrupted by a 3 phase fault, 3) Proving the validity of the offered optimizer through comparing its results with that achieved using the LMSRE-based adaptive control, SFO and, Ziegler-Nichols the PSO techniques. The leftover sectors of the article are ordered in this way. Sector II demonstrates the MG demonstrating. Sector III explains the control plan. Sector IV shows the design procedures. Sectot V shows the modelling stage of the Response Surface Methodology (RSM), SFO, LMSRE adaptive control, Ziegler-Nichols and the CBMO. Sector VI introduces the simulation results and discussion. Lastly, the conclusion is introduced in Sectot VII.  The study MG can be operated either in grid-connected or in stand-alone mode. The DG operates in power control mode when connected to the grid. It is worthy to note that the grid sustains the voltage and frequency. Conversely, in the off-grid mode, the DG is in charge of balancing demands and generation. Moreover, it adjusts the voltage and frequency to sustain them inside acceptable ranges. This study focuses on improving the MG under off-grid operating mode by employing the cascaded control method, which is detailed in the following sector.

III. CONTROL PLAN
In each DG, the cascaded control scheme is used to stabilize the voltage at the PCC. The reference voltages (V conv_a * , V conv_b * , V conv_c * ) are achieved by the Inverse Clarke Transformation of the d-q reference voltages (V conv_d * , V conv_q * ) and the transformation angle (θ PLL ). V conv_d * and V conv_q * are given with the aid of the 4 PI controllers as seen in Fig. 2. θ PLL is taken from the phaselocked loop by taking the data of the voltages of the grid in the inputs. The inverter switches pulses are achieved with the aid of the comparator that compares a 1980 Hz (60 HZ multiples) triangular signal and the reference voltages (V conv_a * , V conv_b * , V conv_c * ). The gains of the 4 PI controllers are determined using the CBMO method and other optimization techniques. Section IV goes into further depth on this.   3 . In this article, three levels are utilized for the controllers' variables, which are summarized in Table 2. where i=1, 2, 3, 4, and M 1 , M 2 …, M 15 are the computed RSM coefficients for the scenarios are reported in Table  A4, Table A5, and Table A6 in the Appendix.

V. OPTIMIZATION STAGE:
Eq. (1) relies on the weighting technique [34] is utilized as an input to the CBMO, SFO, and PSO techniques to achieve the optimum PI gains that reduce the transients. The weights utilized in the multi-objective function are listed in Table 3.

A. THE SFO ALGORITHM
The advancement of soft computing capability is the primary impetus for using SFO in the optimization of various issues. The SFO is a natural-motivated heuristic method. Its basic concept is to simulate the configuration of sunflowers to gather sunlight [25]. Daily basis, the sunflower pattern is replayed, started in the sunrise tracking the sunlight and ending in the sundown. The sunflower back into its original place in the evening, waiting for the sun to appear. Each sunflower is thought to have only one pollen gamete. Radiation from the inverse square rule is critical in this case. Because sunflowers absorb a tremendous quantity of energy from the sun relative to those further away. The sunflowers near to the sun tilt toward calm in this location [25]. Eq. (2) indicates the heat absorbed by each population.
where W is the power source, and r s denotes the distance between the most frequent best and population i. Eq. (3) illustrates the movement of sunflowers [13], while the movement of sunflowers in the direction of "m" is given by Eq. (4).
where z is the population, z* is the best population, np is the population number, A is a constant that characterizes the "inertial" motion of the sunflowers and (|| + −1 ||) is the pollination possibility. Eq. (5) specifies the constraint of these phases: where Z max and Z min are the minimum and maximum boundaries, respectively. The following plant is defined as follows.
For the sake of clarity, the overall procedure of SFO is summarized in the flowchart of Fig. 3, while the results for this algorithm were taken from [6].

B. LMSRE ALGORITHM
The adaptive filtering algorithms (AFAs) are normally utilized to discover the impulse response weight vector (G 0 ) filter [35], as represented in Fig. 4. The input F q is implemented as a Gaussian noise N q going over FIR filter. Consequently, it depends on the error e q . The AFAs are iterated using the steepest descent technique, as indicated in Eq (7).
where q is the iteration number and W q expresses the estimated vector of the weight. Next, the gradient of the cost function is achieved from Eq. (8).
By substituting Eq. (7) into Eq. (8) one obtains where μ q is set to bound the errors. For instance, for the giant error, μ q must be large for quick convergence. Conversely, for a minor error, μ q needs to be reduced. So, β q diverges from [0, 1], and is reduced for small errors and vice versa. Therefore, μ q diverges proportionately to the β q which stated in eq.(10).
μ q = μβ q α−1 (10) where μ and α are in control of deviation of μ q . Then, replacing Eq. (9) into Eq. (10) yields G q+1 = G q − μβ q α sign(e q ) ⋅ F q (11) The LMSRE method is used to modify the PI Controller methods that rely on eq (11). The following are the adjusted PI parameters: The opening PI gains (k p and T i ) for the six PI controllers (PI 1.1 to PI 3.2 ) are achieved manually by testing the system in its boundaries, where stated in Table 4. The outputs of LMSRE were taken from [6].

C. ZIEGLER-NICHOLS
A conventional control technique for fine-tuning PI gains named Ziegler-Nichols is presented. This technique initiates by zeroing the K p and T i , then increases the K P until the system critically stable. The K P at this point named K cr and the critical period named Pcr. The PI gains are determined according to Table 5 [36].

D. OPTIMIZATION USING CBMO
The CMBO mimics the behaviour of a group of American coots swimming in a lake [37]. The primary algorithm was developed based on the behaviours of American coots when travelling in a lake, particularly when confronted with excessive waving and environmental conditions [38], [39]. Lukeman et al. examined how to surf scoters change their configurations to travel in line with the big waves. The coots are travelling in a dense flock in front or behind [40]. They organize themselves in two or three dimensions to migrate and change between two phases. The first is an unstructured stage characterized by low density and non-homogeneous coot body directions. However, the other stage is characterized by high density, uniform coot body motions, and velocity. By travelling over a long distance, coots can accelerate their movements in three dimensions.
The coots can move between the first and the second phase utilizing one of two techniques. The first is to accelerate certain nearby coot followers and change their locations so that they are aligned with other coots and enhance the orientations of coot leaders. The second strategy is to promote coot followers with great potential as leaders rather than leaders with poor results. The time necessary to go from one phase to the next is determined by the density of the coots. The coot leaders are calculated as a percentage of the total estimated coot "populations, Npop," while the rest are coot followers.The places of followers (Poscoots0) and leaders (Posleader) are chosen at random as presented in eq. (15)(16), respectively. (16) where U b denotes the upper limit and L b denotes the lower limit. All of Coot's followers' fitness Fit coots could be calculated utilizing the OF (F obj ) as shown in eq. (17).
Furthermore, the OF may be used to assess the fitness of all Coot's leaders by Eq. (19). The Gbest score and its position Gbest pos are distinguished by eq. (20).
where Nleaders is the number of Coot's leaders (%Npop). Each of the Coot's followers is allocated to a Coot leader based on a random process, and their locations are updated appropriately, beginning with iteration two and ending with the maximum number of iterations (IT max ) as presented in Eqs. (21) and (22). The locations of the new followers are verified to ensure that they are within the parameters specified in Eq. (22). R = 1 + 2. Rand coots (21) P 0Scoot (i) = 2 ⋅ Rand coots ⋅ cos(2πR) ⋅ [P 0sleaders (k) − P 0Scoot (i)] + P 0sleaders (k), ∀ N coots and kϵN leaders (22) where Rand coots are the randomly produced values of the Coot's followers and Rand leaders are the randomly created values of the Coot's leaders.
The new fitness of all Coot's followers is assessed and compared to the fitness of the leader. If a follower fitness exceeds that of its associated leader, the follower becomes a leader, and the leader becomes a follower. This process is shown in Eq. (24). The locations of the leaders are enhanced using a random function, as shown in Eqs. (25), and (26). (25) [P 0sleaders = B ⋅ Rand leaders ⋅ cos(2πR) ⋅ [Gbest pos − P 0sleaders (i)] + Gbest pos (26) where IT(L) denotes the iteration L. For the sake of summary, the flowchart of CBMO is presented in Fig. 5.
The best global score and position are determined in eq. (27).

VI. SIMULATION RESULTS AND DISCUSSION
This sector is devoted on proving numerical results with the aim of demonstrating the validity and efficacy of the proposed control method based on CMBO. As a major indicator, the effectiveness of the new proposal will be evaluated as its capacity to keep the PCC voltage around the specified ranges in different MG operative modes. The soberness of the controller scheme is demonstrated through the simulation outcomes, where taken from the PSCAD/EMTDC environment. To prove the superiority of the CMBO-based methodology developed, it is compared with the results obtained with the LMSRE-based adaptive control, SFO, Ziegler-Nichols and the PSO techniques reported in [6]. The system has been experimented under different microgrid operating modes, 1) isolate the system from the grid (autonomous mode), 2) islanded system exposure to load changes, and 3) islanded system exposure to a 3-phase fault.

A. SCENARIO 1 (OFF-GRID MODE)
In the first scenario, the MG run at normal states and connected to the grid. The MG is abruptly separated from the grid (islanding) at time equal to 2 second. The Ziegler-Nichols Critical gains (k cr ) and Critical periods (P cr ) for the DGs are reported in Table 6. The optimum PI gains data for the DGs for CBMO, SFO, PSO, Ziegler-Nichols and LMSRE are reported in Table 7. Figs. 6 (a, b, c)  Initialization of COOT's followers and leaders positions randomly using (15) and (16), respectively Calculate the fitness of each COOT's follower using (17) and update the best position and the corresponding best score using (18) Calculate the fitness of each COOT's leader using (19) and update the best position and the corresponding best score using (20) for l = 2:IT max Generate random values using (21)

B. SCENARIO 2 (LOAD CHANGING)
In the second scenario, the MG run at normal states and in the stand-alone mode. The MG initially operates implemented with RLC loads, where stated in Table 1. R12 is varied from 150 Ω to 300 Ω at t = 3 s and back to its original state at time=3.4 s. The Ziegler-Nichols Critical gains (k cr ) and Critical periods (P cr ) for the DGs are reported in Table 8. The optimum PI gains data for the DGs for CBMO, SFO, PSO, Ziegler-Nichols and LMSRE are introduced in Table 9. Figs. 8 (a, b, c) shows the reference voltage in each DG for CBMO, LMSRE, SFO, Ziegler-Nichols and PSO. Figs. 9 (a, b, c) plot the active and reactive powers for the load in the DGs for CBMO, SFO, PSO, Ziegler-Nichols and LMSRE. It is worthy to note that, in Fig. 8a, the MPUS and MPOS for the load variability scenario for the offered technique are below 1%. Furthermore, the T set relies on the 2% criterion for the proposed controller is reduced to zero seconds, and the E ss is 0.38%. Thus, the introduced optimizer offers the least overshoots, quick damping, and applicable E ss . It is worthy to recognize that, in Fig. 8a, the real load power of DG 1 is reduced from 2.6 MW to 0.5 MW and restored to its original value efficiently at t=3.4 s. Alternatively, the real load powers for the rest DGs have quick damping with lesser oscillations. It is worthy to note that the CBMO is much better in MPUS, MPOS, T set , and E ss over LMSREbased adaptive control, SFO, Ziegler-Nichols and the PSO techniques, which verify the rigidity, validation, and applicability of the presented CBMO over LMSRE-based adaptive control, SFO, Ziegler-Nichols and the PSO techniques.

C. SCENARIO 3 (3-PHASE FAULT)
In scenario 3, the MG run at normal states and in the stand-alone mode. Then, a 3-phase fault is applied at PCC 1 at t=4 s, and the fault is removed at t=4.1 s. The Ziegler-Nichols Critical gains (k cr ) and Critical periods (P cr ) for the DGs are reported in Table 10. Table 11 introduces the optimum PI gains data in the DGs for CBMO, SFO, PSO, Ziegler-Nichols and LMSRE. Figs. 10 (a, b, c) plot the reference voltage in the DGs for CBMO, LMSRE, SFO, Ziegler-Nichols and PSO. Figs. 11 (a, b, c) show the active and reactive powers for the load in each DG for CBMO, SFO, PSO, Ziegler-Nichols and LMSRE. It is worthy to note that, in Fig. 10a, the T set relies on the 2% criterion for the offered optimizer is 24 ms, and the E ss is 0.31%. Thus, the introduced opimizer offers quick damping and applicable E ss . which verify the rigidity, validation, and applicability of the presented CBMO over LMSRE-based adaptive control, SFO, Ziegler-Nichols and the PSO techniques.

VII. CONCLUSIONS
A new PI controller optimal design based on CMBO has been developed in this paper. The new proposal considers various PI controller parameters to enhance microgrid efficiency. The control method employs six PI controllers.
Extensive simulations were performed on a benchmark MG, with the aim of validating the developed methodology. The practicality of the control scheme is demonstrated by the simulation data, which is taken from the PSCAD/EMTDC software. The results evidenced that the proposed controller is able to keep stable the active and reactive powers simultaneously and effectively regulate the voltage profile. Results obtained also confirmed rapid damping in transient response with a quick T set and a slight E ss under several microgrid operating conditions, 1) isolating the system from the grid (autonomous mode), 2) islanded system exposure to load change, and 3) islanded system exposure to a 3 phase fault.
The suggested optimizer was validated by comparing its results with those achieved using the LMSRE-based adaptive control, SFO, Ziegler-Nichols, and the PSO techniques. In all the studied scenarios, CBMO attained lower values of the transient responses than those obtained via the LMSRE-based adaptive control, SFO, Ziegler-Nichols and the PSO techniques. More precisely, the CMBO was able to improve the voltage MPUS up to 74%, 77.8%, 85% and 86% compared with LMSRE-based adaptive control, SFO, Ziegler-Nichols and the PSO techniques, respectively. The new proposal was also able to reduce T set by 100% in scenario 2, when the MG suffers an abrupt load variation in off-grid mode.
The upcoming research will concentration on strengthening the presented CBMO based PI controller to modify the power system requests, energy storage strategies, and smart-grids, reaching optimal comebacks in the green energy systems.