Optimal Designing of Fuzzy-PID Controller in the Load-Frequency Control Loop of Hydro-Thermal Power System Connected to Wind Farm by HVDC Lines

In this paper an optimized Fuzzy based controller is proposed for automatic generation control of two area hydro-thermal power system connected to the wind farm. The parameters and membership functions of the proposed controller are optimized by a modified version of Cuckoo search algorithm (CSA). Also, a weighted objective function is proposed to minimize the frequency deviation and transmission power oscillation. The suggested heuristic objective function is a weight function from maximum frequency drift and oscillations fading time. To assessing the performance of suggested controller, studies is accomplished by two different scenarios. In the first scenario, the simulations are performed without wind farm and in the second scenario, the simulation is done in the presence of a wind farm. The simulation results indicate that the wind farm presence has major effect on sustained improvement of power system and the reason is considering the load variations in the area, the demand electrical energy in the same area is provided by the wind farm and hence, the frequency oscillations are decreased in both areas.

INDEX TERMS Load-frequency control, Fuzzy control, Fuzzy-PID, Cuckoo search algorithm.

Nomenclature Δf1
Frequency deviation in area 1 Δf2 Frequency deviation in area 2 ΔPtie Incremental change in tie line power ACE Area control error T Time operator tsim Time range of simulation w1, w2 Weighting coefficient

I. Introduction
The power systems were made of control areas that connected to each other by transmission lines. It is necessary to frequency stability for better performance of power system [1][2][3]. In power plant generators, load control loop has an important role in frequency stability and durability. Frequency control cause to stables the speed of synchronous and induction motors [4]. In recent years, use the renewable resources such as hydropower and wind energy has increased significantly in the power systems. The productivity of hydraulic plants can determine by change inflow valve into water turbine [5][6].
When the power system is connected to wind farm, it will be complicated to control the frequency. Because the productivity of wind farm depends on wind speed that this will cause frequency oscillation in the power system [7][8]. So, the controller must use in load-frequency control loop with highreaction speed to maintain the system frequency in the limit [9]. Researches on the design of load-frequency controllers in the power system can be divided into four categories: classical control methods [10][11][12][13][14], adaptive control methods [15][16][17][18][19][20], robust control methods [21][22][23] and intelligent control methods [24][25][26][27]. This section reviews some of the most anticipated articles in recent years. In [28] PI controller and mesh adaptive direct search algorithm was used that this method considering the anticipated load, can optimize the automatic generation power system (AGC) and as well as system frequency. One of the conventional controller disadvantages is that these types of controllers cannot function properly in nonlinear systems. They use fuzzy controllers to improve the load-frequency control performance that were presented in the following. In [29][30] fuzzy-PID controller is applied to control automatic generation (AGC) of a two-area connected thermal system. In [31] PID controller and also different algorithms is used for control the load-frequency in order to show controller and suggested algorithm ability against nonlinear and unequal areas in power system. In [32][33] a new method of loadfrequency control is developed for multi-areas power system based on adaptive fuzzy control method that applies for minimize the approximation errors and external disturbance effects. In [34][35] an optimized fuzzy regulation method as an intelligent coordinator is analyzed for the load-frequency control in hybrid power system by wind and thermal energy. With high penetration of wind power, the contribution of wind power for the frequency control (LFC) is so important. In [36][37][38][39][40] automatic control AGC and load-frequency control in hydro-thermal power system, with due to Fuzzy PID controllers accompanying different algorithms is researched that performance of these types of controllers depends on their membership function that is the best controller for AGC control and load-frequency control in power systems. In [41], a new frequency load control method for a multi-zone power system based on the adaptive fuzzy control method has been developed. The fuzzy logic system is used for the proper development of the adaptive control law and the updating of the algorithm parameters for the unknown continuous frequency-frequency control zones. A criterion based on H∞ theory is used to minimize approximation errors and the effects of external perturbations. In [42], according to the adaptive neural fuzzy control method, a new load frequency control method is proposed for the multi-zone power system. The local frequency load controller is designed using the frequency and power of the connection line of the deviations of each area. In the controller design, the approximate capability of fuzzy systems for recognizing unknown functions, setting the appropriate adaptive control rule, and new algorithms for the controller parameters are used. [43] presents the design of a new proportional integral proportional derivative controller to control the automatic production of an interconnected two-zone heating system. First, the teachinglearning algorithm is applied in this area. The designed problem is set as an optimization problem and the teachinglearning algorithm is used to optimize the fuzzy-PID (F-PID) controller parameters used. Is placed. In [44], the genetic optimization algorithm is used to search for the PID controller parameters of the optimal load-frequency control to minimize the objective function of the time domain. In [45], a modified objective function is proposed by dumping or adjusting the values of the dominant characteristic and the setting time.
Bacteria and genetic algorithms are compared to demonstrate the superiority of the proposed method. In [46], a new method combines the worm and pattern search algorithm to automatically control production in a multi-zone power system due to the number of limitations. Production is recommended. First, a two-zone system without a heat recovery system with a proportional integral derivative controller is investigated, and the PID controller parameters are optimized by the firewall algorithm, and an objective function as an integral of time multiplied by error. Absolute is used. The pattern search method is then applied to adjust the best answers provided by the firewall algorithm. In [47], the FPA algorithm was used to control the frequency load in the Chen machine power system. In the proposed method, a twozone heat recovery system has been developed with respect to physical constraints such as reheating turbines, production limit constraints, and the non-linear governor dead band [48].
A new method of the AILOS search algorithm is proposed to control the frequency load of a multi-zone power system. First, different conventional error criteria are considered, the adaptive fuzzy controller parameters for a two-zone power system are optimized using the AILOS method, and the effect of the objective function on the system performance is analyzed. [49] The adaptive approach to fuzzy logic in the steam turbine PID controller is investigated, which is an artificial intelligence technique. In [50], an optimal distribution strategy based on the adaptive direct mesh search algorithm in the AGC power system is investigated. This method can optimize the AGC power system as well as the frequency of our system according to the predicted wind and load power. The controller used in this system is an integral proportional controller and also its objective function is a weight objective function. Main drawback of the used controllers is lack of damping in different operation conditions of the power system. On the other hand, the optimization algorithms used to design these controllers are less accurate and they are trapped in local optimum points. Therefore, in this paper an innovative modified version of cuckoo search algorithm (MCSA) with high accuracy is proposed for optimal designing of the fuzzy based controller. Also, an innovative weighted objective This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication. The rest of the paper is organized as follows. In Section 2, problem formulation is done. In this section the under-study power system, the proposed Fuzzy-PID controller and also the proposed objective function is explained. Modified version of Cuckoo search algorithm is explained in Section 3. Simulation results in two scenarios and discussions are given in Section 4. Eventually, the conclusion is done in Section 5.

