Central Tunicate Swarm NFOPID-Based Load Frequency Control of the Egyptian Power System Considering New Uncontrolled Wind and Photovoltaic Farms

: This paper presents load frequency control of the 2021 Egyptian power system, which consists of multi-source electrical power generation, namely, a gas and steam combined cycle, and hydro, wind and photovoltaic power stations. The simulation model includes ﬁve generating units considering physical constraints such as generation rate constraints (GRC) and the speed governor dead band. It is assumed that a centralized controller is located at the national control center to regulate the frequency of the grid. Four controllers are applied in this research: PID, fractional-order PID (FOPID), non-linear PID (NPID) and non-linear fractional-order PID (NFOPID), to control the system frequency. The design of each controller is conducted based on the novel tunicate swarm algorithm at each operating condition. The novel method is compared to other widely used optimization techniques. The results show that the tunicate swarm NFOPID controller leads the Egyptian power system to a better performance than the other control schemes. This research also presents a comparison between four methods to self-tune the NFOPID controller at each operating condition.


Introduction
Egypt is facing a continuous increase in its population, which is leading to an increase in the electrical power demand. To face this situation, the Ministry of Electricity of Egypt decided to establish new power plants and transmission lines to generate and transfer electrical energy. The extension of the power system may lead to transmission lines overloading, islanding of some parts or even interference of the power system protection system [1]. Moreover, the share of renewable energies in power systems worldwide is in continuous increase, which leads to an observable reduction in the moment of inertia of the system. The reduction in system inertia leads to additional fluctuations in frequency [2]. The frequency fluctuations may lead to system black out which has happened several times, for example, in 2019 in the UK due to under-frequency load shedding.
The important role of load frequency control in power system operation has been recognized for several decades [3][4][5][6][7][8][9][10]. Different types of control methods have been applied. In [4], the authors compared between centralized and decentralized PID controllers to control the frequency of the Egyptian grid. In [5], the authors applied load frequency control in a power system using a coefficient diagram method (CDM) controller. In [6], the authors performed load frequency regulation on the conventional Egyptian grid using an FOPID controller, but they did not consider the renewable energy systems. In [7], the authors compared FOPID and PID controllers to regulate a standalone wind-dieselmicro-hydro system, showing the better performance of FOPID control. In [8], the authors

•
Presentation of novel central NFOPID control scheme in comparison with FOPID, NPID and PID control schemes which are employed to regulate the Egyptian power system frequency considering the average daily performance, integration and outage of demand and new renewable energy power plants; • Comparison between the new proposed optimization technique, which is tunicate swarm, with other state-of-the-art techniques such as TLBO, PSO and GA to design the controllers; • Comparison between different ways to self-tune the NFOPID controller parameters.
This paper is organized as follows: Section 2 presents the Egyptian power system overview and model, including renewable energy systems. Section 3 presents the configuration of each control scheme. Section 4 presents the design of the controllers using novel tunicate swarm. Section 5 presents the self-tuning idea of NFOPID. Section 6 presents the simulation results, while Sections 7 and 8 present the discussions and conclusions, respectively, of the main findings of the paper.

Egyptian Power System Description
The 2020 Egyptian power system is illustrated in Figure 1. The grid is divided into seven geographical zones which are: Cairo, Alexandria, Canal, Middle Egypt, Upper Egypt, East Delta and West Delta regions. Each region includes one or more of the following types of power stations as of 2016 [18]: i.
Steam or small gas power stations (non-reheat power stations) with total installed capacity of 15,500 MW; ii.
Combined-cycle power stations (reheat power stations) with total installed capacity of 15,000 MW; iii.
Hydro power stations such as High Dam and Aswan Dam which have installed capacities of 2100 MW and 550 MW, respectively; iv.

Photovoltaic Farm
The power produced from the photovoltaic system (using maximum power point tracking) can be formulated as (1) [12,20].
where is the photovoltaic system output power (Watt), is the isolation (Watt/m 2 ), is the total area (m 2 ), Ƞ is the electricity conversion from the sunlight efficiency and is the ambient temperature in °C. In this paper, it was assumed that linearly increases with . The photovoltaic power stations are modeled in this study as shown in (2).
represents the transfer function of PV generating systems as used in [12,20].
where is the time constant of the photovoltaic system, and its value is shown in Table  1.

