Optimal Power Flow Solution of Power Systems with Renewable Energy Sources Using White Sharks Algorithm

: Modern electrical power systems are becoming increasingly complex and are expanding at an accelerating pace. The power system’s transmission lines are under more strain than ever before. As a result, the power system is experiencing a wide range of issues, including rising power losses, voltage instability, line overloads, and so on. Losses can be minimized and the voltage proﬁle can be improved when energy resources are installed on appropriate buses to optimize real and reactive power. This is especially true in densely congested networks. Optimal power ﬂow (OPF) is a basic tool for the secure and economic operation of power systems. It is a mathematical tool used to ﬁnd the instantaneous optimal operation of a power system under constraints meeting operation feasibility and security. In this study, a new application algorithm named white shark optimizer (WSO) is proposed to solve the optimal power ﬂow (OPF) problems based on a single objective and considering the minimization of the generation cost. The WSO is used to ﬁnd the optimal solution for an upgraded power system that includes both traditional thermal power units (TPG) and renewable energy units, including wind (WPG) and solar photovoltaic generators (SPG). Although renewable energy sources such as wind and solar energy represent environmentally friendly sources in line with the United Nations sustainable development goals (UN SDG), they appear as a major challenge for power ﬂow systems due to the problems of discontinuous energy production. For overcoming this problem, probability density functions of Weibull and Lognormal (PDF) have been used to aid in forecasting uncertain output powers from WPG and SPG, respectively. Testing on modiﬁed IEEE-30 buses’ systems is used to evaluate the proposed method’s performance. The results of the suggested WSO algorithm are compared to the results of the Northern Goshawk Optimizer (NGO) and two other optimization methods to investigate its effectiveness. The simulation results reveal that WSO is more effective at ﬁnding the best solution to the OPF problem when considering total power cost minimization and solution convergence. Moreover, the results of the proposed technique are compared to the other existing method described in the literature, with the results indicating that the suggested method can ﬁnd better optimal solutions, employ less generated solutions, and save computation time.


Introduction
Currently, the electrical power system has become a more complex network that is growing day by day. The electrical grid's transmission system has more risk than it has ever had previously. As a result, for congested networks, the power system faces numerous issues such as increased power loss, voltage instability, line overloading, and so on. As

•
The white shark optimizer (WSO), a novel meta-heuristic algorithm proposed in [25], is employed to efficiently solve the OPF issue in this study; • The proposed algorithm is developed to test an IEEE-30 bus system with double wind farms and a single solar photovoltaic to determine if it can discover the best results for the OPF problem using renewable power in both unpractical and real scenarios; • Three other application algorithms, Smell Agent Optimization (SAO) [26], Northern Goshawk Optimization (NGO) [27], and Pelican Optimization Algorithm (POA) [28], are used in the proposed model in order to compare their outputs to those of WSO; • The four algorithms were prepared to find the optimal solution after 10 runs and 300 iterations. The best three solutions are selected among the ten to be presented in the results and used to study the convergence for each case in terms of reaching the optimal solution for scheduling and using power from different power plants; • In addition, the solutions of the proposed method are compared with the method (ESMAOPF) that the authors used in [18], where the enhanced slime mold algorithm was used instead of conventional SMA, for solving the optimal power flow problem. The comparison showed the success of WSO over ESMAOPF in terms of achieving a lower total generating cost.
The next sections make up the remainder of this paper. The OPF problem's mathematical model and its related constraints are shown in Section 2. Section 3 introduces the WPG and SPG uncertainty output models. Section 4 develops a new proposal for applying WSO to OPF, which contains the uncertain RES. For each of the four methods under examination, Section 5 presents simulation results from a range of real-world studies wherein WSO was used to solve the OPF problem under the same conditions as other algorithms to see if it was legitimate. In Section 6, the conclusions of this work are stated. Finally, future work is presented in Section 7.