II. Problem formulation
LFC studies for the power systems require accurate modeling of all effective components. In this section, the model of the studied power system and then the proposed Fuzzy-PID controller is introduced. Finally, the proposed objective function (OF) is presented.

A. Under-study power system
The transfer function of the under-study two area power system in figure (2). Each area ACE includes one thermal unit, one hydro unit. The suggested system transfer function is shown in figure (2). From an economic point of view, if the distance between the two areas is more than 500 km, the use of HVDC lines is cost effective. All limitations of system such as heating turbine, time delay, generation rate constraint and dead governor in model is considered to form a more robust pragmatic system. Additionally, Fuzzy PID controller is used because it is one of the most famous feedback controllers and its parameters were optimized by Cuckoo search algorithm. Applying the Fuzzy PID controller in this system due to controller proportional it decreases the depreciation time and because of controller connected to it, a line creates fixed state. Also, it increases the stability and improves the transient state [51][52][53][54]. Next subsection, the proposed Fuzzy-PID controller is introduced.

B. Proposed controller
Suggested controller is a Fuzzy PID hybrid control, in which controller values and fuzzy components were considered as a variable. Fuzzy controllers are applied as robust stabilizers, in fading of the power system. In this article, Fuzzy PID controller was considered for stabilize the frequency in the subject system. The suggested controller performance is such that Fuzzy PID controller coefficients are regulated by fuzzy logic [55]. Using a fuzzy controller before the PID controller causes the PID control coefficients to be changed by the fuzzy controller in different loading conditions to perform better in the different conditions. Suggested controller of accomplished studies in this paper is Fuzzy-PID (F-PID) controller that is a combination of fuzzy control and PID controller.