Wind Farm
A wind farm is composed of wind turbines. The output power of a wind turbine depends on the cubic power of the air velocity, as illustrated in (3) [19].
where is the power generated by the wind turbine, is the air density in kg/m 3 , is the area of the blades in m 2 and is the power coefficient of the turbine which refers Egypt established new renewable and fossil fuel power stations which were integrated into the grid in 2020, which are [19]: i.
Three combined-cycle power plants at Burullus, BeniSuef and New Administrative Capital (each with 4800 MW installed capacity).

Photovoltaic Farm
The power produced from the photovoltaic system (using maximum power point tracking) can be formulated as (1) [12,20].
where P PV is the photovoltaic system output power (Watt), I is the isolation (Watt/m 2 ), A is the total area (m 2 ), η PV is the electricity conversion from the sunlight efficiency and T a is the ambient temperature in • C. In this paper, it was assumed that P PV linearly increases with I. The photovoltaic power stations are modeled in this study as shown in (2). G PV represents the transfer function of PV generating systems as used in [12,20].
where T PV is the time constant of the photovoltaic system, and its value is shown in Table 1.

Wind Farm
A wind farm is composed of wind turbines. The output power of a wind turbine depends on the cubic power of the air velocity, as illustrated in (3) [19]. where P W is the power generated by the wind turbine, P is the air density in kg/m 3 , A is the area of the blades in m 2 and C P is the power coefficient of the turbine which refers to the fraction of available power that can be produced. In this study, we neglected the non-linearities of the wind turbine and considered its modeling as shown in (4) [21].
where G W is the transfer function of wind farms [21], ∆P GW is the change in wind power generated and ∆P W is the change in wind power; K W is the gain constant of the wind generator, while T Wi is the time constant of the wind farm. The values of K W and T Wi are listed in Table 1.

Egyptian Grid Dynamic Model
The Egyptian grid consists of five types of power station. The real power equation of the Egyptian grid can be written as shown in (5) and illustrated in Figure 2.
where P PV , P GW , P m1 , P m2 and P m3 are the power produced by photovoltaic, wind, nonreheat, reheat and hydro power stations, respectively; P D is the demand power; ∆P e is the electrical power change.

Non-Linear PID Controller
The conventional PID is widely known for its various applications in electrical power systems. In recent years, many modifications have been applied to the traditional PID controller. One of those alterations is the non-linear PID (NPID). The NPID control scheme  The overall generator dynamics for the whole system can be illustrated in the transfer function illustrated in (6).
where the change in frequency is ∆ f , the damping constant of the power system is D and the equivalent inertia constant of the Egyptian grid is H. The nomenclatures and values of the Egyptian power system parameters of the conventional stations of non-reheat, reheat and hydro power stations are shown in Table 2. All the values are provided by the control center of Egypt.

Non-Linear PID Controller
The conventional PID is widely known for its various applications in electrical power systems. In recent years, many modifications have been applied to the traditional PID controller. One of those alterations is the non-linear PID (NPID). The NPID control scheme in comparison with that of the conventional PID has more beneficial impacts on various industrial applications. The NPID has two comprehensive purposes: 1.
The NPID control scheme can usually absorb the non-linearity of highly non-linear systems such as power grids, which is the case in this study; 2.
Additionally, for linear systems, the NPID can drive those systems to better performance in terms of achieving a lower rise time, peak time, steady state error, settling time and maximum overshoot, and also better tracking for a reference and disturbance rejection, which is also considered in this study.
The NPID controller has the benefit of a high initial gain to accomplish a fast dynamic response, continued with a low gain to evade an unstable behavior. The fundamental concept of the NPID is to generate an incessant dynamic non-linear function instead of gain scheduling by designing a non-linear gain function in combination with an error, integration of the error and the error derivative to reach a certain set point [20].