Optimal Power Flow Mathematical Models
OPF is a general optimization problem that aims to optimize a certain objective function through the optimal setting of control variables within operational, equality, and inequality constraints.
The optimization problem can be formulated as follows: Subject to g i (x, u) = 0 i = 1, 2, 3, . . . , m h j (x, u) ≤ 0 j = 1, 2, 3, . . . , n where F is the objective function, x is the state variable's vector, u is the control variable's vector, g i , h j are the equality and inequality constraints, and m, n are the number of equality and inequality constraints. The state variables (dependent variables) can be expressed in a vector form as follows: x = P G1 , V L1 . . . V LNPQ , Q G1 . . . Q GNPV , S TL1 . . . S TLNTL (4) where P G1 is the generated power of slack bus, V L is the voltage of load bus. NPQ is the number of load buses. Q G is the reactive power output of generators. NPV is the number of generation buses. S TL is the apparent power flow in transmission line. N TL is the number of transmission lines. The control variables (independent variables) can be expressed in a vector as follows: where P G is the output active power of generator, NG is the number of generators. VG is the voltage of the generation bus. Q C is the injected reactive power of the shunt compensator.
NC is the number of shunt compensators. T is the tap setting of transformers. NT is the number of transformers. Table 1 lists the basic specifications of the upgraded IEEE-30 bus network. Figure 1 shows a single line diagram of the modified network. Three main types of power-generating resources are included in the upgraded network: constant-output thermal energy generators (TG), variable-output solar photovoltaics generator (SPG), and variable-output wind farms (WPG). This volatility in photovoltaic/wind production should be compensated by combining all power stations and backup power, resulting in a total cost of production that includes all generator operating costs, reserve expenses, and penalty costs. wind farms (WPG). This volatility in photovoltaic/wind production should be compensated by combining all power stations and backup power, resulting in a total cost of production that includes all generator operating costs, reserve expenses, and penalty costs.

Thermal Power Generation Cost
TPGs are powered by fossil fuels. The fossil fuel cost (USD/h) of all TPGs can be calculated using Equation (6).
where the cost coefficients of the ith thermal power unit generating power P are a, b, and c. The network's total number of thermal generators is N TG . Because valve point loading influences the overall cost of fuel, accounting for it results in a more accurate and reliable cost, as shown in Equation (7). Table 2 lists all of the cost and emission coefficients for the TPGs that are utilized in cost calculations. These were taken, as in ref. [30], to be used in the calculations of the total cost of generation.

Direct Cost of Wind and Solar Photovoltaic
There is no need for fossil fuels in wind and solar power generators. If the independent system operator (ISO) owns the plants, the cost function may not exist unless ISO wants to attribute a payback cost to the initial expenditure for the plants or assign this as a maintenance and renewal cost.
The concept specifies the total costs of wind electricity produced by jth wind generator in relation to its planned power in (8).
Similarly, the direct cost of the kth solar power photovoltaics power generation is as follows:

Cost Estimation for Wind Power with Uncertain Output
Two situations are possible because of the discontinuous generation of wind power. When wind plant's output power falls short of the expected output power, the first scenario occurs. This is referred to as an overvaluation of power level. In this case, the system operator employs spinning reserve to maintain a consistent source of electricity to customers. In order to fix this problem, committed reserve power units need to pay reserve costs. For the jth WPG, this cost can be calculated as follows: C rw.j P ws.j − P wa.j = K rw.j P ws.j − P wa.j = K rw.j P ws.j 0 P ws.j − P w.j × f w P w.j dP w.j (10) The second situation occurs when the wind power plant's output exceeds the expected the output power value. This is referred to as an underestimate of output power. As a result, if the leftover power cannot be consumed by reducing the output power of conventional generators, it will be lost. In this case, ISO is obligated to pay a penalty cost linked with the remaining power. For the jth WPG, this cost can be calculated as follows: C pw.j P wa.j − P ws.j = K pw.j P wa.j − P ws.j = K pw.j P wr.j P ws.j P w.j − P ws.j × f w P w.j dP w.j (11)

Cost Estimation for Solar Power with Uncertain Output
Solar energy, as with wind energy, has an unpredictable and intermittent production. Undervaluation and overvaluation of the photovoltaic electrical output should be addressed in the same way that the undervaluation and overvaluation of the wind electrical output are addressed in theory. To make computations easier, penalty and reserve simulation methods are developed using the methods provided in ref. [31]. This is due to the fact that solar irradiation following a lognormal PDF [32], which is notably different from the Weibull PDF applied for wind velocity distribution.
The solar PV power plant kth surplus cost is computed by the following formula: The calculation for the penalization cost related to the kth solar photovoltaic power is shown in Equation (13).

Emission
Using traditional energy sources to generate electricity is widely known for releasing greenhouse gases into the atmosphere. SO x and NO x are two of these hazardous gases, and their emissions rise in tandem with the amount of power generated by traditional power producers. Equation (14) illustrates the link between emissions in (t/h) and output power (in p.u. MW): where α i , β i , γ i , ω i , and µ i are emission coefficients. Table 2 shows the values of emission coefficients connected to the thermal power generator, which are close to the numbers in [30]. As shown in Equations (7)-(13), the optimum objective for OPF is generated by combining all cost function models. Emission cost is ignored in the objective function (F1). The objective function (F2) is created, incorporating emission cost, to elucidate the variation in generation scheduling while considering an emission, as shown in Equation (15).
h j P w.j + K rw.j P ws.j − P wa.j +K pw.j P wa.j − P ws.j + N SG ∑ j=1 g k P s.k + K rs.k (P ss.k − P sa.k ) + K ps.k (P sa.k − P ss.k ) Minimize the second objective function.
Several system equality and inequality requirements apply to the above-mentioned OPF objective functions.