FIGURE 3. Proposed F-PID controller
For this purpose, in each area for per generation unit is used one F-PID controller separately that as a result, four numbers of the suggested controller for total power system need to be stall. The controller input is area control error (ACE) which can be formulated as equation (1).
The membership functions of inputs and outputs the F-PID controllers is shown in figure (4).

FIGURE 4. Membership functions of inputs and outputs the fuzzy controller
As shown in the figure (4), for controller inputs and outputs, three membership function triangular-type with verbal abbreviations NS and PS respectively indicating small negative and positive changes i.e., zero changes and also two trapezoidal membership functions with abbreviations NB and PB respectively, indicating big negative and positive changes was applied. The performance of the fuzzy controller depends on how the membership functions are designed. In this paper, the proposed algorithm is used for selecting the coefficients A1 to A5 to improve the performance of the controller. In Table (I), the range of changes of these five coefficients is given.
Fuzzy rule for the proposed controller is given in Table II. For optimal design of the Fuzzy-PID controller by the optimization algorithm, a suitable objective function must be selected. In the next sub-section, the proposed objective function is introduced.

C. The Proposed objective function
Main purpose of the objective function (OF) is control parameters adjustment in order to maintain frequency and power exchange in its planned value. That is why the suggested objective function is a weight objective function that can decrease the overshoot and error in the system. The proposed objective function is presented as equation (2) (2) Where, w is weight factor, ∆F2 frequency drifts in area2, t time operator, ∆Ptie Power drifts in the communication line between two areas which is simulated in time interval 0-tsim. Also, ov is maximum overshoot in system. The controller design constraints are defined as equations (3) to (7).  Table I. Performance of fuzzy logic-based controllers are affected by their membership functions designing and considering incorrect designing of membership functions may not only to improve the system conditions; but also, instability. Therefore, the membership functions of fuzzy controllers must design correctly. In this paper, a modified cuckoo search algorithm (MCSA) for optimal controller design is proposed, which is introduced in the next section.

III. Cuckoo search algorithm
The suggested optimization algorithm in this paper is a Cuckoo search algorithm. Cuckoo algorithm is one of the latest and strongest of evolutionary optimization methods that is introduced by Xin Oyang and Debb Susho. This algorithm, inspire by a bird's life style called Cuckoo. This bird attractive life style and ovulation promises a good and worthy optimization algorithm in the wild nature. A method with the least effort, in fighting to survival against other animals. This lazy bird is as beautiful as ever, forces other birds to survive. This algorithm also like other evolutionary algorithms starts with primary population, a crowd of Cuckoos [57]. For solving the optimization problem must form the problem variable values in the form of an array. In the algorithm, this array called "habitat 1 ". In a problem, Nvar-dimensional optimization will be a habitat, a 1× Nvar dimensional array that shows the current position of Cuckoo life. This array is defined as equation (8).
In equation (10), Varmax is high-variable, varlo low-variable, a variable that max ELR is regulated by it. Each Cuckoo ovulates in the host birds nest randomly that is in ELR. Habitat = [x1, x2, …, xNvar] Which in it x1 is the problem primary variable, xNvar is the problem Nth variable. Profit value in the current habitat equals to appraise the fp profit function in habitat. In the modified version of the CSA algorithm, it is suggested that genetic mutations be performed as equation (12) Where Mf is mutation coefficient, rand is a random number with uniform probability distribution function. Applying genetic mutations to cuckoos with unfavorable fitness improves their performance. It is modeled on genetic mutations in differential evolution algorithms or genetic algorithms that have never been used for cuckoo search algorithms. Figure  The optimization steps for F-PID designing by the proposed CSA algorithm is described as follow: Step 1: Simulate the power system and F-PID controller in MATLAB Simulink.
Step 2: Choosing the modified CSA algorithm parameters such as population, maximum iterations, Mf, α and β.
Step 3: Initiate a random population of n host nests (Each population has data of k1, K2, Kp, Ki, Kd as well as A1 to A5) Step 4: Get a cuckoo randomly by Levy flights, i.
Step 5: Design F-PID controller by data of each cuckoo.
Step 6: Run power system Simulink and calculate objective function for cuckoo, Fi.
Step 7: Select a nest randomly, j.
Step 8: If Fi<Fj then replace j by new solution else Select j as solution and perform mutation.
Step 9: Abandon a fraction Pa of worst nest and bult new ones at new location via Levy flight Step 10: If Iteration<maximum iterations then go to step 4 else go to step 11.
Step 11: Print optimum parameters of the F-PID. In LFC controllers, high accuracy of the algorithm is required. If the controller coefficients are not selected correctly, there is a possibility of power system frequency instability. In the proposed modified version of the CSA algorithm, the accuracy is increased. The performance of the proposed controller designed by the modified CSA algorithm has been tested by performing simulations in the MATLAB. In the next section, the simulation results are analyzed.