FOPID Controller
Unlike the conventional PID control scheme, which includes a single order for both the integrator and differentiator, the fractional-order control system (FOPID) has an order value for K D and K I . The value ranges between 0 and 1 for each of them. Caputo [22].
The previous methods are not appropriate in applications which require real-time control [23]. Oustaloup in [24] established an approximation for the fractional-order derivative which is used by different researchers in many study fields to employ optimal tuning of the five parameters of the FOPID, such as the works of [25,26]. Practically, the approximation invented by Oustaloup is applied to many applications using the CRONE block in MATLAB/SIMULINK such as: i.
Control of a mechatronics system [27], where the authors studied the FOPID control of a master slave mechatronics system; ii.
Frequency and power regulation [28], where the authors studied FOPID automatic generation control of multi-thermal areas including HVDC; iii.
Speed control of machines [29], where the authors studied FOPID speed control of DC machines; iv.
Maximum power point tracking of a renewable power plant [30], where the authors studied maximum power point tracking of a renewable energy technology using an FOPID controller.
In this research, the authors applied Oustaloup's approximation in the modeling of the derivative and integral components of the fractional-order PID. The mathematical approximation for s α is illustrated in Equations (7)-(9) [12].
where ω h and ω b are maximum and minimum values for the frequency approximation, respectively, and assumed to be [-1000, 1000] in this study, 2N + 1 is the order of the recursive filter mentioned by Oustaloup, where, in this study, N is assumed to be 4, and ω k is a pole, while ω k is a zero. The FOPID control scheme has been widely used over the last twenty years; two variables are added in this control scheme which are (λ and µ) in comparison with the conventional PID which may drive the power system to better performance. The integral differential powers λ and µ determine the operation mode of the controller. Figure 3 shows the operation modes of the FOPID controller based on λ and µ values. If both powers are set at 1, the FOPID will work as a conventional PID. Many researchers have used the FOPID control scheme in many applications such as voltage and frequency control in power systems, motors, robotics and even vehicles. The FOPID scheme control signal is shown in (10) [8].

NFOPID Controller
The NFOPID controller is a novel hybrid controller between NPID and FOPID control schemes. The novel scheme includes six parameters ( , , , G, λ and µ) which enables better system operation and multi-modes. The control action of NFOPID schemes is illustrated in (11). The controller configuration and modes of operation are shown in Figure 4.

Design Problem Definition
The design of each control scheme was applied at each operation condition separately using different optimization techniques. The design was performed using MATLAB, aiming to reach less possible frequency deviations at each condition. The optimization problem is described as follows: • Objective function: minimizing integration of the square error in frequency (∆ ): • Variables: each control scheme parameter.
The controller parameters differ from one controller to another. In the NPID control scheme, the controlled parameters are (G, , and ), and the constraint considered in the controller design is 0 ≤ G ≤ 1 only. In the FOPID control scheme, the controlled parameters are ( , , , λ and µ), and the constraints considered are 0 ≤ λ ≤ 1 and 0 ≤ µ ≤ 1 only. In the NFOPID control scheme, the six parameters are the controlled parameters and the limits of G, λ and µ are considered as constraints.
The applied optimization techniques are as follows:

NFOPID Controller
The NFOPID controller is a novel hybrid controller between NPID and FOPID control schemes. The novel scheme includes six parameters (K P , K I , K D , G, λ and µ) which enables better system operation and multi-modes. The control action of NFOPID schemes is illustrated in (11). The controller configuration and modes of operation are shown in Figure 4.

NFOPID Controller
The NFOPID controller is a novel hybrid controller between NPID and FOPID control schemes. The novel scheme includes six parameters ( , , , G, λ and µ) which enables better system operation and multi-modes. The control action of NFOPID schemes is illustrated in (11). The controller configuration and modes of operation are shown in Figure 4.