Equality Constraints
Power flow balancing is subject to equality requirements, which requires that produced real and reactive power are equivalent to the demand and the losses of the network. The following are the equality constraints [16]: ∆ ij = (δ i − δ j ) denotes the angle of voltage difference, NB = network number, P Di , Q Di , P Gi , and Q Gi denote active and reactive components of load demand and generation, respectively, for any of the energy resources, whether traditional or renewable. G ij and B ij , = conductance and susceptance, respectively.

Inequality Constraints
The operational limits of components and equipment in a power system are represented by the inequality constraints. Safety limitations on transmission lines and load buses are among these constraints.
The reactive power limits of all generators employing the same configuration are represented by Equations (22)- (24). N G stands for the number of generator buses or generators.
The voltage constraints on generator buses are shown in Equation (25).

Safety Constraints
Equation (26) depicts the voltage limits applied to load buses, whereas (27) depicts transmission line capacity constraints.
where V Lp is line voltage limits subjected to PQ buses (load buses). When studying the OPF problem, power losses (P loss ) in transmission lines and voltage deviation (V d ) are additional and important elements to consider. It is impossible to prevent power losses from power transmission lines due to their persistent resistance. The grid's P loss is determined by: where V i and V j represent the voltages applied to buses i and j, respectively. The voltage deviation (V d ) in a power system specifies how far load bus voltages diverge from the nominal voltage level, which is typically 1 p.u. The voltage deviation (V d ) is a measurement of how far load bus voltages deviate from a nominal voltage value, which is commonly 1 p.u. V d indicates the voltage quality of the power system.

Renewable Energy Source Probability Distribution
For wind turbine mean power estimates, ref. [31] indicated that the wind speed distribution follows the Weibull probability density function (PDF). According to the Weibull PDF, the probability of wind speed is given by: where Γ is gamma function which is defined as follows: In this paper, as shown in Figure 1, the IEEE system with 30 buses has been updated by changing two thermal generators on buses 5 and 11 with two wind turbine generators, as well as replacing thermal generators at bus 13 with Solar PV. Table 3 shows the settings for the Weibull scale (c) and shape (k) variables that are used. Figure 2 shows the results of the Weibull fitting for wind frequency distributions. They were obtained by an 8000-iteration Monte Carlo simulation [16]. In this paper, as shown in Figure 1, the IEEE system with 30 buses has been updated by changing two thermal generators on buses 5 and 11 with two wind turbine generators, as well as replacing thermal generators at bus 13 with Solar PV. Table 3 shows the settings for the Weibull scale (c) and shape (k) variables that are used. Figure 2 shows the results of the Weibull fitting for wind frequency distributions. They were obtained by an 8000iteration Monte Carlo simulation [16].  The output of a photovoltaic generator is determined by sun irradiation (R); it has a log-normal probability distributer (PDF) [32]. The probability of sun irradiation (R) is provided by the following log-normal PDF: Figure 3 depicts the frequency distribution and lognormal probability for solar irradiation derived from an 8000-iteration Monte Carlo simulation. Table 3 shows the lognormal PDF parameter values that are used.  The output of a photovoltaic generator is determined by sun irradiation (R); it has a log-normal probability distributer (PDF) [32]. The probability of sun irradiation (R) is provided by the following log-normal PDF: Figure 3 depicts the frequency distribution and lognormal probability for solar irradiation derived from an 8000-iteration Monte Carlo simulation. Table 3 shows the lognormal PDF parameter values that are used.

Power Models for Wind Generator and Solar Photovoltaic
The new IEEE-30 bus power system has two WPGs, as previously described in Figure  1. WPG1 is connected to bus 5 and has a total active power of 75 megawatts. WPG2 is connected to bus no. 11 and has a total power of 60 MW. The relationship between output power and wind speed is expressed as: vr = rated speed, vout = cut-out speed, vin = cut-in speed of the wind turbine. Pwr = rated output power according to the product datasheet for (Enercon E82-E4) wind turbine. The generation of solar PV energy is measured in terms of solar radiation (R) [33].

