A Novel Ultra Local Based-Fuzzy PIDF Controller for Frequency Regulation of a Hybrid Microgrid System with High Renewable Energy Penetration and Storage Devices

: A new ultra-local control (ULC) model and two marine predator algorithm (MPA)-based controllers; MPA-based proportional-integral-derivative with ﬁlter (PIDF) and MPA-based Fuzzy PIDF (FPIDF) controllers; are combined to enhance the frequency response of a hybrid microgrid system. The input scaling factors, boundaries of membership functions, and gains of the FPIDF con-troller are all optimized using the MPA. In order to further enhance the frequency response, the alpha parameter of the proposed ULC model is optimized using MPA. The performance of the pro-posed controller is evaluated in the microgrid system with different renewable energy sources and energy storage devices. Furthermore, a comparison of the proposed MPA-based ULC-PIDF and ULC-FPIDF controllers against the previously designed controllers is presented. Moreover, a vari-ety of scenarios are studied to determine the proposed controller’s sensitivity and robustness to changes in wind speed, step loads, solar irradiance, and system parameter changes. The results of time-domain simulations performed in MATLAB/SIMULINK are shown. Finally, the results demonstrate that under all examined conditions, the new ULC-based controllers tend to further enhance the hybrid microgrid system’s frequency time response.


Introduction 1.Background and Motivation
Due to the recent rise in load demand, new electricity liberalization policy, and rapid depletion of fossil resources, the electric power system has undergone several changes.The microgrid notion has also been developed as a result of environmental concerns and industrial growth, and renewable energy sources (RES) have been included into modern power systems [1].The microgrid is a small system that includes distributed energy resources, commercial and residential loads, and storage devices, as well as centralized and decentralized controllers [2].Frequency instability in the microgrid system can be caused by unpredictable renewable energy sources, weak power converter inertia, and abrupt changes in load disturbance.Therefore, appropriate control methods are required to guarantee the microgrid's power quality [3].

Literature Review
In previous literature, several studies on load frequency control (LFC) examining methods of various controls for effective power system operation have been presented.The classical controllers are usually mentioned as integer order controllers.Because of their simplicity, these controllers are used in a lot of LFC publications.In addition, a variety of optimization techniques have been proposed to tune the parameters of proportionalintegral-derivative (PID) control, such as the technique of whale optimization [4], the enhanced genetic algorithm technique [5], the optimization of particle swarm [6], the optimization of the lightning attachment procedure [7], the technique of marine predator [8], the optimizer of social spider [9], and the technique of cuckoo search [10].In [11], the parameters of PID are set using the stability boundary position.The generation control of a combined cycle petrol turbine and thermal power system was automated by the authors of [12] using conventional P, PI, and PID controllers.
Moreover, it has been proposed that a PID adjusted using the quasi-oppositional chaotic selfish-herd approach can govern three hybrid microgrids comprising unequal wind systems, photovoltaic (PV) systems, and stored energy systems [13].Moreover, as shown in [14], the authors introduced a modified PID controller that combines a linear quadratic gaussian technique with it.This modified PID controller has a strong combined impact that can stabilize frequency in hybrid microgrid systems.In [15], the PID controller was altered by the addition of a derivative parameter (PIDD), and it was used as a frequency controller of a two-area power system considering thermal-reheat type systems.This optimization process was implemented using the teaching and learning-based optimization method.
Moreover, the integral order controllers have been designed with a higher degree of freedom to increase their flexibility and efficiency.The researchers in [16] suggest employing second-order degree of freedom-PID (2DOF-PID) and third-order degree of freedom-PID (3DOF-PID) controllers tuned using the grey wolf optimization approach as load frequency controllers for a multi-unit hydro-thermal connected system.Additionally, the 3DOF-PID controller, which was discussed in [17], has been tuned as an LFC for four interconnected area systems using the multi-verse optimization technique.The beginning phase of the uncontrolled load frequency controller operating condition was aided by these tactics.Moreover, it was found that power systems with high RES penetration might cause issues with reliability, deviation in frequency, instability in voltage, and low power quality.Regrettably, conventional PID struggles to deal with renewable energy resource fluctuation [18].