Design Problem Definition
The design of each control scheme was applied at each operation condition separately using different optimization techniques. The design was performed using MATLAB, aiming to reach less possible frequency deviations at each condition. The optimization problem is described as follows: • Objective function: minimizing integration of the square error in frequency (∆ ): • Variables: each control scheme parameter.
The controller parameters differ from one controller to another. In the NPID control scheme, the controlled parameters are (G, , and ), and the constraint considered in the controller design is 0 ≤ G ≤ 1 only. In the FOPID control scheme, the controlled parameters are ( , , , λ and µ), and the constraints considered are 0 ≤ λ ≤ 1 and 0 ≤ µ ≤ 1 only. In the NFOPID control scheme, the six parameters are the controlled parameters and the limits of G, λ and µ are considered as constraints.
The applied optimization techniques are as follows:

Design Problem Definition
The design of each control scheme was applied at each operation condition separately using different optimization techniques. The design was performed using MATLAB, aiming to reach less possible frequency deviations at each condition. The optimization problem is described as follows:

•
Objective function: minimizing integration of the square error in frequency (∆ f ): • Variables: each control scheme parameter. • Constraints: non-linearity gain (G) limits, and integral and derivative power (λ and µ) limits.
The controller parameters differ from one controller to another. In the NPID control scheme, the controlled parameters are (G, K P , K I and K D ), and the constraint considered in the controller design is 0 ≤ G ≤ 1 only. In the FOPID control scheme, the controlled parameters are (K P , K I , K D , λ and µ), and the constraints considered are 0 ≤ λ ≤ 1 and 0 ≤ µ ≤ 1 only. In the NFOPID control scheme, the six parameters are the controlled parameters and the limits of G, λ and µ are considered as constraints. The applied optimization techniques are as follows: (a) Tunicate swarm algorithm [17]; (b) Teaching-learning-based optimization (TLBO) [16]; (c) Particle swarm optimization (PSO) [14]; (d) Genetic algorithm (GA) [15].
The design first took place in an offline environment for the three controllers in the power system at the same time for each case study. After the design was conducted, the controlled system was tested as illustrated in the next section.

Tunicate Swarm Algorithm
In recent years, there has been a focus on bio-inspired optimization to reach the minimum or maximum objective in terms of controlling the system variables. The tunicate can reach the food source location (optimum solution). In this research, the following behaviors were worked to find the optimum solution: (i) jet propulsion and (ii) swarm intelligence. The jet propulsion can be modeled such that the tunicate can satisfy three conditions: (a) avoiding the conflict between other tunicates (search agents), (b) movement towards the position of the search agent and (c) remaining close to the best search agent. The swarm behavior is responsible for updating the locations of other search agents about the best solution [17]. Figure 5 shows the avoidance between tunicates (search agents). The → A vector is nominated to calculate the new search agent location.

Avoiding the Conflict between Other Tunicates (Search Agents)
where → F is the water flow advection in a deep ocean, while → G is the gravity force; c 1 , c 2 and c 3 are random numbers lying between [0, 1]. The social forces between search agents are represented as where P min is the initial speed with a set value of 1 in this research, while P max is the subordinate speed to make a social interaction with a set value of 5 in this work.
The design first took place in an offline environment for the three controller power system at the same time for each case study. After the design was conduc controlled system was tested as illustrated in the next section.

Tunicate Swarm Algorithm
In recent years, there has been a focus on bio-inspired optimization to reach th imum or maximum objective in terms of controlling the system variables. The tunic reach the food source location (optimum solution). In this research, the following iors were worked to find the optimum solution: where ⃗ is the water flow advection in a deep ocean, while ⃗ is the gravity force and are random numbers lying between [0, 1]. The social forces between search are represented as ⃗ .
is the initial speed with a set value of 1 in this research, while subordinate speed to make a social interaction with a set value of 5 in this work.

Movement towards the Position of the Search
Since the conflict between neighbors is avoided, the tunicate will move towa direction of the best neighbor as shown in Figure 6.

Movement towards the Position of the Search
Since the conflict between neighbors is avoided, the tunicate will move towards the direction of the best neighbor as shown in Figure 6.
Energies 2021, 14, x FOR PEER REVIEW 9 of 19 ⃗ represents the distance between the optimum solution and the tunicate, x is the current iteration, ⃗ is the location of the optimum solution, ( ) ⃗ is the tunicate location and is a random number lying between [0,1].