IV. Simulation results
In this paper, using the suggested Fuzzy-PID controller is proposed to control the multi-area power system frequency with thermal, hydro and wind units. For optimal designing of the membership functions in controller was applied Cuckoo search algorithm too. In this article, the suggested controller performance designed in two-area power system, with 10% load variation in each area is evaluated. It was compared with other controllers and also various algorithms. It is noted that studies were repeated in the presence of wind farm and in the absence of it in form two scenarios. Optimization algorithms parameters are in Table III.  To perform the just judgment between two algorithms, similar population number and repetition for two algorithms were selected. After optimizing by two algorithms, their convergence trend in various iteration was shown in figure (5). It is noted that F-PID controllers designing is accomplished by two algorithms in 10% load variation conditions in area (1) and in the effective presence of wind farm.
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication.

FIGURE 5. Algorithms convergence trend in controller designing
As shown in the figure (5), particle swarm algorithm is converged after 31 iterations up to ultimate value 0.54 p.u. however, cuckoo search algorithm received the ultimate value 0.46 p.u. after 23 iterations. Objective function value for controller designed by Cuckoo search algorithm is acquired less than a controller designed by particle swarm algorithm. Optimal values of Fuzzy-PID controller parameters are in Table IV. In figure (6), the optimized membership functions were shown by two algorithms.

A. First scenario (absence of wind farm)
In part 1, controller performance designed in the power system and at the absence of wind farm conditions and for 10% load variation in two areas is analyzed. After accomplished the simulations, frequency variations in each area and the power variations of communication line between two areas is determined and in figure (7) the areas frequency variations and communication line power variations were shown for 10% load variation in area 1.
In the figure (7) blue dotted line relates to the power system with optimized Fuzzy-PI controller by hPSO -PS algorithm and red dotted and black line respectively, Fuzzy-PID controller results to optimized membership functions by PSO and CSA algorithm. Less value of objective function considering apply the suggested controller, say overshoot, is less settling time swoop. The following in figure (8)  As shown in the figure (8), like first part, Fuzzy-PID controllers have better performance toward Fuzzy-PI controller and their frequency and communication line power variations were dampened in shorter time and less amplitude that this can indicate more stability margin of power system. In following for exact assessment of the obtained results in scenario1, maximum deviation (MD) amplitude values and required time to dampen each part was calculated and shown. In the figure (9) the maximum required time for dampen in the power system is studied and considering the applying each controller shown. It is noted that settling time (ST) was computed by index 4% ultimate value. As shown in the above figure, time required for dampen in the studied power system considering use the optimized Fuzzy-PID controller has been achieved by Cuckoo search algorithm and with the suggested objective function less than two other controllers. The following in the figure (10), maximum deviation (MD) amplitude was shown for load variation in every area. As can be seen in the results, frequency deviation amplitude in a area with load variations is more than other area. So that for 10% load variation in three areas, the frequency amplitude in area 2 has been achieved less than two other control methods by considering to use the suggested Fuzzy-PID controller.