Power Models for Wind Generator and Solar Photovoltaic
The new IEEE-30 bus power system has two WPGs, as previously described in Figure 1. WPG1 is connected to bus 5 and has a total active power of 75 megawatts. WPG2 is connected to bus no. 11 and has a total power of 60 MW. The relationship between output power and wind speed is expressed as: v r = rated speed, v out = cut-out speed, v in = cut-in speed of the wind turbine. P wr = rated output power according to the product datasheet for (Enercon E82-E4) wind turbine. The generation of solar PV energy is measured in terms of solar radiation (R) [33].
The histogram in Figure 4 represents the solar PV plant's stochastic output power. The line depicts the planned power that the solar generator is meant to send to the network. It is important to remember that planned production solar power is a changeable value. The histogram in Figure 4 represents the solar PV plant's stochastic output power. The line depicts the planned power that the solar generator is meant to send to the network. It is important to remember that planned production solar power is a changeable value. As a result, the ISO and the developer of the solar photovoltaic plant have entered into a power sharing arrangement.
Equations (36) and (37) The shortfall and excess power are represented by PSn and PSn+, respectively.

The Basis of the Proposed Method's Development
This study introduces the white shark optimizer (WSO), which is a new optimization algorithm inspired by white sharks' scholastic behaviors when hunting in the wild to assist them in the ocean depths. The authors in [25] developed this algorithm within aim to solve real-world optimization problems that are difficult to solve using current techniques, both limited and unrestricted.
Many types of problems demand more flexibility than WSO can supply; hence, the suggested WSO provides several benefits for complex optimization problems, including its predicted adaptability in dealing with various types of optimization problems.
WSO's mathematical approach makes it applicable to a wide range of engineering optimization problems, particularly those with high dimensionality. Its simplicity and resilience should allow it to identify the global optimum problems to challenging optimization problems quickly and precisely [25].

White Shark Optimizer (WSO)
The mathematical models of the proposed WSO to solve the OPF problem, which were built to define the actions of white sharks when hunting, are detailed in this section. This involves tracking and killing prey. As a result, the ISO and the developer of the solar photovoltaic plant have entered into a power sharing arrangement.
Equations (36) and (37) are utilized in the model to calculate the overvaluation and undervaluation costs of solar PV electricity, respectively: The shortfall and excess power are represented by P Sn and P Sn+ , respectively.

The Basis of the Proposed Method's Development
This study introduces the white shark optimizer (WSO), which is a new optimization algorithm inspired by white sharks' scholastic behaviors when hunting in the wild to assist them in the ocean depths. The authors in [25] developed this algorithm within aim to solve real-world optimization problems that are difficult to solve using current techniques, both limited and unrestricted.
Many types of problems demand more flexibility than WSO can supply; hence, the suggested WSO provides several benefits for complex optimization problems, including its predicted adaptability in dealing with various types of optimization problems.
WSO's mathematical approach makes it applicable to a wide range of engineering optimization problems, particularly those with high dimensionality. Its simplicity and resilience should allow it to identify the global optimum problems to challenging optimization problems quickly and precisely [25].

White Shark Optimizer (WSO)
The mathematical models of the proposed WSO to solve the OPF problem, which were built to define the actions of white sharks when hunting, are detailed in this section. This involves tracking and killing prey.

Initialization of WSO
As shown in the following 2d matrix, a population of n WSO, in a d search domain space, with the location of every shark indicating a suggested solution to these problems [25].
where w represents the location of all sharks in the search domain, d denotes the number of choice variables for a given task.

Speed of Movement towards Prey
A white shark recognizes a prey's location by hearing a pause in the waves as the prey moves, as illustrated in Equation (39).
i = 1, 2, . . . . . . , n = index of size n, and the new speed vector of the ith shark is denoted by v i k+1 . v i is the ith index vector of sharks attaining the optimal location, as indicated by Equation (40).
where k = current, K = maximum iterations, and p min and p max denote the starting and subordinate velocities for white shark motion. After a thorough examination, the values of p min and p max were discovered to be 0.5 and 1.5, respectively.
τ signifies the accelerating factor, which is 4.125, as was discovered after extensive research [25].

Movement in the Direction of the Optimal Prey
In this context, the position updating strategy defined in Equation (44) was used to describe the behavior of white sharks as they move towards prey.
where ⊕ is the result of a bitwise xor operation. The frequency of a white shark's wavy motion and the multitude of times the shark attacks its target are described by Equations (48) and (49), respectively.
where a 0 and a 1 are location constants that are used for control exploration and exploitation.