Swarm Behavior
The swarm behavior of the tunicate was mathematically simulated such that the first two optimal solutions update the location of other search agents with respect to the location of the best search agents. The tunicate swarm behavior is defined in (18).

Convergence
In the proposed algorithm, three stop conditions may be applied: (a) a maximum number of iterations; (b) the objective value is almost constant for many iterations; (c) the required accuracy is achieved. Figure 8 shows the flow chart of the tunicate swarm algorithm.
Setting parameters: The following parameters were set in this research to perform the design process: (1) Search agents = 80; (2) = 1; (3) = 4; (4) Number of generations = 1000.  ⃗ represents the distance between the optimum solution and the tunicate, x is the current iteration, ⃗ is the location of the optimum solution, ( ) ⃗ is the tunicate location and is a random number lying between [0,1].

Swarm Behavior
The swarm behavior of the tunicate was mathematically simulated such that the first two optimal solutions update the location of other search agents with respect to the location of the best search agents. The tunicate swarm behavior is defined in (18).

Convergence
In the proposed algorithm, three stop conditions may be applied: (a) a maximum number of iterations; (b) the objective value is almost constant for many iterations; (c) the required accuracy is achieved. Figure 8 shows the flow chart of the tunicate swarm algorithm.
Setting parameters: The following parameters were set in this research to perform the design process: (1) Search agents = 80; (2) = 1;

Swarm Behavior
The swarm behavior of the tunicate was mathematically simulated such that the first two optimal solutions update the location of other search agents with respect to the location of the best search agents. The tunicate swarm behavior is defined in (18).

Convergence
In the proposed algorithm, three stop conditions may be applied: (a) a maximum number of iterations; (b) the objective value is almost constant for many iterations; (c) the required accuracy is achieved. Figure 8 shows the flow chart of the tunicate swarm algorithm.

Indicators
The following indicators were used to compare between different optimization niques and different control schemes: i.

Self-Tuning of NFOPID Controller
The Egyptian power system has different operating conditions, and for each op ing condition, a new design for the centralized controller is required. Since NFOPID

Indicators
The following indicators were used to compare between different optimization techniques and different control schemes: i.

Self-Tuning of NFOPID Controller
The Egyptian power system has different operating conditions, and for each operating condition, a new design for the centralized controller is required. Since NFOPID has six parameters, the question of what is the optimal way to design the controller arose, and the answer came up with four options of design for each disturbance: Method 1: Selection of optimal K P , K I and K D only and the rest of the parameters stay constant.
Method 2: Selection of optimal G only and keep the rest of the parameters constant. Method 3: Selection of optimal G, λ and µ only and keep the rest of the parameters constant.
Method 4: Selection of optimal G, K P , K I , K D , λ and µ. This self-tuning in this study was applied using one of the artificial intelligence techniques which is a neural network (NN) [11]. The inputs of the NN are the change in the demand power, radiation and wind speed, while the output is the optimal parameters of the NFOPID based on the option of design. The selection will be performed based on the design method (for example, in design method ii, the neural network will select the optimal G, λ and µ only).
The neural network for self-tuning of the NFOPID controller used in this work is shown in Figure 9. It consists of three inputs, one to six outputs (depending on the design option) and 10 neuron hidden layers. The network was designed using the well-known Lavenberg-Marquardt backpropagation method [31,32]. Method 3: Selection of optimal G, λ and µ only and keep the rest of the parameters constant.
Method 4: Selection of optimal G, , , , λ and µ. This self-tuning in this study was applied using one of the artificial intelligence techniques which is a neural network (NN) [11]. The inputs of the NN are the change in the demand power, radiation and wind speed, while the output is the optimal parameters of the NFOPID based on the option of design. The selection will be performed based on the design method (for example, in design method ii, the neural network will select the optimal G, λ and µ only).
The neural network for self-tuning of the NFOPID controller used in this work is shown in Figure 9. It consists of three inputs, one to six outputs (depending on the design option) and 10 neuron hidden layers. The network was designed using the well-known Lavenberg-Marquardt backpropagation method [31,32].

