An Improved Lightning Attachment Procedure Optimizer for Optimal Reactive Power Dispatch With Uncertainty in Renewable Energy Resources

Integrating renewable energy resources (RERs) has become the head of concern of the modern power system to diminish the dependence of using conventional energy resources. However, intermittent, weather dependent, and stochastic natural are the main features of RESs which lead to increasing the uncertainty of the power system. This paper addresses the optimal reactive power dispatch (ORPD) problem using an improved version of the lightning attachment procedure optimization (LAPO), considering the uncertainties of the wind and solar RERs as well as load demand. The improved lightning attachment procedure optimization (ILAPO) is proposed to boost the searching capability and avoid stagnation of the traditional LAPO. ILAPO is based on two improvements: i) Levy flight to enhance the exploration process, ii) Spiral movement of the particles to improve the exploitation process of the LAPO. The scenario-based method is used to generate a set of scenarios captured from the uncertainties of solar irradiance and wind speed as well as load demand. The proposed ILAPO algorithm is employed to, optimally, dispatch the reactive power in the presence of RERs. The power losses and the total voltage deviations are used as objective functions to be minimized. The proposed algorithm is validated using IEEE 30-bus system under deterministic and probabilistic conditions. The obtained results verified the efficacy of the proposed ILAPO for ORPD solution compared with the traditional LAPO and other reported optimization algorithms.

Several problems are related to RERs, including the stochastics natural and the continuous fluctuations which lead to the uncertainties in power systems. Thereby, it is an important issue to consider the uncertainties of RERs for efficient planning. Several papers were presented to solve the ORPD with taken into consideration the uncertainty in the power system. In [28], the adaptive differential evolution has been utilized to address the ORPD, and the uncertainties of RERs and loads were considered using a scenario-based strategy. In [29], have the Quantum-behaved particle swarm optimization differential mutation (QPSODM) has been employed for solving the ORPD under RERs and load uncertainties on the practical Adrar's power system and IEEE 14-bus. The MSA has been used for solving the ORPD considering the stochastic natural RERs and load [9]. In [30], have solved the ORPD, considering the uncertainties of the wind and load powers. In [31], the two-point estimation method has been applied for uncertainty modelling of the load for solving ORPD.
LAPO is a recent algorithm presented by Nematollahi et al. [32], [33]. LAPO mimics the lightning procedure phenomenal, it starts from initial spots, which mimic the initial solutions, and the strike point mimics optimal solution and movement of the uploaders, and downloaders simulate the updating process of the optimization algorithm. LAPO has been implemented to solve numerous optimization problems. the authors in [34] have implemented the LAPO technique to find the best position and sizing of the unified power flow controller in the transmission system. Y. Heba et al. used the LAPO for solving the OPF problem [35]. In [36], the LAPO technique has been used to assign the optimal ratings and placement of the DGs in the distribution grid. W. Lui et al. have applied the LAPO for optimization the image segmentation [37]. It should be pointed out that LAPO may be tripped to local optima in some cases. Thus, an improved LAPO is proposed to solve the stagnation of LAPO.
The main paper contributions can be itemized as: 1-Proposing a modified version of the traditional LAPO using levy flight and spiral movement to improve the searching abilities. 2-Applying the proposed algorithm to address the ORPD problem under inclusion RERs. 3-The ORPD is solved under the uncertainties of load demand and the RERs including the wind and solar PV sources. 4-The scenario-based method is utilized to produce a set of scenarios to combine scenarios of the load, solar irradiance, and wind speed. 5-The proposed algorithm is applied and validated using IEEE 30-bus system and compared with other techniques. The arrangement the paper is adjusted as follows: Section 2 describes the problem formulation. Section 3 explains the uncertainty modeling in the power system. An overview of LAPO and ILAPO is depicted in Section 4. The captured results are shown in Section 5. Finally, the paper conclusions are listed depicted in Section 6.

