Optimal Tuning of PID Controllers for LFC in Renewable Energy Source Integrated Power Systems Using an Improved PSO

: The constant rise in energy demand and concerns about climate change have led to increased penetration of renewable energy sources (RES). Maintaining active power balance between generation and demand in power systems with significant penetration of these highly variable and intermittent renewable sources requires an efficient load frequency control (LFC) strategy. One such strategy that has gained the attention of researchers is optimal tuning of PID controllers of LFC using metaheuristic method. This paper presents a PSO variant for optimal tuning of PID controllers for load frequency control of power system integrated with renewable energy resources. The proposed PID tuning technique is tested on a two-area power system commonly used in the literature. Seven scenarios have been used to validate the effectiveness of the proposed Load Frequency Control. For more realistic evaluation, governor dead band and communication time delays have been incorporated in the test system in one of the scenarios. Simulation results obtained when compared with those of three well-known PID-tuning metaheuristic algorithms produced shorter settling time and smaller frequency and tie line power deviations.


Introduction
There is a constant rise in energy demand as a result of a growing population and improvement in quality of life.This coupled with concerns about climate change has led to increased penetration of renewable energy sources (RES).In an interconnected power system, any small sudden load change in any of the areas results in active power imbalance which in turn causes fluctuations in the frequency in all areas of the system and also fluctuations in the tie-line power flows.For satisfactory operation of power system, frequency should remain nearly constant.Load frequency control (LFC) is necessary in interconnected power systems to maintain active power balance and thereby keeping the system frequency and the tie-line power flows as close as possible to their scheduled values.The renewable energy sources are highly variable and intermittent.Their integration into power systems therefore makes the balancing of active power between generation and load more challenging and thus making the use of superior controllers for load frequency control very necessary.The utilization of Proportional-Integral (PI), and Proportional-Integral-Derivative (PID) controllers for LFC in power system is widespread due to their simplicity and straightforward structure [1][2][3].These controllers are designed to regulate power generation in response to load disturbances, with their performance significantly influenced by the proper tuning of the controllers.If these controllers are not properly tuned when used for load frequency control of power systems with RES, large deviations in frequency can occur leading to power system instability [4].
Finding the optimal parameter values of the PI or PID controllers can be a complex and computationally intensive task [5][6][7][8], especially in power systems with renewable energy integration [9,10].Traditional methods for finding the controller parameters include manual trial and error tuning [11], stabilizing sets design method [12] and the widely recognized Ziegler-Nichols method [6,7].The manual trial and error tuning is timeconsuming and its success is not guaranteed [13].The Ziegler-Nichols method can only be used where the system can be brought to the stability boundary with the proportional gain while the gains of the I and D controller are set to zero in order to determine the critical gain and frequency that must be known to calculate the controller parameters.It is simple but can lead to oscillatory closed-loop responses [13].While these traditional methods have been applied with varying degrees of success, they often result in suboptimal control, especially in the context of modern power systems with Renewable Energy Sources [14,15].
In the extensive body of literature on Load Frequency Control, several methods have been proposed to effectively deal with the harsh power disturbances arising from the intermittencies of RES when integrated into the grid.These methods include state estimation techniques like Kalman filtering [1], Extended and Unscented Kalman Filter [16,17], data-driven modeling and system identification approaches [18], reinforcement learning based control [6,9,19,20], fuzzy logic control for rule-based adaptability [1,[21][22][23], and signal processing methods such as the wavelet transform [24].Among these diverse methodologies, H-infinity (H∞) control stands out as a control theory approach that seeks to design controllers to minimize the worst-case effects of uncertainty and disturbances in a system [25][26][27].In the context of Load Frequency Control, H∞ control plays a crucial role in achieving robust and optimal regulation of the power system's frequency and tie-line power flow while accounting for uncertainties and disturbances [25][26][27][28][29].However, these proposed methods in the literature to increase the control quality of RES integrated power systems exhibit various limitations.Kalman filtering [16,28,30], the Extended Kalman Filter and Unscented Kalman Filter [17] can be computationally demanding, making real-time implementation challenging.Fuzzy logic control relies on expert knowledge and rule-based systems, potentially making it less adaptable to unforeseen changes [31,32].H-Infinity control is generally complex to implement and necessitates a clear understanding of system uncertainties and performance specifications.
To address the limitations of these computationally expensive methods, researchers have turned their attention to metaheuristic methods as a promising alternative for optimal tuning of the controllers.Examples of the metaheuristic methods used for this application in the literature are the Grey Wolf Optimization algorithm [11,33,34], Genetic algorithm [35], Gases Brownian Motion Optimization (GBMO) algorithm [36], African Vulture Optimization [37], standard Particle Swarm Optimization (PSO) [38], Differential Evolution [39], Imperialist Competitive Algorithm [40], Magnetotatic Bacteria Optimizer (MBO) [18], and Firefly Algorithm [41].Many metaheuristic methods encounter premature convergence, resulting in suboptimal control parameters when applied to Load Frequency Control problems [42].Consequently, researchers have explored hybridization approaches [17,43,44] to enhance the optimization process and improve the quality of the parameters of the controllers.However, using hybrid algorithms to set their parameters can introduce complexities, resulting in increased computation time and implementation challenges [42].
The standard PSO has proven to provide high performance in many application areas [45].Its main advantage is that it has few parameters to tune.However, it does not always work properly in high-dimensional complex problems [45].Several variants of the PSO algorithm have been developed to enhance its performance without compromising its main advantage.The main objective of this paper is to use one of these variants developed by the authors to optimally tune the PID controllers for LFC of power systems integrated with renewable energy sources.This PSO variant called ADIWACO uses adaptive dynamic inertia weight and acceleration coefficients and it has proved to provide a better performance than the standard PSO and some PSO variants [46].The proposed control strategy is tested on a two-area power system integrated with RES.Seven scenarios are used for the performance evaluation.In one of the scenarios, physical constraints, specifically communication time delay and governor dead band are included.In a practical power system, the LFC will experience communication time delay if the control centres are distant from the generating units and power system generation operators make governor dead band settings to prevent unnecessary wear and tear of governor gate mechanical components.These constraints, commonly considered in various LFC studies [47][48][49][50][51], make the experimental assessment of the controller performance more realistic.
The rest of the paper is structured as follows: Section 2 presents the test system.Section 3 elaborates on the PID controller.Section 4 gives a brief overview of the PSO variant and how it is applied to tune the controllers of the test system.Section 5 presents the implementation.Section 6 presents the results and discussions.Finally, section 7 presents the conclusion of the study.

Test System
The two-area power system employed in this study has been widely used in the literature as a test system [6,22,23,29].Each area comprises non-reheater thermal and hydro plants, serving as representative units for coherent generators in both areas.The conventional power-generating plants are equipped with both primary and secondary control loops to regulate their power output.In addition, area 1 integrates wind and solar units, contributing independent and volatile power generation, leading to dynamic changes in the system alongside load perturbations, particularly in area 1.The two areas are connected by a single tie line.The differential equations for the two areas are coupled through the incremental tie line power equation.The block diagram of the test system is given in Figure 1.The parameters of the test system, taken from [40], are detailed in Table 1.The mathematical modeling of the two-area system for load frequency control can be found in the literature [41].

Controller
In the test system, the primary control is achieved through the speed governor systems of the hydro and thermal plants, while the secondary control is implemented through a PID controller with the objective of reducing the area control error to zero.The transfer function of the PID controller and the Area Control Error (ACE) are given by ( 1) and ( 2) respectively.
where Kp, KI and KD are the gain parameters of the proportional, integral and derivative terms which are to be optimally set for effective controller performance. , where i is the number of control areas, Bi is the bias coefficient of the i th area, Δfi is the change in frequency of the i th area and ΔPtie line is the change in tie line power.Four controllers are required, one for each conventional plant and there are 12 gain parameters to be determined.To obtain the optimal gain parameters using the metaheuristic algorithm, the Integral Time-Absolute Error (ITAE) was chosen as the fitness or cost function.The ITAE index is given by (3):

Overview of Improved PSO (ADIWACO)
The standard PSO is a swarm-based optimization technique inspired by the collective behavior of bird flocks or fish schools.In the PSO, a population of potential solutions, represented as particles, explores the solution space by adjusting their positions based on their own best-known solutions and the globally best solution found by the entire population [52].Mathematically, each particle's velocity, v and, position, x are updated iteratively using the following equations: where w = the inertia weight c1, c2 = acceleration coefficients, xi(t) = the current position of a particle, xi(t+1) = the updated position of a particle, pi(t) = the personal best of a particle, g(t) = the personal best of a particle, vi(t) = the velocity of a particle and vi(t+1) = updated velocity of the updated particle with the position xi(t+1) [52].
The standard PSO uses constant inertia weight and acceleration coefficients.The improved PSO enhances its performance by employing adaptive dynamic inertia weight and acceleration coefficients.
The inertia weight, w is defined as follows [46,53]: where wmax and wmin represent the upper and lower limits of the inertia weight respectively.The parameter μ lies in the range [0, 1].The acceleration coefficients are calculated at each iteration as follows [46]: where

number of the current iteration c
Maximum number of iterations (10) The hyperbolic tangent function is applied to δ to scale it to a range between 0 and 1.The function gives a smoother transition between the maximum and minimum inertia weight values as the iteration increases compared to the linearly decreasing inertia component alone [46,53] and the cosh function is applied to ψ to produce a smooth transition from the maximum acceleration coefficient Cmax to the minimum acceleration coefficient Cmin as the number of iterations increases.This gradual change in the values of the acceleration coefficients enables a controlled and stable optimization process, contributing to more reliable results [46].

Tuning Algorithm
The improved particle swarm optimization is implemented as follows to obtain the optimal parameters of the four PID controllers: Step 1: Model the two-area power system in Matlab/Simulink.
Step 2: Initialize the following PSO parameters: population size (N), dimension of particle (D), maximum number of iterations, minimum and maximum inertial weights, and minimum and maximum acceleration coefficients.Set initial personal and global best as infinity.
Step 3: Generate initial random population of particles with dimension D, each particle representing the gains of all the controllers.
Step 4: Introduce a step load perturbation and run the simulation.
Step 5: While iteration < maximum number of iterations do Calculate ITAE of each particle using (3) for a specified T If particle ITAE < particle best then particle best = particle ITAE If particle best < global best then global best = particle best end if end if Update particle velocities and positions using ( 4) and ( 5) respectively Step 6: Set the global best particle as the PID gain parameters.

Implementation
The performance of the proposed LFC strategy is evaluated on the test system presented in Figure 1 using Matlab/Simulink Software (R2023a).The parameters of the power system are presented in Table 1.

Optimal Tuning of the Controllers
The parameters of the PSO variant (ADIWACO) are presented in Table 2.For successful implementation of the algorithm, a maximum number of iterations of 100, commonly used in the literature for metaheuristic algorithms for this type of application, is chosen.The tuning was done using a step load perturbation of 0.1 pu in area 1 of the power system.The convergence rate curve given in Figure 2 shows that the algorithm converged in fewer than 20 iterations.Hence the maximum iterations of 100 was more than adequate.

Testing
The performance of the LFC was evaluated with the optimum gains obtained with the ADIWACO algorithm.In the literature, Magnetotatic Bacteria Optimizer (MBO) [18], Grey Wolf Algorithm [11], and a hybrid Firefly Algorithm and Pattern Search Technique [41] have been used to obtain the gain parameters of the PID controllers for this same test system.For comparison purposes, these gains were also used to evaluate the performance of the LFC.The gain parameters obtained with the algorithms are presented in Table 3.Seven scenarios consisting of diverse load, solar generation and wind generation perturbations were considered for the testing.

Scenario 1
A step load perturbation of 0.1 pu was applied in area 1.The frequency and the tie line power responses for the four algorithms are compared in Figures 3 to 5. The corresponding ITAE values and essential characteristics of the wave forms are presented in Table 4. Apart from the overshoot in area 1 frequency response of 0.0021 Hz, ADIWACO produced the least overshoot (Osh), undershoot (Ush) and settling time (ST) in areas 1 and 2 frequencies and tie line power responses.The 0.0021 Hz overshoot is a slight departure from the best recorded values of 0 by MBO and hFA-PS.With regard to the ITAE value which serves as quantitative indicator of the overall performance of an algorithm, ADIWACO yielded a value of 0.01486, representing a notable improvement of 97.8% over MBO, 94.03% over GWO, and 92.5% over hFA-PS.With the ADIWACO-tuned controllers, the settling times of Δf1, Δf2 and ΔPtie improved by more than 32.39%, 72.91% and 55.31% respectively compared to any of the three other algorithms.These results clearly show the superiority of the ADIWACO algorithm over the others.

Scenario 2
A random load perturbation in Figure 6 representing a continuous load variation is applied in area 1.The resulting frequency and tie line power responses are compared in Figures 7 to 9. The characteristics of the wave forms and the ITAE values are given in Table 5. ADIWACO once again yielded a minimal ITAE value of 0.9826, representing a reduction of 89.84%, 86.51% and 84.44% over MBO, GWO and hFA-PS respectively.With regard to area 1 frequency response overshoot, ADIWACO recorded an improvement of 34.6%, 53.05%, and 55.02% over MBO, GWO, and hFA-PS respectively.In the case of frequency response undershoot, the improvement is approximately 43.02% over each of the other three algorithms.A similar trend is observed in area 2 frequency response.Concerning the tie line power changes, ADIWACO demonstrated an improvement of over 70.96% in the overshoot and 93.51% in the undershoot compared to MBO, GWO or hFA-PS.This consistent performance across the performance criteria reaffirms the superiority of ADIWACO in rejecting load disturbance.

Scenario 3
A step wind generation perturbation of 0.1 pu was applied.Figures 10-12 show the frequency and the tie line power responses.The characteristics of the wave forms and the ITAE values are given in Table 6.Once again, the ADIWACO algorithm produced the best ITAE value and overshoots in the frequency and tie line power responses.Its ITAE value of 0.0319 represents an impressive improvement of over 90% compared to the value obtained with any of the other algorithms.Moreover, ADIWACO showed substantial improvement of 70% or more in frequency response overshoots for both areas and 75% or more in tie line power response overshoots.The undershoots were 0 for all four algorithms.Here too the overall performance of the ADIWACO algorithm was better than all the others.

Scenario 4
A step solar generation perturbation of 0.05 pu was applied.The frequency and the tie line power responses are shown in Figures 13-15.The ITAE value and relevant characteristics are given in Table 7.The ADIWACO algorithm yielded the best ITAE value of 0.0469.This figure represents a remarkable improvement of over 90% when compared to the ITAE values obtained with controllers tuned by MBO, GWO or hFA-PS.Additionally, ADIWACO yielded more than 75% and 68% improvements in frequency and tie line power response overshoots respectively, when compared to any of the three other algorithms.The undershoots were 0 for all four algorithms.In this scenario the ADIWACO algorithm again outperformed all the others.ΔPtie(pu) Osh (Hz) Ush (Hz) Osh (Hz) Ush (Hz) Osh (pu) Ush (pu) ADIWACO 0.0469 0.003 0 0.002 0 0.0012 0 MBO [18] 1.4274 0.018 0 0.016 0 0.0063 0 GWO [11] 0.5705 0.015 0 0.012 0 0.0044 0 hFA-PS [41] 0.7684 0.012 0 0.009 0 0.0038 0

Scenario 5
A combined step wind and solar generation perturbations of 0.05 (as in scenario 3) and 0.1 pu (as in scenario 4) respectively were applied.The frequency and the tie line power responses are given in Figures 16 to 18, and the ITAE values and characteristics of the wave forms in Table 8.It can be shown from the results presented in the table that the ITAE value and the overshoots in Δf1, Δf2 and ΔPtie responses obtained with the ADIWACO algorithm are reduced by over 90%, 70%, 50% and 90% respectively compared to any of the three other algorithms.The combined effect of the two renewable energy generation perturbations confirms the efficacy of the ADIWACO algorithm as compared to the others.ΔPtie(pu) Osh (Hz) Ush (Hz) Osh (Hz) Ush (Hz) Osh (pu) Ush (pu) ADIWACO 0.0151 0.011 0 0.018 0 0.0021 0 MBO [18] 1.4264 0.061 0 0.055 0 0.0248 0 GWO [11] 0.1823 0.054 0 0.042 0 0.0162 0 hFA-PS [41] 0.2407 0.042 0 0.037 0 0.0410 0

Scenario 6
The random load perturbation in Figure 3 was applied together with wind and solar generation perturbations from reference [32].The two generation perturbations are shown in Figure 19.This scenario is used to verify the performance of the controllers in the presence of variable renewable energy sources.Figures 20 and 22 show the frequency and the tie line power responses.Table 9 gives the ITAE values and characteristics of the wave forms.The performance of the ADIWACO algorithm is seen to be far better than the three well-known algorithms.These results affirm the robustness of the ADIWACO algorithm in effectively managing the intricate dynamics introduced by the combined impact of random load fluctuations and variable renewable.

Scenario 7
The effectiveness of Load Frequency Control (LFC) controllers can be overly optimistic if crucial physical constraints like communication time delay and governor dead band are ignored.In this scenario, a governor dead band setting of 100 mHz as used by the Ghana Grid Company is introduced in the test system.Also a communication time delay of 5 milliseconds representing an estimated latency for fiber optic communication spanning over 1000 km [54] is introduced.The test system is then subjected to load, solar and wind perturbations described in scenario 6.The results presented in Figures 23-25 show the remarkable performance of the ADIWACO-tuned PID controllers under these two physical constraints, surpassing the other algorithms in terms of overshoot, undershoot in the responses of area1 and area 2 frequencies, and the tie line power.In particular, from Figures 23-25, the performance of the MBO, GWO and hFA-PS tuned controllers is seen to be very poor in respect of the undershoot from the time t = 0 to t = 5s (hFA-PS = −0.38Hz, GWO = −0.43Hz, MBO = −0.43Hz).Furthermore, with the ADIWACO-tuned PID controllers, the various responses show little difference with or without the physical constraints.For instance, area 1 frequency response has an overshoot of 0.0 Hz and 0.04 Hz with and without the constraints respectively.The corresponding figures for the undershoot are 0.1 Hz and 0.08.This again confirms the robustness and efficacy of the proposed LFC strategy, and its potential application to real-world power systems.

Conclusion
This paper proposes an improved PSO algorithm called ADIWACO to optimally tune PID controllers for load frequency control of power systems integrated with renewable energy sources.The performance of the algorithm is evaluated on a two-area power system widely used in the literature.The ITAE is chosen as the cost function to obtain the gains of the PID controllers.Seven scenarios comprising diverse load, solar generation and wind generation perturbations are used for the performance evaluation.In one of the scenarios, governor dead band and communication time delay are incorporated in the test system for more realistic performance evaluation.To demonstrate the superiority of the proposed load frequency control strategy, simulation results are compared with those of three well known metaheuristic algorithms used in the literature for the same application, namely Magnetotactic Bacteria Optimizer, Grey Wolf Algorithm, and a Hybrid Firefly Algorithm combined with the Pattern Search Technique.When compared with any of three algorithms, the ADIWACO algorithm is seen to provide over 60% improvement in the overshoots in frequency and tie line power responses across all the seven considered scenarios and more than 50% improvement in the undershoot in all scenarios where undershoot occurs.The only exception is the overshoot in area 1 frequency response following the application of a step load perturbation in area 1.Even in this case, the overshoot (0.0021 Hz) is a slight departure from the best recorded value of zero.In respect of the ITAE value which serves as quantitative indicator of the overall performance of an algorithm, the ADIWACO shows an improvement of over 80% in all scenarios when compared with any of the three other algorithms.With the application of a step load perturbation of 0.1 pu in area 1, the ADIWACO-tuned controllers improve the settling times of the area1 frequency, the area 2 frequency and the tie line power by over 32.39%, 72.91% and 55.31% respectively compared to any of the three other algorithms.Again, when a governor dead band and a communication time delay are included in the test system, the ADIWACO algorithm outperforms all the three other algorithms.The simulation results show clearly the superior performance of the proposed algorithm, positioning it as a promising tuning algorithm for PID controllers for load frequency control in RES-integrated power systems.

Figure 1 .
Figure 1.Bock diagram of test system

Figure 2 .
Figure 2. Convergence profile of proposed algorithm for the test system with PID controller

Figure 19 .
Figure 19.Solar and wind generation perturbations

Table 1 .
Test System Parameters

Table 2 .
Parameters of PSO for Optimal PID tuning

Table 3 .
Optimal gain parameters obtained