Results of Comparison between Different Optimization Techniques
The system was subjected to 1% step load increase, and the grid was assumed to be operated with 100% conventional power generation (no renewables) in this test. The three conventional stations were all assumed to be controlled through a conventional PID controller. The PID controllers were designed using tunicate swarm, TLBO, PSO and GA. Figure 10 shows a comparison between the effect of the four optimization techniques on the frequency deviation response. Table 3 shows a comparison between the four optimization techniques. The results show that tunicate swarm has the best performance in terms of ITAE, IAE, minimum number of iterations, maximum overshoot (Osh), maximum undershoot (Ush), peak time (tp) and settling time (ts). The convincing results drive the authors to complete the upcoming study cases using tunicate swarm in controller design.

Results of Comparison between Different Optimization Techniques
The system was subjected to 1% step load increase, and the grid was assumed to be operated with 100% conventional power generation (no renewables) in this test. The three conventional stations were all assumed to be controlled through a conventional PID controller. The PID controllers were designed using tunicate swarm, TLBO, PSO and GA. Figure 10 shows a comparison between the effect of the four optimization techniques on the frequency deviation response. Table 3 shows a comparison between the four optimization techniques. The results show that tunicate swarm has the best performance in terms of ITAE, IAE, minimum number of iterations, maximum overshoot (Osh), maximum undershoot (Ush), peak time (tp) and settling time (ts). The convincing results drive the authors to complete the upcoming study cases using tunicate swarm in controller design. Energies 2021, 14, x FOR PEER REVIEW 12 of 19 Figure 10. Comparison between different optimization techniques.

Results of Comparison between PID, NPID, FOPID and NFOPID
There are three cases taken into consideration to compare between the controllers.

Case 1: load increase by 10% in the presence of renewables
In this case, it was assumed that the load increased by 10% after 1 s (step increase) from starting the simulation. The solar radiation and wind power curves are shown in Figures 11 and 12, respectively, and were obtained from Mateo station installed in Suez Governorate. Figure 13 shows the frequency deviation response at this case, where the results show that NFOPID has a better performance than the other three controllers. The results also show that FOPID is better than the NPID controller. A comparison between the four controllers in terms of maximum overshoot, minimum overshoot and settling time is shown in Table 4. The optimal controller parameters designed by tunicate swarm are also shown in Table 5. The results also show that the NFOPID controller drives the system to reduce the settling time by 50% compared to the FOPID controller. FOPID reduces the settling time by 20% compared to NPID, which has the same settling time as the PID controller. The system has maximum overshoot using NFOPID, better than of that FOPID by 79%, while FOPID is better than NPID by 50%, and NPID is better than PID by 6%. The system has minimum overshoot using NFOPID, better than that of FOPID by 82%, while FOPID is better than NPID by 7%, and NPID is better than PID by 9%.

Results of Comparison between PID, NPID, FOPID and NFOPID
There are three cases taken into consideration to compare between the controllers. Case 1: load increase by 10% in the presence of renewables In this case, it was assumed that the load increased by 10% after 1 s (step increase) from starting the simulation. The solar radiation and wind power curves are shown in Figures 11 and 12, respectively, and were obtained from Mateo station installed in Suez Governorate. Figure 13 shows the frequency deviation response at this case, where the results show that NFOPID has a better performance than the other three controllers. The results also show that FOPID is better than the NPID controller. A comparison between the four controllers in terms of maximum overshoot, minimum overshoot and settling time is shown in Table 4. The optimal controller parameters designed by tunicate swarm are also shown in Table 5. The results also show that the NFOPID controller drives the system to reduce the settling time by 50% compared to the FOPID controller. FOPID reduces the settling time by 20% compared to NPID, which has the same settling time as the PID controller. The system has maximum overshoot using NFOPID, better than of that FOPID by 79%, while FOPID is better than NPID by 50%, and NPID is better than PID by 6%. The system has minimum overshoot using NFOPID, better than that of FOPID by 82%, while FOPID is better than NPID by 7%, and NPID is better than PID by 9%. Energies 2021, 14, x FOR PEER REVIEW 13 of 1 Figure 11. Radiation in case 1.