II. PROBLEM FORMULATION
The main task of the ORPD is assigning the optimal operating point for power losses and voltage deviation minimization as well as the stability enhancement with satisfying the system constraints. The ORPD problem is described as follows: where, g k and h n denotes the equality and inequality constraints. u and x are two vectors of the control and the dependent variables as depicted in equations (4) and (5) where, V G , Q C , and T p are the generator voltage, reactive power of the capacitor, and the transformer tap, respectively. P 1 , V L , Q G , and S T are the slack bus power, voltage of the load bus, and apparent power flow in the transmission line, respectively.
where P Loss represents the power losses; G ij is the conductance of the transmission line between buses i and j; N L is the number of the transmission lines.

2) VOLTAGE DEVIATIONS
where TVD is the summation of the voltage deviations; N Q is the number of PQ buses.
where min and max are superscripts for the minimum and maximum limit of the dependent and control variables; N G is the number of generators; N T is the number of taps, N L the number of transmission lines.

2) QUALITY CONSTRAINTS
where B ij is the substance of the TL between buses i and j. δ i and δ j are the voltage angles of buses i and j, respectively.
To avoid any violation of the system constraints, they should be considered in objective function weighted square variables as follows: where k 1 , k 2 , k 3 , and k 4 are the penalty factors. lim is a superscript denotes the allowable maximum or the minimum limit.

III. UNCERTAINTY MODELING
Three uncertainty parameters are considered in this study, including load demand and wind and PV sources, which depend upon the wind speed and solar irradiance. The probability density functions (pdfs) are utilized for modeling these uncertainties where the continuous is divided into subsections to obtain a set of scenarios.

A. THE UNCERTAINTY OF LOAD DEMAND
The normal PDF is utilized to model the uncertainty of load demand as follows [30]: where σ L and µ L denote the standard deviation and mean values, respectively. The selected values of the σ L and µ L are 70 and 10, respectively [28]. The portability of load demands and the followed expected load scenarios are obtained as [38]: where P max L,i and P min L,i represent the maximum and the minimum limits of the selected interval i. Three scenarios of load demand are generated in this paper. By applying the VOLUME 8, 2020 previous equations, the generated load scenarios and their corresponding probability are listed in Table 1.

B. THE UNCERTAINTY OF THE WIND SPEED
Weibull PDF is employed for modelling the uncertainty of the wind speed as follows [39]: where β and α represent the shape and the scale parameters of the Weibull PDF, the values of α and β are adopted to be 10.0434 and 2.5034, respectively, as given in [38]. The output power of the wind turbine P wg (v) as in terms of the wind speed and rated power is defined as follows [40]: where P wr is the wind turbine rated power; v ωi is the cut-in speed, v ωr is the rated speed, and v ωo is the cut-out speed of the wind turbine. The portability of wind speed for each scenario is obtained as follows [38], [41]: where π w,k is the wind speed probability in scenario k; v min k and v max k denote the starting and ending points of wind speed's interval at k-th scenario, respectively. Three scenarios for wind speed are generated from the previous equations. The probability of the scenarios and the corresponding wind speed are shown in Table 2.

C. MODELING THE UNCERTAINTY OF THE SOLAR IRRADIANCE
Beta PDF is employed for modelling the uncertainty of solar irradiance (G), which can be described as follows [42]: where denotes the gamma function; α and β represent the parameters of the beta PDF which is calculated using (26) and (27) where, σ s the standard deviation is the while µ s is the mean value of the solar irradiance. The selected values of α and β are 6.38 and 3.43, respectively, as given in [43]. The output power of the PV system depends upon the solar irradiance, and it can be assigned using (28) as follows [44], [45].
where P sr denotes the rated power of the solar PV units. G std represents the standard solar irradiance, which is set as 1000 W/m 2 . X c represents a certain irradiance point, which is set as 120 W/m 2 [28]. The portability and the corresponding of solar irradiance for each scenario can be calculated as follows [41]: where π s,m represents the probability of the solar irradiance of m-th scenario. G min m and G max m denote the lower and upper points of solar irradiances of m-th scenario. In this paper, three scenarios of the solar irradiance are generated where the probabilities of these scenarios and the corresponding irradiance are depicted in Table 3. A scenario-based method is employed to obtain a set of scenarios from the above scenarios by combining the load, wind, and solar irradiance scenarios, their probabilities are obtained as follows:

IV. OVERVIEW OF LAPO
LAPO technique mimics the mechanism of the lightning phenomena. lightning occurrence is based on four steps describe the main this phenomenon, including breakdown of the air, the descending leader movement, the ascending leader motion, and the strike point.