LFC with Conventional Control
In addition to the primary three parameters, the fractional order controllers offer an additional two degrees of freedom compared to the conventional PID controller [19].By doing this, the controller's efficiency, adaptability, and resilience are increased in comparison to the traditional PID controller.Fractional calculus serves as the foundation for these controllers [20].In addition, using the genetic technique, particle swarm optimization, and grasshopper optimization technique has improved the result of automatic generation regulation in multi-area systems by using the fractional order-PID (FOPID) controller [21,22].It has been confirmed in [23] that an automated voltage regulator (AVR) system operated by a FOPID controller utilizing the multi-objective chaotic approach is stable and resilient.By using a bacterial foraging optimizer to optimize the controller parameters, Datta et al. [24] used FOPID for simulating LFC to control an interconnected system with a hybrid wind turbine-based plant.The Egyptian national power grid frequency, which has been integrated with wind and photovoltaic energy sources, has been controlled using a non-linear FOPID controller [25], with the benefit of combining non-linear FOPID and PID controllers.A modified FOPID-LFC was also implemented for a system that is interconnected to RESs and electric automobiles.An artificial ecosystem optimizer was used by the controller [26].Furthermore, compared to the PID, the tilt integral derivative (TID) is superior in that it requires less tuning, has a lower effect on the response when the parameters of the system change, and has a higher ratio of disturbance rejection.A multi-area system's load frequency was controlled using a TID compensator and a variety of optimization techniques, including the technique of differential evolution [27] and the method of performance index [28].Moreover, the differential evolution (DE) optimization method has been suggested for a modified TID controller with a filter (TIDF) [27].
As classical controllers, the FO controllers may have more degrees of freedom to enhance their stability and robustness.The 2DOF-TIDF controller has been proposed as a load frequency controller [29] and was tested against the traditional FO controllers proving to be more effective.Recently, researchers have developed a 3DOF-FOPID controller, and its response has been compared to the 1DOF-FOPID and 2DOF-FOPID controllers [29].
The LFC problem has recently seen the introduction of smart controllers, such adaptive neuro-fuzzy inference systems, model predictive control, fuzzy logic control (FLC), and artificial neural networks.According to [30,31], the model predictive control has been used to stabilize a system made up of wind turbines.The model predictive control has been used in [32] as a LFC for three-area power systems, and its effectiveness has been proven by comparing it to the classical PID.In addition, as stated previously [33], a multi-verse optimizer has been used to tune the model predictive control for a sizable, interconnected power system.According to [34], Ismail et al. tested the model predictive control (MPC) robustness using four-area interconnected electric vehicles and power systems.

LFC with Advanced Control
The load frequency regulation of a system made up of many RES has also been implemented using an adaptive neuro-fuzzy inference system (ANFIS) employing the Ant Lion approach [35].The ANFIS was suggested by researchers in [36] as a way to preserve the frequency stability of hybrid multi-generational power systems in six domains.Moreover, in [37] ANFIS was trained using the PID controller settings of the NSGA-II method.Moreover, the ANFIS has been suggested as an LFC in [38], where it has been modified for frequency stabilization of two-area linked power systems using an artificial cooperative search method.Furthermore, the ANN controller has been used in integrated PV plant systems [39].The particle swarm optimization-based ANN technique has been taken into consideration in [40] to adjust the PID controller's parameters in a microgrid system.
Extensive research is now being done on combining FLC with fractional-order controllers or classical PID controllers.In order to control a steam engine for the first time, Mamdani employed FLC in 1974.For improved outcomes, the FLC provides greater accuracy.Therefore, optimizing the membership functions for each of the outputs and inputs could improve the system's overall performance [41,42].The disadvantage of FLC is that there are no predefined standards for any application.The researcher's system knowledge and expertise will determine this.
Two techniques were employed to enhance an integrated FLC-PID controller: the sine-cosine algorithm [43] and the marine predators algorithm [44].In [45,46], a controller of fuzzy-FOPID was constructed utilizing the differential evolution technique.The LFC of hybrid power systems is now regulated by one extra fuzzy PID [47].The performance of the proposed controller was improved by genetically optimizing the input and output parameters of the controller.Based on the mine blasting process, the authors of [48] suggested a novel Fuzzy-PID controller architecture for reheating thermal systems with multi-area load frequency regulation.The system considered the governor dead zone effect and the nonlinear limitations of the turbine generation rate.The Tribe-DE optimization technique was presented by the authors of [49] as a fuzzy self-tuning PID controller capable of load frequency regulation under external disturbances and parametric existence uncertainty.
Furthermore, a relatively new controller known as an intelligent or adaptive PI or PID controller has been used in controlling the water level in tanks.This controller uses ultra-local control, a model-free predictive control, with the conventional PI and PID controllers making them robust and intelligent [50,51].This type of control has also been used in [52] as a current controller for a three-phase voltage source pulse width modulation (PWM) rectifier.A new sensor that uses machine learning-based ULC for chemotherapeutic control and adjustment has recently been built and is described in [53].The results show enhanced performance [50][51][52][53].Hence, the authors of this paper decided to use the ultralocal control scheme and investigate its availability to enhance the performance of load frequency controllers.