Case 2: load increase by 10%, wind integration and wind outage
In this case, it was assumed that the load is increased by 10% after 1 s from starting the simulation, radiation was assumed to be that shown in Figure 11 and the wind farm was assumed to be integrated into the grid after 10 s and went out of service after 20 s The controller's parameters are the same as those mentioned in case 1.
The results in Figure 14 show that NFOPID has the best performance in terms of set tling time and maximum and minimum overshoot when the wind farm was integrated into the grid and went out of service. FOPID takes second place, while NPID takes third place.

Case 2: load increase by 10%, wind integration and wind outage
In this case, it was assumed that the load is increased by 10% after 1 s from starting the simulation, radiation was assumed to be that shown in Figure 11 and the wind farm was assumed to be integrated into the grid after 10 s and went out of service after 20 s. The controller's parameters are the same as those mentioned in case 1.
The results in Figure 14 show that NFOPID has the best performance in terms of settling time and maximum and minimum overshoot when the wind farm was integrated into the grid and went out of service. FOPID takes second place, while NPID takes third place.

Case 3: parameter variation
In this case, the inertia was assumed to be 20% higher, and the same conditions of case 2 were repeated. The results in Figure 15 show that NFOPID is the most robust controller followed by FOPID. NPID is more robust than PID.
Case 4: results of comparison between methods of NFOPID self-tuning: From the results of the previous study cases, NFOPID has the best performance in comparison with the other controllers. In this study, we repeated case 2 again but also considering the load change, as shown in Figure 16. The results in Figure 17 show that method 3 and method 4 for tuning the NFOPID controller are better than methods 1 and 2. Table 5 shows a comparison between methods of self-tunning of NFOPID which confirms that changing all the NFOPID parameters or changing only G, λ and µ will lead to the same result in terms of ITAE and IAE, which behave better than the other alternatives for changing the parameters.    In this case, it was assumed that the load is increased by 10% after 1 s from starting the simulation, radiation was assumed to be that shown in Figure 11 and the wind farm was assumed to be integrated into the grid after 10 s and went out of service after 20 s. The controller's parameters are the same as those mentioned in case 1.
The results in Figure 14 show that NFOPID has the best performance in terms of settling time and maximum and minimum overshoot when the wind farm was integrated into the grid and went out of service. FOPID takes second place, while NPID takes third place. Figure 13. Change in frequency responses at case 1.

Case 3: parameter variation
In this case, the inertia was assumed to be 20% higher, and the same conditions of case 2 were repeated. The results in Figure 15 show that NFOPID is the most robust controller followed by FOPID. NPID is more robust than PID.
Case 4: results of comparison between methods of NFOPID self-tuning: From the results of the previous study cases, NFOPID has the best performance in comparison with the other controllers. In this study, we repeated case 2 again but also considering the load change, as shown in Figure 16. The results in Figure 17 show that method 3 and method 4 for tuning the NFOPID controller are better than methods 1 and 2. Table 5 shows a comparison between methods of self-tunning of NFOPID which confirms that changing all the NFOPID parameters or changing only G, λ and µ will lead to the same result in terms of ITAE and IAE, which behave better than the other alternatives for changing the parameters.

Case 3: parameter variation
In this case, the inertia was assumed to be 20% higher, and the same conditions of case 2 were repeated. The results in Figure 15 show that NFOPID is the most robust controller followed by FOPID. NPID is more robust than PID.  15. Change in frequency responses at case 3. Figure 15. Change in frequency responses at case 3.
Case 4: results of comparison between methods of NFOPID self-tuning: From the results of the previous study cases, NFOPID has the best performance in comparison with the other controllers. In this study, we repeated case 2 again but also considering the load change, as shown in Figure 16. The results in Figure 17 show that method 3 and method 4 for tuning the NFOPID controller are better than methods 1 and 2. Table 5 shows a comparison between methods of self-tunning of NFOPID which confirms that changing all the NFOPID parameters or changing only G, λ and µ will lead to the same result in terms of ITAE and IAE, which behave better than the other alternatives for changing the parameters.