Movement in the Direction of the Optimal Shark
Sharks can keep their place in front of the most advantageous one who is near to the target. Equation (50) shows how this phenomenon is expressed.
w i k+1 = upgraded shark's location, sgn(r 2 − 0.5) returns 1 or −1 to modify the search path, r 1 , r 2 , and r 3 = rand. No. in the domain of [0, 1], D w = length for both target and shark, is given in Equation (51). S s is a parameter that has been proposed to reflect the power of white sharks, as specified in Equation (52).
where a 2 is a location factor used to regulate exploration and exploitation. Algorithm 1, the pseudo code of WSO [25].  if rand ≤ S s then 20:

Fish School Behavior
The following formula was presented to define white shark fish school behavior: where rand denotes a uniformly distributed random number in the range [0, 1]. As proven by Equation (52), the sharks are able to adjust their location based on the optimal shark who has arrived at the optimal location, which is very near to target. The end location of sharks is someplace ideally around the prey in the search space. The collective behavior of WSO is identified by fish action and the movement of sharks to the greatest shark, and improved local and global search capabilities.

Implementation and Analysis of WSO
During the process of function evaluations, white sharks always aim to move closer to the globally optimum solution. The reason is that white sharks are more likely to find a best answer by exploring and utilizing the search space's surroundings. The location of the optimal sharks and their target is used to accomplish this ability. As a result, sharks are can constantly investigate and contribute to potentially prey-rich locations. The major steps of the algorithm in Algorithm 1 can be used to summaries the pseudo code of WSO.
WSO starts the optimization process by creating white shark positions at random, according to the algorithm in Algorithm 1. At each function execution, Equation (44) has been used to update the location of white sharks. WSO's simulated steps will return them to the search region if they pass outside of the search space. To discover the white shark with the best fit value, a fitness process is used to estimate the optimal solution, with the fitness criterion being regenerated for every process estimation. The best stance for a white shark hunting prey is said to be the most suited solution [25].

Simulation Results and Comparison
In this section, the upgraded IEEE-30 bus power system is studied to find the optimal solution for the PF problem. The results of using the WSO to reduce the total power generation cost are provided and explained. Northern Goshawk Optimizer (NGO) and two alternative optimization algorithms, SAO and POA, are also applied to verify the validity of WSO. The optimization algorithms are simulated using MATLAB (2018b) on a computer that has the following specifications: Intel ® Core (TM) i5-3210M processor, 2.5 GHz, and 8 GB of RAM.
The four algorithms were prepared to find the optimal solution after 10 runs and 300 iterations. The statistical results in Table 4 show that WSO and NGO's values are always close to the optimal solution, with a standard deviation of 0.6722 and 0.3766, respectively. However, WSO is the best of the four in terms of convergence time, with an average of 524 s for one run. Figure 5 shows the boxplots for distributing the statistics of the results to all the methods, it's clear that the boxplots of the WSO technique are narrow compared to the other techniques, where POA in Figure 5c contains one suspected outlier.

White Shark Optimizer (WSO)
The white shark optimizer (WSO) was implemented and used to obtain an optimal solution to the problem of scheduling the generation power to minimize the total generation cost by performing 10 runs each time with 300 iterations. Among all 10 runs, three were given preference: the seventh, the fifth, and the fourth, achieving a generation cost of 781.733, 781.755, and 781.831 USD/h, respectively, as shown in Figure 6a. Thus, the seventh run was chosen to be the best performer at the lowest total generating cost of 781.733 USD/h.   The best three solutions were selected among the ten to be presented in the results and to study the convergence for each case in terms of reaching the lowest value of the total power generation cost by finding the optimal solution for scheduling and using power from different power plants according to Equation (15). The simulation results for all four algorithms were as follows:

White Shark Optimizer (WSO)
The white shark optimizer (WSO) was implemented and used to obtain an optimal solution to the problem of scheduling the generation power to minimize the total generation cost by performing 10 runs each time with 300 iterations. Among all 10 runs, three were given preference: the seventh, the fifth, and the fourth, achieving a generation cost of 781.733, 781.755, and 781.831 USD/h, respectively, as shown in Figure 6a. Thus, the seventh run was chosen to be the best performer at the lowest total generating cost of 781.733 USD/h.