A. LAPO ALGORITHM 1) AIR BREAKDOWN
The charges formation in the cloud is shown in Figure 1, it is obvious that large amount of negative charges are existed at the bottom with a small quantity of the positive charges while a huge quantities of positive charges are located at the top of the cloud. The amount of charges increase which leads to the breakdown inside the cloud and increasing the voltage of the cloud edges [32], [33].

2) MOTION OF THE DOWNWARD LEADER TO THE GROUND
The motion of lightning to the ground is in steps. After each step, the lightning will be stopped, while in the next movement, the lightning goes to earth in one or more directions, which represents the downward leader. To mimic the lightning procedure, consider a half-sphere is existed after finishing each procedure, below the leader slant allied to its middle point and circles of the upcoming step, as shown in Figure 2. The half-sphere includes several potential points which have been followed for the next leap point. The updated points are randomly selected which has a higher value of the electrical field.

3) BRANCH VANISHES
The next point is splinted into several points to form several branches. With occurrence this step is repeated the air breakdown until absence of breakdown. The branches will stop and disappear.

4) UPWARD LEADER SPREAD
As mentioned before, due to accumulation a huge of negative charge at the bottom of the cloud. Consequently, the positive charges will appear at the ground at the sharp points. Increasing the amount of these charges, the air breakdown will occur, and the upward leader emerged from these sharp points. The upward leaders move to the earth to be combined with the downward leader faster.

5) FINAL JUMP
The final jump point denotes the point that the upward and the downward leaders are combined. This point represents the strike point where the branches are vanished, which leads to neutral charge.

B. MATHEMATICAL REPRESNTATION OF LAPO
The mathematical representation of LAPO are depicted using the listed steps as follows: Step 1: Initialization Initial search agents represent the initial test points which denote the starting points of the upward leaders. These points are generated randomly using (32) where X i min denotes the minimum of the i-th variable while X i max denotes the maximum limits, respectively. rand denotes the random number in the range [0,1]. The fitness functions of the initial points are calculated as follows: Step 2: The next jump determination The average point (X avr ) is assigned and also its corresponding fitness function (F avr ).
For updating the location of the point (population) anther point randomly j where i = j is selected and a comparison VOLUME 8, 2020 between the value of the point j and the averaged value as follows: When f X j ts > f (X avr ) When f X j ts < f (X avr ) Step 3: Branch vanishes Branch disappears or vanishes; it can be accomplished by mean acceptance of the new point. The updated obtained point is accepted if it's objective function is better than the original point as follows: These steps will be applied for all points, and all test points are taken as downward leaders and moved down.
Step 4: Upward leader motion In this step, all points are considered upward leaders and go upward. The orientation of the upward leaders follows the motion of the downward leaders, which is controlled by an exponential operator through the channel, which can be modeled using (40) as: where: where; t max and t denote the maximum and the current numbers of iteration the iteration number, respectively; X best is the best solution; X worst represents the worst solution.
Step 5: Final jump This step represents the final step of the lightning when it occurs when the down leader and up leader are combined at a specific point called the striking point.

V. OVERVIEW OF ILAPO
LAPO is an effective algorithm to solve several optimization problems. However, it is like several meta-algorithms. It may be prone to local optima and stagnation in some cases. The proposed ILAPO is based on emphases the searching ability of the traditional LAPO by enhancing its exploration and exploitation phases. The exploration phase at the first iterative process is adapted by updating the placement of the test points randomly using the Levy Flight as follows [46], [47]: where ∝ represents a step size parameter which can be obtained as follows: where u and v can be found from (44) and (45) as follows: where denotes the standard gamma function. In the final iterative process, the exploitation phase is improved by updating the points around the best solution in a spiral pass using a logarithmic spiral function as follows: where b denotes a constant to define the logarithmic spiral shape.