Contributions and Paper Organization
The novelty of this paper can be summarized as follows: • A new combination of parallel ultra-local control (ULC) with classical PIDF and intelligent Fuzzy PIDF controllers has been proposed to solve the LFC problem.

•
The gains of the PIDF controller, the primary parameter of the ULC, as well as the input scaling factors and gains of the fuzzy PIDF controller are optimized using the MPA, a recent optimizer.

•
Improving the proposed controller's effectiveness by utilizing MPA to optimize the fuzzy controller's membership function bounds.

•
Evaluating the suggested controller's resilience and efficacy in a hybrid microgrid under various scenarios, including the use of renewable energy sources and storage technologies.
This paper is organized as follows as well: The mathematical model of the components of the case study system is shown in Section 2. Section 3 explains the marine predator algorithm technique, while Section 4 goes into great depth on the examined controller's structure.The results of several simulations are discussed in Section 5.The study's result is presented in the finding part, Section 6.

System Structure
The recommended case study is a hybrid microgrid system made up of two locations connected by a tie-line, as shown in Figure 1.A load, a superconducting magnetic energy storage (SMES) device, a wind energy source, and a diesel engine with a valve actuator are all shown in Area 1.  Table 1.Values for model parameters [43].A battery energy storage (BES) device, a PV energy source, a valve, a load, and a diesel generator are all present in Area 2. Each area additionally uses the suggested ULC-Fuzzy PIDF controller to regulate system frequency and preserve system stability under a range of operating circumstances, including changes in solar irradiation, variable load disturbances, variations in wind speed, and adjustments to system parameters.In the suggested model, it is anticipated that each PV system, diesel generator, and wind turbine system will provide roughly 25% of the microgrid's total load.Additionally, it is believed that each area's storage has a capacity equal to the amount of linked renewable energy.As shown in Table 1 [48], every element of the microgrid is presented as a linear, first-order transfer function model.

Systems Transfer Function Parameters
Diesel generator

MPA Optimization Algorithm
MPA has the advantages of a simple algorithm design, with relatively good accuracy and stable results across several runs.Its benefit is that the population's first solution is generated and the population variety is increased by chaotic mapping's good traversal and randomization.Nevertheless, due to the lack of population variety in the late stages of optimization, MPA might quickly enter a local optimum.The MPA optimization process is divided into 3 stages and takes into account ratios of various velocities while modeling the prey and predator whole life cycle.The MPA approach's main phases may be described as follows: Initialization: Recommended variable random positions, the prey matrix during initialization, and the elite matrix are generated, where elite matrix repeats vector position with optimum fitness function.
Phase 1: This stage is distinguished by a ratio of high-velocity v ≥ 10 for great exploration capabilities [33]: → where → S i the magnitude of the predator's steps, → R B is a random number vector based on the normal distribution of Brownian motion, → R is a number at random between [0, 1], and n is the ratio of search agents to the population.
Phase 2: The unit velocity ratio identifies this stage (i.e., v ≈ 1) [33] as follows: where R L is a vector of random integers based on the normal distribution of the Levy motion.But, according to the Brownian technique, Equations ( 5) and ( 6) are used to update the second half of the population as follows: → Equation ( 7) can be used to determine X f , a factor that controls the predator's stride length: Stage 3: A feature of this phase is the low-velocity ratio.(v = 0.1) as follows: While Iter > 2 3 Iter max → Finalizing: The elite matrix refreshes the top solutions following each iteration, and the ultimate solution is discovered following the last iteration.Figure 2 depicts the essential phases of the MPA optimization process.Also, the suggested ULC-based controllers (i.e., adaptive or intelligent controllers) and the issue formulation will be described in the next part.