White Shark Optimizer (WSO)
The white shark optimizer (WSO) was implemented and used to obtain an optimal solution to the problem of scheduling the generation power to minimize the total generation cost by performing 10 runs each time with 300 iterations. Among all 10 runs, three were given preference: the seventh, the fifth, and the fourth, achieving a generation cost of 781.733, 781.755, and 781.831 USD/h, respectively, as shown in Figure 6a. Thus, the seventh run was chosen to be the best performer at the lowest total generating cost of 781.733 USD/h. The voltages of the load buses play a significant part in the OPF investigation. As a result, dealing with the voltage constraints of load buses is critical. The buses of load in the IEEE system with 30 buses must have voltages between [0.95: 1.05] p.u. Where Figure   Figure 6. The WSO results for the best 3 runs: (a) characteristics of convergence for the best three runs of WSO algorithm; (b) profile voltages of load buses for the best three runs of WSO.
The voltages of the load buses play a significant part in the OPF investigation. As a result, dealing with the voltage constraints of load buses is critical. The buses of load in the IEEE system with 30 buses must have voltages between [0.95: 1.05] p.u. Where Figure 6b shows the voltage levels in the load buses for the best three runs of WSO. It is obvious from the figure that all voltages for the load buses fall within the safe limits for operation.

Northern Goshawk Optimization (NGO)
As the same in WSO, the NGO was implemented to minimize the total generation cost by doing 10 runs each time with 300 iterations. Among of all 10 runs, three were given preference: the fifth, the fourth, and the first, achieving a generation cost of 781.843, 782.124, and 782.313 USD/h, respectively, as shown in Figure 7a. Thus, the fifth run was chosen to be the best performer at the lowest total generating cost of 781.843 USD/h. Figure 7b provides load bus voltage characteristics for the best three runs of NGO. It is obvious from the figure that all voltages for the load buses fall within the safe limits for operation. cost by doing 10 runs each time with 300 iterations. Among of all 10 runs, three were given preference: the fifth, the fourth, and the first, achieving a generation cost of 781.843, 782.124, and 782.313 USD/h, respectively, as shown in Figure 7a. Thus, the fifth run was chosen to be the best performer at the lowest total generating cost of 781.843 USD/h. Figure 7b provides load bus voltage characteristics for the best three runs of NGO. It is obvious from the figure that all voltages for the load buses fall within the safe limits for operation.

Pelican Optimization Algorithm (POA)
As the same in WSO and NGO, the POA was implemented to minimize the total generation cost by doing 10 runs each time with 300 iterations. Among of all 10 runs, three were given preference: the fifth, seventh and third, achieving a generation cost of 782.186, 782.299, and 782.508 USD/h, respectively, as shown in Figure 8a. Thus, the fifth run was chosen to be the best performer at the lowest total generating cost of 782.186 USD/h.

Pelican Optimization Algorithm (POA)
As the same in WSO and NGO, the POA was implemented to minimize the total generation cost by doing 10 runs each time with 300 iterations. Among of all 10 runs, three were given preference: the fifth, seventh and third, achieving a generation cost of 782.186, 782.299, and 782.508 USD/h, respectively, as shown in Figure 8a. Thus, the fifth run was chosen to be the best performer at the lowest total generating cost of 782.186 USD/h. Figure 8b provides load bus voltage characteristics for the best three runs of POA.
preference: the fifth, the fourth, and the first, achieving a generation cost of 781.843, 782.124, and 782.313 USD/h, respectively, as shown in Figure 7a. Thus, the fifth run was chosen to be the best performer at the lowest total generating cost of 781.843 USD/h. Figure 7b provides load bus voltage characteristics for the best three runs of NGO. It is obvious from the figure that all voltages for the load buses fall within the safe limits for operation.
(a) (b) Figure 7. The NGO results for the best 3 runs: (a) characteristics of convergence for the best three runs of NGO algorithm; (b) profile voltages of load buses for the best three runs of NGO.

Pelican Optimization Algorithm (POA)
As the same in WSO and NGO, the POA was implemented to minimize the total generation cost by doing 10 runs each time with 300 iterations. Among of all 10 runs, three were given preference: the fifth, seventh and third, achieving a generation cost of 782.186, 782.299, and 782.508 USD/h, respectively, as shown in Figure 8a. Thus, the fifth run was chosen to be the best performer at the lowest total generating cost of 782.186 USD/h.  It is obvious from the figure that all voltages for the load buses fall within the safe limits for operation.

Smell Agent Optimization (SAO)
As in the previous cases, the SAO was implemented to minimize the total generation cost by doing 10 runs each time with 300 iterations. Among of all 10 runs, three were given preference: the seventh, sixth and second, achieving a generation cost of 811.187, 851.711, and 846.683 $/h, respectively, as shown in Figure 9a. Thus, the seventh run was chosen to be the best performer at the lowest total generating cost of 811.187 USD/h. Figure 9b provides load bus voltage characteristics for the best three runs of SAO. It is obvious from the figure that all voltages for the load buses almost fall within the safe limits for operation.
As in the previous cases, the SAO was implemented to minimize the total generation cost by doing 10 runs each time with 300 iterations. Among of all 10 runs, three were given preference: the seventh, sixth and second, achieving a generation cost of 811.187, 851.711, and 846.683 $/h, respectively, as shown in Figure 9a. Thus, the seventh run was chosen to be the best performer at the lowest total generating cost of 811.187 USD/h. Figure 9b provides load bus voltage characteristics for the best three runs of SAO. It is obvious from the figure that all voltages for the load buses almost fall within the safe limits for operation.
(a) (b) Figure 9. The SAO results for the best 3 runs: (a) characteristics of convergence for the best three runs of SAO algorithm; (b) profile voltages of Load buses for the best three runs of SAO.