Discussion
This study presented a simple model of the Egyptian power system to study the effect of both demand variation and new renewable energy variations on the frequency of the system. The wind and the photovoltaic farms were modeled as first-order systems following previous studies ( [12,[19][20][21]). The outputs of both photovoltaic and wind energy mod-

Discussion
This study presented a simple model of the Egyptian power system to study the effect of both demand variation and new renewable energy variations on the frequency of the system. The wind and the photovoltaic farms were modeled as first-order systems following previous studies ( [12,[19][20][21]). The outputs of both photovoltaic and wind energy models were compared to typical day data in the Zaafarana area in Egypt. The root mean

Discussion
This study presented a simple model of the Egyptian power system to study the effect of both demand variation and new renewable energy variations on the frequency of the system. The wind and the photovoltaic farms were modeled as first-order systems following previous studies ( [12,[19][20][21]). The outputs of both photovoltaic and wind energy models were compared to typical day data in the Zaafarana area in Egypt. The root mean square error (RMSE) [33] was calculated for both models and was found to be 0.884 for the wind model and 0.746 for the PV model, values which are acceptable to be used in this study.
A centralized control scheme was assumed in this study to control the frequency of the Egyptian power system. Four optimization techniques are described in Section 6.1 to design the central PID frequency controller, namely, tunicate swarm, TLBO, PSO and GA. The results show that tunicate swarm achieved a lower ITAE by 17% and IAE by 42% than those of TLBO which was better in performance than PSO and GA.
Four control schemes were proposed and compared to be used as a centralized frequency controller in the Egyptian power system, namely, novel NFOPID, FOPID, NPID and PID control schemes. The tunicate swarm optimization technique was used to design each of these control schemes to face a 10% increase in demand in addition to wind integration and outage. The results show that the NFOPID control scheme achieved a lower ITAE by 61% and a lower IAE by 33% than the FOPID control scheme, which has better performance than the NPID and PID control schemes. Additionally, the same scenario was applied considering a 20% increase in power system parameters as a robustness test for the four control schemes, where the results show that the NFOPID control scheme has better performance than the FOPID, NPID and PID control schemes.
Since NFOPID has the best performance over the other compared control schemes. NFOPID optimal control parameters should be set according to the values of radiation, wind speed and demand. A neural network with radiation, wind speed and demand as inputs and the parameters of the NFOPID controller as outputs was used for this mission. Four design methods were compared in this research, and the results show that the selection of the optimal G, λ and µ, while keeping the rest of the parameters constant, and the selection of the optimal G, K P , K I , K D , λ and µ achieved the same performance in terms of the ITAE and IAE. These are better than the selection of the optimal K P , K I and K D , while the rest of the parameters stay constant, and the selection of the optimal G, while keeping the rest of the parameters constant, by 88% for the ITAE and 71% for the IAE.
To practically apply this study, the central NFOPID control scheme should be operated in the national control center of the Egyptian power system, which is located in the Embaba region, Giza. The demand is already measured there and will be used as an input, while radiation and wind speed data will be imported from weather stations of Aswan Governorate (for the PV power plants) and the Zaafarana area (for the wind farms) to optimally select the parameters of the NFOPID controller using the neural network, which should first be trained on yearly data.
In the future, the renewable energy systems in the Egyptian grid should take part in the frequency support in addition to future storage facilities that will be installed in Egypt. In this direction, frequency forecasting may be used to manage the control of renewables and energy storage systems as in [34].

Conclusions
This paper presented a comparison between different control schemes and optimization techniques to control the Egyptian grid frequency. The results prove that the novel tunicate swarm algorithm has better performance than other optimization techniques in terms of the ITAE, IAE, number of iterations and frequency deviation response. The results also show that NFOPID is more robust than FOPID, while FOPID is more robust than NPID, and NPID is more robust than PID. The results also show that NFOPID deals with the renewable integration and outage better than FOPID, which also deals with these better than NPID. The results also show that the best way to self-tune NFOPID is either by changing the six parameters or by changing only G, λ and µ in terms of the ITAE and IAE. In this study, it was assumed that the photovoltaic and wind power stations do not contribute to the frequency regulation, and their participation will be studied in future research considering the Egyptian grid codes for integrating renewable energies.