VI. SIMULATION RESULTS
The proposed algorithm in this section is applied to addresses the ORPD, and it is tested on the IEEE 30-bus system. The program code for solving the ORPD was written by MATLAB software, and it has been performed on a Core I5 PC with 4GB RAM. The IEEE 30-bus system has six thermal generation units at bus#1, bus #2, bus #5, bus #8, bus #11, and bus #13. The system branches and bus data are captured in [20]. The control variables limits are tabulated  in Table 4, and the step size of transformer taps, and the injected capacitor reactive power are 0.01 p.u. The ORPD is solved with and without taken into consideration the stochastics nature or the uncertainties of the RERs and load demand where the IEEE 30-bus is modified by adding wind turbines at bus 5 and PV units at bus 8 as depicted in Figure 3. The selected search agent and maximum iteration numbers for all VOLUME 8, 2020 The aim of addressing the ORPD solution here is to diminish the power losses (P Loss ) and summation voltage deviations (TVD) without considering RERs. The simulation results, including the optimized variables by ILAPO and LAPO, are tabulated in Table 5. The power losses by applying ILAPO and LAPO are 4.5217 MW and 4.5428 MW. Table 6 shows a comparison of the obtained results for power losses minimization by several optimization algorithms. Judging from Table 6, the minimum power losses are achieved by applying the proposed algorithm compared with the traditional LAPO and the other reported techniques. The obtained TVD by using ILAPO and LAPO are 0.0876 p.u and 0.0903 p.u, respectively. Table 6 shows a comparison of the captured results of the TVD by other algorithms. referring to Table 6; the achieved TVD by using the proposed algorithm is less than the traditional LAPO and the other listed techniques. Figures 4 and 5 show the trends of the P Loss and TVD by application of ILAPO and LAPO. According to these figures, the proposed algorithm has stable performance characteristics without oscillation.

B. CASE 2: SOLVING THE ORPD CONSIDERING THE UNCERTAINTIES OF LOAD DEMAND AND RERs
The aim of the ORPD solution here is reducing the expected power losses under the uncertainties of load demand and  RERs, which based on the uncertainties of wind speed (v) and solar irradiance (G). In the modified IEEE 30-bus system, a wind farm and solar PV system are incorporated in bus 5 and bus 8, respectively. The wind farm contains 25 turbines, and the turbine rated power is 3 MW, while its v ωr v ωo and v ωi are 16 m/s, 25m/s, and 3m/s, respectively. The rated power of the PV system is 50 MW and G std is 1000 W/ m 2 [31].
In this case, a combination of the probabilities of the solar irradiance, the load, and the wind speed using the scenario-based method are performed. In sequent 27 scenarios are produced. The generated scenarios and the equivalent  probabilities are given in Table 7. The main target of solving the ORPD with the uncertainties of the system, to minimize the expected power losses, which can be determined as follows: where Total_EPL denotes the total expected power losses; EPL n denotes the expected power losses of i-th scenario; π S,i denotes the probability of n-th scenario. Table 8 shows the output powers of the solar and wind systems, the power losses and the EPL for each scenario. The Total_EPL without inclusion RERs is 5.0003 MW while the Total_EPL that gained by LAPO and ILAPO 2.0116 MW and 1.9887 MW, respectively. Figure 5 illustrates the voltage profile of the system for all scenarios. The voltage profiles for all scenarios are within the allowable limits, which is [0.9-1.10] p.u. VOLUME 8, 2020

VII. CONCLUSION
This paper has presented an efficient Improved Lightning Attachment Procedure Optimization Algorithm to address the ORPD problem. Minimizing the system active losses and the voltage deviations under deterministic and probabilistic conditions have been considered. Two improvements have been applied to the traditional LAPO technique, including Levy Flight distribution for enhancing the exploration of the algorithm and a logarithmic spiral movement of the test points around the optimal solution for enhancing the exploitation of the algorithm. The ORPD problem has been addressed under three uncertain parameters, load demand, the wind speed of the wind turbines, and the solar irradiance of the PV unit, which have been represented by the normal PDF, Weibull PDF, and Beta PDF respectively. A set of scenarios is obtained by a combination of these uncertainties for minimizing the expected power losses. The proposed ILAPO was tested on the IEEE 30-bus system. The obtained results verified that the minimum power losses and voltage deviations obtained by applying the proposed improved technique compared with LAPO and the other reported optimization techniques. Furthermore, the expected power losses at uncertainties of the system is minimized by 60.23 % compared with the base case.