Comparison of the Results of Different Optimization Techniques and Discussion
In this section, the results of WHO and the other three algorithms mentioned above, in addition to ESMAOPF in [18], have been compared to verify the validity of WSO to optimize schedule power generation from all power plants connected to the upgraded system in order to achieve the minimum total power cost. Table 5 records optimal schedule power and overall generation cost for all algorithms including ESMA [18], reactive power (Q), control variables, and other essential estimated values.

Comparison of the Results of Different Optimization Techniques and Discussion
In this section, the results of WHO and the other three algorithms mentioned above, in addition to ESMAOPF in [18], have been compared to verify the validity of WSO to optimize schedule power generation from all power plants connected to the upgraded system in order to achieve the minimum total power cost. Table 5 records optimal schedule power and overall generation cost for all algorithms including ESMA [18], reactive power (Q), control variables, and other essential estimated values. The convergence curves of the various (OPF) optimizer applications applied in this investigation are illustrated in Figure 10. The success and effectiveness of the algorithm (WSO) among the rest of the others in reaching the optimal solution for scheduling the generated power and reducing the total generation cost is clear from the results in this figure. The convergence curves of the various (OPF) optimizer applications applied in this investigation are illustrated in Figure 10. The success and effectiveness of the algorithm (WSO) among the rest of the others in reaching the optimal solution for scheduling the generated power and reducing the total generation cost is clear from the results in this figure  Table 5, it becomes clear that the efficiency of the algorithm WSO is better than ESMA, which the authors used in [18], and in which it achieved a cost of 791.937 USD/h, while both WSO and NGO achieved a lower cost.
The effectiveness of WSO can be shown in the simulation results when compared to ESMA in [18] and other optimization techniques used for NGO, POA, and SAO. As a result, the suggested method has a higher solution quality and several advantages, including easier application, fewer control parameters, less time spent adjusting control parameter values, faster convergence to optimal solutions, and more steady search capabilities. Table 5 also shows the bus voltage values for the generation buses, which are six buses. Figure 11 shows the voltage values for all buses of loads for all the applications of the previously mentioned optimization algorithms. It becomes clear that most of the efforts are within the acceptable limits. It is clear from zooming in on the convergence curves that the curve of WSO reached its lowest value between the 290 and 300 iteration and achieved the lowest cost of 781.733 USD/h. While the algorithm NGO achieved a total generation cost of 781.844 USD/h, followed by the algorithm POA at a cost of 782.186 %/h; finally, SAO achieved a cost of 811.187 USD/h. Moreover, by comparing the results of the total generation cost presented in Table 5, it becomes clear that the efficiency of the algorithm WSO is better than ESMA, which the authors used in [18], and in which it achieved a cost of 791.937 USD/h, while both WSO and NGO achieved a lower cost.
The effectiveness of WSO can be shown in the simulation results when compared to ESMA in [18] and other optimization techniques used for NGO, POA, and SAO. As a result, the suggested method has a higher solution quality and several advantages, including easier application, fewer control parameters, less time spent adjusting control parameter values, faster convergence to optimal solutions, and more steady search capabilities. Table 5 also shows the bus voltage values for the generation buses, which are six buses. Figure 11 shows the voltage values for all buses of loads for all the applications of the previously mentioned optimization algorithms. It becomes clear that most of the efforts are within the acceptable limits.  Figure 12 shows the results of all optimization algorithms for optimizing the power cost of thermal, wind, and solar power plants. The lack of output power from wind and solar PV sources is compensated by thermal power generators. As a result, the cost of a thermal power generation system rises, as shown in the cost characteristic of a thermal power source (TPG) in Figure 12, whereas the cost of WPG and SPG steadily reduces to a certain level.  Figure 12 shows the results of all optimization algorithms for optimizing the power cost of thermal, wind, and solar power plants. The lack of output power from wind and solar PV sources is compensated by thermal power generators. As a result, the cost of a thermal power generation system rises, as shown in the cost characteristic of a thermal power source (TPG) in Figure 12, whereas the cost of WPG and SPG steadily reduces to a certain level. Figure 12 shows the results of all optimization algorithms for optimizing the power cost of thermal, wind, and solar power plants. The lack of output power from wind and solar PV sources is compensated by thermal power generators. As a result, the cost of a thermal power generation system rises, as shown in the cost characteristic of a thermal power source (TPG) in Figure 12, whereas the cost of WPG and SPG steadily reduces to a certain level.  Figure 13a depicts the optimal results of the planned powers of thermal, wind, and solar power generators. When sun irradiation or wind speed are great, ideal planned power from wind and solar PV facilities improves because raising the planned produced power helps to minimize the penalization cost. The planned reactive power from all power plants is depicted in Figure 13b. In several cases, the generators TG3 and WG2 run at their maximum reactive power (Q) capability by following the constraints of reactive power (Q), as indicated in Table 5. As a result, whenever an optimization technique is implemented, the limitations on Q must be considered.  Figure 13a depicts the optimal results of the planned powers of thermal, wind, and solar power generators. When sun irradiation or wind speed are great, ideal planned power from wind and solar PV facilities improves because raising the planned produced power helps to minimize the penalization cost. The planned reactive power from all power plants is depicted in Figure 13b. In several cases, the generators TG3 and WG2 run at their maximum reactive power (Q) capability by following the constraints of reactive power (Q), as indicated in Table 5. As a result, whenever an optimization technique is implemented, the limitations on Q must be considered.