Formulation of the Problem and the Proposed Controller Structure
As previously mentioned, the load frequency problem discussed in this paper will use ultra-local control (ULC) based controller structure to improve the microgrid performance.Ultra-local control is a model-free predictive control, where the system model is not detailed and is instead approximated with a differential Equation ( 10) meant to capture the system dynamics ()  = () +  * () (10) where () is the system output (ACE1, and ACE2) in our problem, () is the system input (generator's reference power settings ),  is the differential equation order (taken to be 1 as a small sampling time is considered), () is a time-varying function that includes all of the system's structural information as well as the many potential disruptions, and finally,  is a non-physical constant that is chosen (MPA optimized in our case) to match the RHS and LHS of Equation (10).Moreover, F is calculated in our study using Heun's discrete equation (with a small sampling time of 0.01 s) as in (11) [52].
where,   is the sequence length (unity in our study),   is the sampling time,  is an integer sample counter, F1, and F2 are functions of the system output and input and are given as:

Formulation of the Problem and the Proposed Controller Structure
As previously mentioned, the load frequency problem discussed in this paper will use ultra-local control (ULC) based controller structure to improve the microgrid performance.Ultra-local control is a model-free predictive control, where the system model is not detailed and is instead approximated with a differential Equation (10) meant to capture the system dynamics y(t where y(t) is the system output (ACE 1 , and ACE 2 ) in our problem, u(t) is the system input (generator's reference power settings), v is the differential equation order (taken to be 1 as a small sampling time is considered), F(t) is a time-varying function that includes all of the system's structural information as well as the many potential disruptions, and finally, α is a non-physical constant that is chosen (MPA optimized in our case) to match the RHS and LHS of Equation (10).Moreover, F is calculated in our study using Heun's discrete equation (with a small sampling time of 0.01 s) as in (11) [52].
where, n f is the sequence length (unity in our study), t s is the sampling time, k is an integer sample counter, F 1 and F 2 are functions of the system output and input and are given as: Furthermore, for ultra-local based controllers (also known as intelligent or adaptive controllers), the ultra-local model predictive block is applied as shown in Figure 3. Hence, the new system input u(t) becomes as follows: where dy/dt is the output rate of change and is set to zero in our case, θ(e) is the original controller function which is once taken as PIDF controller and once as a Fuzzy PIDF controller (see Figure 4) whose rules are shown in Table 2 and whose scaling factors, gains, and membership function are MPA optimized.Furthermore, for ultra-local based controllers (also known as intelligent or adaptive controllers), the ultra-local model predictive block is applied as shown in Figure 3. Hence, the new system input () becomes as follows: () = −+/+()  (14) where / is the output rate of change and is set to zero in our case, θ(e) is the original controller function which is once taken as PIDF controller and once as a Fuzzy PIDF controller (see Figure 4) whose rules are shown in Table 2 and whose scaling factors, gains, and membership function are MPA optimized.Figure 5 depicts the whole model of the ULC-fuzzy PIDF-based MPA.In order to keep things simple, Figures 6-8 depict the five triangle membership functions that were employed in this work for FLC inputs and outputs [43].They are also known as zero (Z), small positive (SP), small negative (SN), and large positive (LP) (SN).The membership functions of the error input (E) are between [−1, 1] and [−0.2, 0.2], respectively, according to Figure 6.The error change (CE) input membership functions with a triangular Z membership basis between [−0.35, 0.35] are shown in Figure 7. Figure 8 shows the output control signal's membership functions (u).The fuzzy logic controller (FLC) implementation process is detailed below [2,43]: (1) Fuzzification: In this stage, the FLC transforms the error (E) and change of error (CE) variables into five language variables (LP, LN, Z, SP, SN). ( 2) Rule base formation: The FLC uses Mamdani fuzzy inference (FIS) to build fuzzy rules based on the linguistic variables obtained through the fuzzification process, as illustrated in Table 2.The experience of the creator determines the FLC's rule foundation.To get the best possible reaction, each system has its own set of rules.
(3) Defuzzification.The defuzzification process uses linguistic variables, which are the system's outputs, as inputs.Also, when using a bisector defuzzification method, the defuzzification procedure turns these variables into crisp variables [2,43].
First, we have implemented the procedures and equations of the MPA optimization algorithm (Equations ( 1)-( 9)) using an m-file in MATLAB.Then, we have modeled the two-area microgrid system using MATLAB/Simulink including the ULC-fuzzy PIDF controller with its unknown model parameters (k1, k2, kp, ki, kd, N, α).Finally, the MPA optimization algorithm (m-file) can be linked to the system control model (Simulink) shown in Figure 5 using the 'sim' command in MATLAB to get the optimal parameters of the controller.
By decreasing the fitness function (FF), one may achieve the ULC-fuzzy PIDF controller's optimal gains [2,43]: where ∆ 1 is F 1 represents the frequency deviation in region 1 and F 2 represents the frequency deviation in area 2 and ∆ − is the variance in tie-line power.Moreover, the suggested MPA is used to tune the controller settings under the following restrictions [43]:

Stability Analysis
One of the most crucial needs for any closed-loop system is stability, which is why it is examined in this part for the suggested controller.The Lyapunov approach [54], which is based on looking for a positive definite function of the state with a negative temporal The fuzzy logic controller (FLC) implementation process is detailed below [2,43]: (1) Fuzzification: In this stage, the FLC transforms the error (E) and change of error (CE) variables into five language variables (LP, LN, Z, SP, SN). ( 2) Rule base formation: The FLC uses Mamdani fuzzy inference (FIS) to build fuzzy rules based on the linguistic variables obtained through the fuzzification process, as illustrated in Table 2.The experience of the creator determines the FLC's rule foundation.To get the best possible reaction, each system has its own set of rules.
(3) Defuzzification.The defuzzification process uses linguistic variables, which are the system's outputs, as inputs.Also, when using a bisector defuzzification method, the defuzzification procedure turns these variables into crisp variables [2,43].
First, we have implemented the procedures and equations of the MPA optimization algorithm (Equations ( 1)-( 9)) using an m-file in MATLAB.Then, we have modeled the twoarea microgrid system using MATLAB/Simulink including the ULC-fuzzy PIDF controller with its unknown model parameters (k 1 , k 2 , k p , k i , k d , N, α).Finally, the MPA optimization algorithm (m-file) can be linked to the system control model (Simulink) shown in Figure 5 using the 'sim' command in MATLAB to get the optimal parameters of the controller.
By decreasing the fitness function (FF), one may achieve the ULC-fuzzy PIDF controller's optimal gains [2,43]: where ∆F 1 is F 1 represents the frequency deviation in region 1 and F 2 represents the frequency deviation in area 2 and ∆P tie−line is the variance in tie-line power.Moreover, the suggested MPA is used to tune the controller settings under the following restrictions [43]:

Stability Analysis
One of the most crucial needs for any closed-loop system is stability, which is why it is examined in this part for the suggested controller.The Lyapunov approach [54], which is based on looking for a positive definite function of the state with a negative temporal derivative, is one of the most well-known techniques for stability analysis.A time-invariant state space model can be used to represent any multivariable system as shown below [54]: .
where x(t) is the state vector, .
x(t) is the derivative of the state vector, u(t) represents the input to the system, and y(t) is the system output.The constant matrices of the system are A, B, C, and D. The system is considered stable by the Lyapunov approach if all eigenvalues of the symmetric positive definite matrix (P) are positive and the derivative of the Lyapunov function V(x) is negative [54].In addition, the Lyapunov function and its derivative can be represented using Equations ( 19) and ( 20), respectively: Using the suggested controller, it was discovered that there were a lot of states in the hybrid two-area case study system.Yet, the Lyapunov theory has been used to demonstrate the closed-loop system's stability.Also, according to the Lyapunov approach, the P matrix's eigenvalues are all positive, which is a sign that the system is stable.

Results and Discussion
To demonstrate the efficacy of the suggested ULC-fuzzy PIDF controller, the simulation results for the microgrid under various uncertainties are shown in this section.In the first scenario, when the microgrid is subjected to a 5% step load disturbance in area 1, the performance of several MPA-based controllers, including the PIDF, ULC-PIDF, fuzzy PIDF, and ULC-fuzzy PIDF controllers, is compared (the design value).The stability and performance of the proposed MPA-based ULC-fuzzy PIDF controller are then evaluated under: 1.
Different small and large step load perturbations (SLP).

3.
A continuous random load variation.

4.
Integration of different RES fluctuations.

Scenario (I): Effect of Step Load Perturbation
In this case, Area 1 is subjected to a 5% step load disturbance without taking RES variation into account for controller design considerations.The alpha constants of the proposed MPA-based ULC-PIDF and ULC-fuzzy PIDF controllers are optimized using the MPA method with a population size of 15 each iteration and a total of 30 iterations, and then compared to the previously discussed MPA-based PIDF and fuzzy PIDF.The convergence curves of the MPA optimizer are shown in Figure 9, indicating fast convergence with lower fitness function (FF) values.Additionally, Table 3 lists the ideal FF values and ideal design parameters for various controllers.It can be seen that, especially for the ULC-fuzzy PIDF combination, adding the ultra-local controller to the previous controllers can produce better FF than the conventionally designed controllers.The optimum FF value can be improved with the ULC-fuzzy PIDF by approximately 71.42% compared to the conventional MPA-based fuzzy PIDF controller.In addition, the ULC-optimal PIDF's FF value is enhanced by around 75.3% when compared to the traditional PIDF controller.As a result, utilizing the suggested controller, where the ULC is applied to the MPA-based FPIDF and PIDF, the system's responsiveness was much enhanced.The dynamic response of the frequency deviations in Areas 1 and Area 2 (F1 and F2) as well as the tie-line power deviation (Ptie) under 5% SLP is shown in Figure 10 utilizing a variety of optimized controllers.It is therefore reasonable to claim that the MPA-based ULC-fuzzy PIDF controller is superior to conventional controllers at maintaining stability and boosting the performance of the microgrid.The standard MPA-based PIDF controller, as seen in Figure 10, has the lowest response, according to MO and MU.The dynamic response of the frequency deviations in Areas 1 and Area 2 (F1 and F2) as well as the tie-line power deviation (Ptie) under 5% SLP is shown in Figure 10 utilizing a variety of optimized controllers.It is therefore reasonable to claim that the MPA-based ULC-fuzzy PIDF controller is superior to conventional controllers at maintaining stability and boosting the performance of the microgrid.The standard MPA-based PIDF controller, as seen in Figure 10, has the lowest response, according to MO and MU.
(a)  The transient responses of the frequency deviations in Areas 1 and Area 2 (F1 and F2) as well as the tie-line power deviation (Ptie) under 5% SLP are shown in Figure 10 utilizing a variety of optimized controllers.It is therefore reasonable to claim that the MPA-based ULC-fuzzy PIDF controller is superior to conventional controllers at maintaining stability and boosting the performance of the microgrid.The standard MPA-based PIDF controller, as seen in Figure 10, has the lowest response, according to MO and MU.
The maximum overshoot (MO), maximum undershoot (MU), and settling time (Ts) for F 1 , F 2 , and P tie , respectively, are shown in Table 4 as the system dynamic results for 5% SLP.The lowest values of maximum overshoot, maximum undershoot, and settling time are given by the proposed MPA-based ULC-fuzzy PIDF controller, followed by the conventional MPA-based fuzzy controller and the ULC-PIDF.However, the MPA-based classical PIDF controller obtains the maximum value of maximum overshoot, maximum undershoot, and settling time.The suggested ULC-fuzzy PIDF controller generally enhanced the maximum undershoot, maximum overshoot, and settling time values of the system responses by around 98.8%, 98.45%, and 61.1%, respectively, as compared to the standard PIDF controller.The dynamic response of the frequency deviations in Areas 1 and Area 2 (F1 and F2) as well as the tie-line power deviation (Ptie) under 5% SLP is shown in Figure 10 utilizing a variety of optimized controllers.It is therefore reasonable to claim that the MPA-based ULC-fuzzy PIDF controller is superior to conventional controllers at maintaining stability and boosting the performance of the microgrid.The standard MPA-based PIDF controller, as seen in Figure 10, has the lowest response, according to MO and MU.The maximum overshoot (MO), maximum undershoot (MU), and settling time (Ts) for F1, F2, and Ptie, respectively, are shown in Table 4 as the system dynamic results for 5% SLP.The lowest values of maximum overshoot, maximum undershoot, and settling time are given by the proposed MPA-based ULC-fuzzy PIDF controller, followed by the conventional MPA-based fuzzy controller and the ULC-PIDF.However, the MPA-based classical PIDF controller obtains the maximum value of maximum overshoot, maximum un- Moreover, the designed MPA-based ULC-fuzzy PIDF controller stability robustness is tested at smaller and larger values of step load perturbations where step values are changed between 1% and 20%.Results presented in Figures 11 and 12 prove such stability robustness of the proposed controller at small and large load perturbations, respectively.Additionally, Table 5 gives values for the frequency time response, undershoot, and overshoot at the SLPs under consideration.
Additionally, Table 5 gives values for the frequency time response, undershoot, and overshoot at the SLPs under consideration.

Scenario (II): Sensitivity Analysis of System Parameters Change
The sensitivity analysis of the system's performance to a change in system parameters is presented in this scenario.This study aims to evaluate the proposed MPA-based ULC-fuzzy PIDF controller's performance and stability.In this scenario, the Td1, KSMES, B1, and B2 parameters all undergo a 25% change.Table 6 provides a summary of the study findings.As can be seen, when the aforementioned parameters change, F1, F2, and Ptie's dynamic responses are impacted.In addition, the values of maximum undershoot and maximum overshoot remain low, as proposed in typical operations.The settling time is not specified because it is constant across all cases.Similar to this, altering other system variables essentially has no impact on the system under the study's dynamic performance.As a result, the suggested ULC-fuzzy PIDF controller is strong and effective at preserving system performance and stability when system parameters change.The sensitivity analysis of the system's performance to a change in system parameters is presented in this scenario.This study aims to evaluate the proposed MPA-based ULCfuzzy PIDF controller's performance and stability.In this scenario, the T d1 , K SMES , B 1 , and B 2 parameters all undergo a 25% change.Table 6 provides a summary of the study findings.As can be seen, when the aforementioned parameters change, ∆F 1 , ∆F 2 , and ∆P tie 's dynamic responses are marginally impacted.In addition, the values of maximum undershoot and maximum overshoot remain low, as proposed in typical operations.The settling time is not specified because it is constant across all cases.Similar to this, altering other system variables essentially has no impact on the system under the study's dynamic performance.As a result, the suggested ULC-fuzzy PIDF controller is strong and effective at preserving system performance and stability when system parameters change.In this case, as shown in Figure 13, uncertain random load variation is applied to the power system.The load randomly alternates between 0 p.u. and 0.2 p.u. every 20 s.In order to confirm the performance robustness of suggested method, this scenario compares the proposed MPA-based ULC-fuzzy PIDF to MPA-based fuzzy PIDF, ULC-PIDF, and PIDF, as shown in Figure 14.

Scenario (IV): RES Fluctuation Effect
This case targets to evaluate the efficiency of the proposed ULC-fuzzy PIDF controller when subjected to real variable wind power in Area 1 (From the Zafarana Location, east of Egypt) and real variable PV power in Area 2 (From the Aswan Location, south of Egypt) simultaneously, as illustrated in Figures 15 and 16.Similar to the earlier cases, the ULCfuzzy PIDF and ULC-PIDF both exhibit improved performance when compared to a conventional fuzzy PIDF and a conventional PIDF, respectively, as demonstrated in Figure 17.

Scenario (IV): RES Fluctuation Effect
This case targets to test the efficacy of the proposed ULC-fuzzy PIDF controller when subjected to real variable wind power in Area 1 (From the Zafarana Location, east of Egypt) and real variable PV power in Area 2 (From the Aswan Location, south of Egypt) simultaneously, as illustrated in Figures 15 and 16.Similar to the earlier cases, the ULC-fuzzy PIDF and ULC-PIDF both exhibit improved performance when compared to a conventional fuzzy PIDF and a conventional PIDF, respectively, as demonstrated in Figure 17.

Scenario (IV): RES Fluctuation Effect
This case targets to evaluate the efficiency of the proposed ULC-fuzzy P when subjected to real variable wind power in Area 1 (From the Zafarana of Egypt) and real variable PV power in Area 2 (From the Aswan Location, so simultaneously, as illustrated in Figures 15 and 16.Similar to the earlier ca fuzzy PIDF and ULC-PIDF both exhibit improved performance when comp ventional fuzzy PIDF and a conventional PIDF, respectively, as demonstra 17.

Scenario (IV): RES Fluctuation Effect
This case targets to evaluate the efficiency of the proposed ULC-fuzzy P when subjected to real variable wind power in Area 1 (From the Zafarana of Egypt) and real variable PV power in Area 2 (From the Aswan Location, so simultaneously, as illustrated in Figures 15 and 16.Similar to the earlier ca fuzzy PIDF and ULC-PIDF both exhibit improved performance when comp ventional fuzzy PIDF and a conventional PIDF, respectively, as demonstra 17.

Conclusions
This study has successfully presented a new MPA-ultra-local control-based fuzzy PIDF controller to enhance the frequency response of a two-area linked hybrid microgrid.The hybrid system combines traditional diesel generation with renewable energy sources

Conclusions
This study has successfully presented a new MPA-ultra-local control-based fuzzy PIDF controller to enhance the frequency response of a two-area linked hybrid microgrid.The hybrid system combines traditional diesel generation with renewable energy sources such as wind and solar PV.Additionally, SMES & BES storage devices are each connected to an area.The marine predator algorithm (MPA), a recent metaheuristic optimization algorithm, was used to extract the best parameters for the suggested controller.The robustness, faster convergence, and higher accuracy of the MPA algorithm are benefits.Additionally, various uncertainties have been used to test the proposed controller's performance robustness, including a range of SLP values, random load variation, fluctuations in wind speed, and changes in solar irradiance.Results show that the MPA ULC-fuzzy PIDF controller greatly outperformed the traditional PID controller in terms of fitness function based on the ISE value 40 times.Additionally, for all scenarios, the MPA-based ULC-fuzzy PIDF controller outperformed the individual PIDF, ULC-PIDF, and fuzzy PIDF controllers in terms of frequency response and tie-line power deviation.A high degree of accuracy was also attained by the MPA-based ULC-fuzzy PIDF controller when some system parameters were altered by 25%.Additionally, the proposed controller performs better when exposed to variations in wind and PV power.In future work, the studied controller might be investigated with non-linear systems.

Figure 2 .
Figure 2. Flowchart of the MPA optimization method.

Figure 2 .
Figure 2. Flowchart of the MPA optimization method.

Figure 7 .
Figure 7. Optimal error-change input triangular membership functions.Figure 7. Optimal error-change input triangular membership functions.

Figure 7 .
Figure 7. Optimal error-change input triangular membership functions.Figure 7. Optimal error-change input triangular membership functions.

Figure 8 .
Figure 8. Optimal output control signal triangular membership functions.

Figure 8 .
Figure 8. Optimal output control signal triangular membership functions.

Figure 15 .
Figure 15.Profile of Wind power.

Table 2 .
The fuzzy logic controller's rule set.

Table 2 .
The rule set of the fuzzy logic controller.

Table 3 .
optimal performance and gains of various controllers in terms of fitness.

Table 3 .
optimal performance and gains of various controllers in terms of fitness.

Table 3 .
Optimal performance and gains of various controllers in terms of fitness.

Table 3 .
optimal performance and gains of various controllers in terms of fitness.

Table 5 .
Transient specifications based on ULC-fuzzy PIDF controller for different SLP.

Table 5 .
Transient specifications based on ULC-fuzzy PIDF controller for different SLP.

Table 6 .
Transient specifications based on ULC-fuzzy PIDF controller for system parameters variation.