B. Second scenario (the effective presence of wind farm)
In the second part of accomplished simulation, controller performance in the power system and in the effective presence of wind farm and for 10% load variations in two areas has been compared. In this article assumed that the wind speed in wind farm is more than rated speed and less than high failure and therefore, the wind turbines inject the rated power into the network. Thus, the wind turbine's transient dynamics was also ignored.
In the following of the simulations trend, in order to exact appraise the controller performance, applying 10% error in area2 and at the presence of the wind farm, the areas frequency variations and communication line power variations between two areas were calculated and shown in the figure (12). The presence of the wind power in system helped to improve the system frequency stability, so that in load variations in the area, frequency amplitude and its strength in the system had significantly decreased. Considering 10% load variations in area2, like previous simulations, Fuzzy-PID controllers to Fuzzy-PID the because of the differentiator part in their own structure and also proper design had exact performance. In this situation, frequency and communication line power variation dampened due to applying the Fuzzy-PID controller in short time and lower amplitude. In the following the error signals have been analyzed in each area. Therefore, maximum deviation amplitude values and required time calculated for fading in each part. Maximum required time to reach zero after the disturbance are shown in the figure (13). According to the obtained results in second scenario, maximum require time to remove in the studied power system after the disturbance and if used optimized Fuzzy-PID controller by CSA algorithm and the suggested objective function achieved less than two other controllers. In following the results assessment, in the figure (14), maximum deviation amplitude is shown for load variation in each area. By reviewing the results in the figure (14), considering load variations in each area, maximum variation amplitude will be related to the same area. For example, maximum frequency deviation amplitude for 10% load variation in area 1 relates to ∆f1. In this situation, maximum frequency deviation amplitude in the power system with optimized Fuzzy-PID controller by CSA algorithm in the subject power system will be reached to least state per unit to controller and the other algorithms. The simulation results in second scenario, indicates that the effective presence of the wind farm is effective in improving the frequency stability, provided that it can produce itself rated power without power variation. On the other hand, the suggested Fuzzy-PID optimized controller by CSA algorithm had a better performance toward two other controllers and could dampen frequency and communication line power in short time and lower amplitude.

C. Results analysis
In this paper, the suggested control method performance in frequency-load control loop of power system was evaluated. Thus, after designing  It should be noted that the parameters of the optimization algorithms were selected by trial-and-error method to have their best performance. The optimization results are accumulated in Table VI. According to given results in Table  IV and as mentioned earlier, the effective presence of the wind farm has a positive effect on improve the system frequency stability. Because a part of power deficiency will be provided by suddenly increasing in load in short time by these sources and therefore, the frequency deviation in system will reduces. On the other hand, the traditional controllers such as PI and PID in nonlinear system like the studied power system in this article, didn't have a good performance and if used such a controller in load control loop, the frequency amplitude is high. Additionally, dampen takes a longer time. If use the nonlinear controllers like fuzzy controllers, amplitude and settling time will decrease. In two defined scenarios and whole operating conditions, the suggested Fuzzy-PID controller, optimized by Cuckoo search algorithm, has a better performance to other methods and could dampen the frequency oscillations and power in system in short time and lower amplitude.

V. Conclusion
In this paper, an optimized Fuzzy-PID controller is proposed for the multi-area power system frequency control with hydro-thermal units connected to the wind farm. The proposed controller parameters and membership functions are designed by modified cuckoo search algorithm. Simulations is done in two scenarios: without wind farm and with wind farm. In the first scenario, the performance of controllers in the power system without wind farm is studied.
In the first part of the scenario, the controller performance is analyzed by load variations up to 10% in area1. Objective function value in case of using optimized Fuzzy-PID controller by CSA algorithms is about 0.64 p.u. which is less than other controllers. In the second part, controller efficiency is studied for 10% load increment in area 2. Also, in this part, the proposed Fuzzy-PID controller has better performance than other controllers and its frequency oscillation and line power variations are damped in 6.92 s and 0.01099 p.u. which is lower than others. In the second scenario, controller performance compared in the effective presence conditions. Objective function value for 10% load variations in area 1, in the power systems with optimized Fuzzy-PID controllers by CSA algorithms is 0.46 p.u. which is lower than the other controller. If the load variations in area 2 are 10%, the suggested objective function value, performance of the suggested Fuzzy-PID controller optimized by modified cuckoo search algorithm is better function than the other controllers and dampened the frequency oscillations and power deviation in the power system in short time and with lower amplitude. Future works will pay attention on power system uncertainties and proposing a stochastic robust model to cover the uncertainties associated with power system uncertainties. Also, this paper simulation is available for the reader by email to the corresponding author