Conclusions
In this study, a novel meta-heuristic optimization algorithm, so called the white shark optimizer (WSO), has been proposed for providing an optimal solution for the OPF problem in the IEEE-30 bus power system which has been upgraded with unpredictable wind and solar photovoltaic energy sources. Weibull and lognormal probability density functions (PDFs) were used to describe the uncertain outputs of wind and solar energy sources, respectively. The WSO and another three optimization algorithms have been used to optimize the scheduling of power generation with both traditional thermal power plants and renewable power sources to minimize the total electricity generation cost. To verify the WSO performance, the results of the proposed algorithm has been compared with the results obtained from the other three optimizers (NGO, POA, and SAO).
The results showed the effectiveness of the WSO algorithm in solving the OPF problem and in achieving the minimum total generation cost (781.733 USD/h) among the other three algorithms and ESMA, where the overall power produced cost from all power plants was optimally minimized. Moreover, the results of WSO and the other three application Figure 13. The optimal scheduled active and reactive power for different optimization techniques: (a) optimal scheduled active power (MW) with different optimization techniques; (b) optimal scheduled reactive power (MVAr) with different optimization techniques.

Conclusions
In this study, a novel meta-heuristic optimization algorithm, so called the white shark optimizer (WSO), has been proposed for providing an optimal solution for the OPF problem in the IEEE-30 bus power system which has been upgraded with unpredictable wind and solar photovoltaic energy sources. Weibull and lognormal probability density functions (PDFs) were used to describe the uncertain outputs of wind and solar energy sources, respectively. The WSO and another three optimization algorithms have been used to optimize the scheduling of power generation with both traditional thermal power plants and renewable power sources to minimize the total electricity generation cost. To verify the WSO performance, the results of the proposed algorithm has been compared with the results obtained from the other three optimizers (NGO, POA, and SAO).
The results showed the effectiveness of the WSO algorithm in solving the OPF problem and in achieving the minimum total generation cost (781.733 USD/h) among the other three algorithms and ESMA, where the overall power produced cost from all power plants was optimally minimized. Moreover, the results of WSO and the other three application algorithms also reveal that the environmental and safety constraints are in the system operator's stated boundaries. In addition, the results were compared with the ESMA method that the authors used in [18], and the comparison showed the success of WSO over ESMAOPF in terms of achieving a lower total generating cost.
As a result, the algorithm has advantages over ESMA and the other three proposed algorithms in this paper, such as simpler application, fewer control parameters, less time spent tuning control parameter values, faster convergence to optimal solutions, fewer generated new solutions, shorter simulation time, and more stable search ability. Therefore, we can conclude that WSO is a powerful method for dealing with optimal power flow problems where optimization of single objectives is required.

•
Apply the proposed methods to solve optimal power flow in a larger power system; • Incorporate more renewable energy sources (such as hydropower plants) into the larger power system; • Apply of more than one case study that takes into account factors other than the minimization of generation cost, such as emissions, carbon tax, reserve cost, penalty cost, and the dynamic nature of generating facilities' control; • Studying multi-objective optimal power flow in a power system with renewable energy sources.