Optimal Power Flow of Hybrid Wind/Solar/Thermal Energy Integrated Power Systems Considering Costs and Emissions via a Novel and Efficient Search Optimization Algorithm

The OPF problem has significant importance in a power system’s operation, planning, economic scheduling, and security. Today’s electricity grid is rapidly evolving, with increased penetration of renewable power sources (RPSs). Conventional optimal power flow (OPF) has nonlinear constraints that make it a highly non-linear, non-convex optimization problem. This complex problem escalates further with the integration of renewable energy resource (RES), which are generally intermittent in nature. This study suggests a new and effective improved optimizer via a TFWO algorithm (turbulent flow of water-based optimization), namely the ITFWO algorithm, to solve non-linear and non-convex OPF problems in energy networks with integrated solar photovoltaic (PV) and wind turbine (WT) units (being environmentally friendly and clean in nature). OPF in the energy networks is an optimization problem proposed to discover the optimal settings of an energy network. The OPF modeling contains the forecasted electric energy of WT and PV by considering the voltage value at PV and WT buses as decision parameters. Forecasting the active energy of PV and WT units has been founded on the real-time measurements of solar irradiance and wind speed. Eight scenarios are analyzed on the IEEE 30-bus test system in order to determine a cost-effective schedule for thermal power plants with different objectives that reflect fuel cost minimization, voltage profile improvement, emission gases, power loss reduction, and fuel cost minimization with consideration of the valve point effect of generation units. In addition, a carbon tax is considered in the goal function in the examined cases in order to investigate its effect on generator scheduling. A comparison of the simulation results with other recently published algorithms for solving OPF problems is made to illustrate the effectiveness and validity of the proposed ITFWO algorithm. Simulation results show that the improved turbulent flow of water-based optimization algorithm provides an effective and robust high-quality solution of the various optimal power-flow problems. Moreover, results obtained using the proposed ITFWO algorithm are either better than, or comparable to, those obtained using other techniques reported in the literature. The utility of solar and wind energy in scheduling problems has been proposed in this work.


Motivation
The optimal power flow (OPF) is an optimization method to minimize a specific optimization benchmark while satisfying security, physical and feasibility limits. The various OPF problems have been broadly applied in recent studies, and have served as a multi-model, non-linear, and non-convex optimization problem [1,2]. In the last two decades, various OPF objective functions had a grandness due to the quick adoption of divided power resources in an energy network [3]. The accretion of divided and periodic renewable power sources (RPSs), as with wind energy (WE) and photovoltaic (PV) systems, into modern energy networks has generated novel types of problems for managing and operating the energy network [4,5]. Optimizing the various OPF problems has become more intricate with the enormous incorporation of RPSs that constrain volatile dynamics for the energy network due to their uncertainty [6,7].
Conventional search approaches, such as quadratic programming (QP) [8], and nonlinear programming (NLP) [9][10][11] presented great convergence trends in optimizing the objective functions of the different OPF problems; however, these methods apply theoretical hypotheses not suitable for real-world problems, as they have non-smooth and non-differentiable objective functions [12][13][14]. In addition, the preceding methods sometimes fail to show the main trends of the objective function as a convex OPF function [12]. Therefore, metaheuristics have been applied to dominate the above-mentioned weaknesses [12,15].

Contribution and Paper Organization
In 2021, Ghasemi et al. [65] introduced the TFWO algorithm, which is inspired by the formula of turbulent fluctuations in water flow in nature. The recent research has demonstrated that TFWO can be effectively used to find optimal solutions to a variety of optimization problems. For example, TFWOs were used for optimal reactive power distribution (ORPD) in [66]. The chaotic TFWO (CTFWO) was introduced in [67] as a means of reducing voltage deviation (VD) and real power loss. The TFWO model has been successfully used to solve problems related to unit commitment model integration with electric vehicles in [68]. An estimation of the correlation parameter of the Kriging method, enhancing the accuracy of the Kriging surrogate modeling (KSM) used to approximate the complex and implicit performance functions in [69]. To solve short-term hydrothermal scheduling, the authors of [70,71] have proposed quasi-oppositional TFWO (QOTFWO). The cascading nature of hydro plants, valve-point loading (VPL), and multiple fuel sources have been assumed in their modeling. Through a comprehensive comparison of three robust performance and fast convergence algorithms, ref. [72] proved that the TFWO can optimize an isolated hybrid microgrid. The TFWO also have been applied for proportional integral derivative (PID) controller to ensure reliable operation of active foil bearings [73], and optimal allocation of shunt compensators in distribution systems [74]. Based on the results of [74], the TFWO algorithm was found to be effective in reducing power loss, enhancing the voltage profile, and determining the type, size, and location of the reactive power compensators (RPCs).
In different patterns of partial shading, TFWO was shown to be capable of maximizing duty cycle of DC/DC converters to achieve global optimal power [75]. In [76], the performance of the TFWO was compared and validated against seven well-known algorithms. As a result of optimizing photovoltaic models, the TFWO were able to provide the minimum fuel cost and significant robust solutions to the ELD problem over all networks tested in [77,78]. It was demonstrated in [77,78] that the estimated powervoltage (P-V) and current-voltage (I-V) curves achieved by the TFWO were very close to the experimental data.
It has been demonstrated in recent research that TFWO can be effective in solving real-world problems. It is worth noting that, due to its non-convex and non-linear nature, the OPF problems can be extremely challenging. The robustness and convergence speed of existing algorithms, such as turbulent water flow (TFWO), need to be improved in order to tackle such a complex problem. An innovative and successful improvement of the TFWO (ITFWO) approach is presented in this paper to address a variety of OPF problems encountered in hybrid power systems. To demonstrate the algorithm's ability to solve OPF problems, this paper compares the developed algorithm with existing state-of-theart methods.
This paper highlights the following points: • Enhancing the TFWO algorithm's convergence speed, exploration capabilities, and exploitation capabilities.

•
The original TFWO algorithm has been improved by the addition of an enhanced operator to update the population, which increases the local search capability of the algorithm.

•
The proposed improved algorithm is successfully applied to solve the non-convex and non-linear OPF problems considering different objective functions.

•
The magnitude of the voltage at the WT and PV buses is considered a decision variable, while the forecasts of the WT and PV power generation are considered dependent variables.
The paper has been arranged as follows. The modeling of OPF is characterized in Section 2. The optimization process of TFWO and ITFWO is characterized in Section 3. Section 4 illustrates the obtained optimal results. Finally, the conclusions of this paper are supplied in Section 5.

Problem Formulation
OPF combining the uncertainties of PV and WT units has been formulated in this [79]: where: the objective function (F) to be solved; x indicates vector of decision parameters as Equation (5), output active power (P Gi ) excluding at the slack bus (i = 1: NG, the number of units), generator voltages including PV and WT (V Gi ; i = 1: NG), tap settings of transformer Here, y shows the resultant of dependent decision parameters including of voltages at load bus (V Li ; i = 1: NL, the size of load buses), slack bus power (P G1 ), output reactive power of any generator (Q Gi ), and loads of transmission line (S li ) (i = 1: NTL, the size of transmission lines).
NB: the size of busses; P i : active power; G ij : the real section of bus admittance matrix; δ ij : the voltage angle between i and j; B ij : the imaginary section of bus admittance matrix.
Q i : reactive power injected at bus i. The inequality limits, i.e., Equation (3), includes the voltage magnitude limits, the generating units' reactive power constraints, and power flow limits of the branches, which are expressed as follows [79]: Generator's reactive power: Branch flow limits: Equation (4) shows the area of feasible search space for any OPF function including the following limits:

Objective Functions
The principal optimization objective F has contemplated in the objective functions is the fuel cost of the energy units (Fcost). The cost of any generator is shown as a second-class optimization problem of the generation power of any unit (P G ): where a i , b i and c i show the cost factors of the ith generator.
To decrease active loss (Ploss) in the energy network OPF function for optimization has showed: The OPF function to optimize the voltage deviations (VD) is as follows: where V i indicates the voltage value of the ith bus, and V i ref has been contemplated as 1 p.u. In this study, the emission level of the two significant pollutants, sulfur oxides (SOx) and nitrogen oxides (NOx), are considered to be minimized [80]: where ξ i (ton/h), γ i (ton/h MW2), β i (ton/h MW), α i (ton/h), and θ i (1/MW) are pollution factors of ith unit. So, the main function is considered as follows: where λ Q , λ V , λ P , and λ S show the penalty coefficients; and x lim shows a variable as an auxiliary variable:

Modelling of WT Units
The generation power of a WT unit at wind speed v, is modeled as follows [79]: where v co is cut-out wind speed, v ci is cut-in wind speed; v n is nominal wind speed; and P wtn , is the nominal generation active energy of the wind turbine. The non-linear characteristics of wind speed in a predefined process at a special locality have been shown via Weibull PDF: The CDF (cumulative distribution function) for the Weibull dispersion (WD) is: where f v (v) describes Weibull PDF of v; k and C are the shape and scale parameters of WD; r is a haphazard value uniformly generated on 0 and 1. The active power of the WT unit has been modeled via the probability of any feasible state for that time interval [79]: where f ν (ν g t ) is the probability of v for state g during the special space t; P WTg is the out active power of WT computed by (22) for v = v t g ; v t g is the gth state of v at the tth time space.

Modelling of PV Units
The active energy provided of a PV generator is associate on the solar irradiancy [79]: where R c is a particular irradiancy point; S stc is the solar irradiancy at test states; S is the solar irradiancy on the PV surface (W/m 2 ); P pvn is the nominal active power of the PV generator. Beta PDF role of S (f s (S)) has been proposed to formulate the dynamic nature of solar irradiancy [79,81]: where Γ represents Gamma role; α, β indicates its shape variables. The forecasted active power of PV (P PVg ) at the tth time interval and the gth state of solar irradiancy (S g t ) has been calculated as follows [79]: Appl. Sci. 2023, 13, 4760 7 of 25

Formation of Whirlpools
Firstly, the particle (X) of TFWO (N p : the size of swarm) is distributed similarly between N Wh swarms, and then the best population of the any swarm or whirlpool (Wh) has been defined as the center of the swarm and its cavity that pulls the particles based on their spaces to the whirlpool.

Pulling the Objects
In a whirlpool the objects are whirling with their angle (δ) circa their whirlpool's center, the novel location (X i new ) of the ith object is gone as same as Wh j −∆X i , and method to it.
In addition, δ i at any generation is modifying: where Wh w is Wh with an up cost of ∆ t and Wh f is Wh with a minimum cost of ∆ t , respectively.
, and if FE i is more than the random number r, FE i is executed for the elected kth dimension randomly as Equation (34):

Interplay between the Swarms
Whirlpools (swarms) displace and interact together. To the determined ∆Wh j , the nearest swarm is determined according to its cost and the minimum value of Equation (35) and based on the Equations (36) and (37) and according to the amount of δ j , change of the whirlpool's location is determined as follows.
Optimization process of TFWO has been given in Figure 1.
Optimization process of TFWO has been given in Figure 1. ; , k sin * cos round 1 r a n d* ( 1 )

Improved TFWO (ITFWO)
In this paper is proposed a novel ITFWO in optimizing very complex real-world problems. Equation (38) shows the new learning and effective search in the proposed ITFWO optimizer. In Equation (38), local and global searches are integrated, similar to the original algorithm, and also separated from each other, which makes the population move towards the global optimum with different equations of motion and with different accelerations, and the search range of the population effectively increases. This new equation makes the proposed algorithm much better at searching both locally and globally. As a result, the proposed algorithm can solve more problems.

ITFWO for Various OPF Problems
The TFWO and ITFWO are used on the IEEE 30 bus test system to optimize eight various types of OPF problem, the generation size is 400 for two algorithms TFWO (with N Wh = 3 and Npop = 45) and ITFWO (with N Wh = 3 and Npop = 45). Test network information shown in [80], as shown in Figure 2 and also in Table 1.

Improved TFWO (ITFWO)
In this paper is proposed a novel ITFWO in optimizing very complex rea problems. Equation (38) shows the new learning and effective search in the p ITFWO optimizer. In Equation (38), local and global searches are integrated, simil original algorithm, and also separated from each other, which makes the populatio towards the global optimum with different equations of motion and with differen erations, and the search range of the population effectively increases. This new e makes the proposed algorithm much better at searching both locally and global result, the proposed algorithm can solve more problems.
The achieved optimal variables by ITFWO has been given in Table 1. In addit optimization processes of the problem have been given in Figure 4. The achiev objective functions by ITFWO are 859.0009 ($/h) and 4.5297 (MW). By testing the tion optimal results in Table 3, the amount of the optimization function that h achieved via ITFWO is better in comparison to the other methods.     In this type of OPF problems has been considered Fcost and V.D. in order to increase service and security indexes at buses as follows:

Method Fuel Cost ($/h) Emission (t/h) Power Losses (MW) V.D. (p.u.)
where, the amount of φ v has been choosen 100 [80]. The best setting for control parameters has been achieved by ITFWO has been given in Table 1. Moreover, the simulation solutions of the methods have been given in Table 4, ITFWO has significantly decreased this multiobjective OPF. In addition, the optimization processes of the problem with the studied methods have been in Figure 5. In this type of OPF problems has been considered and V.D. in orde crease service and security indexes at buses as follows: where, the amount of has been choosen 100 [80]. The best setting for control parameters has been achieved by ITFWO has bee in Table 1. Moreover, the simulation solutions of the methods have been given in ITFWO has significantly decreased this multiobjective OPF. In addition, the optim processes of the problem with the studied methods have been in Figure 5.

Type 4: Piecewise OPF Problem
The fuel cost features for the network generators linked at first and second b modeled via a piecewise OPF problem because of various fuel types shown by:

Type 4: Piecewise OPF Problem
The fuel cost features for the network generators linked at first and second buses are modeled via a piecewise OPF problem because of various fuel types shown by: where a i,k , c i,k , b i,k , are factors for the objective function of ith unit for kth fuel type; n f is the number of fuel types for ith generator.
The OPF problem for this type is modeled via Equation (44).
Optimization results are in Table 1, which indicate that the objective function via the ITFWO is 646.4799 ($/h). The best objective function achieved by ITFWO is compared to the optimal solutions achieved via optimization methods in Table 5 such as IEP [87], LTLBO [38], FPA [80], MFO [80], SSA [105], SSO [22], MSA [80], MDE [93], GABC [106] and TFWO, and shows that ITFWO has the lowest objective function in comparison to the other methods. The convergence trends of the problem are given in Figure 6.

Type 5: OPF Considering VPEs
In this situation, we included valve point loading effects (VPEs) on the generator's cost function by adding a sine part to the objective function of the units: where e i and f i are VPEs cost factors of ith unit. The achieved optimal variables by ITFWO has been given in Table 1. Table 6 shows the comparison of the ITFWO with recent modern methods. Based on Table 6, the optimum objective function has been achieved by ITFWO is 832.1611 ($/h) which is better compared to solutions of existing methods. The convergence trends of the objective function are shown in Figure 7.
where ei and fi are VPEs cost factors of ith unit. The achieved optimal variables by ITFWO has been given in Table 1. Table 6 shows the comparison of the ITFWO with recent modern methods. Based on Table 6, the optimum objective function has been achieved by ITFWO is 832.1611 ($/h) which is better compared to solutions of existing methods. The convergence trends of the objective function are shown in Figure 7.   In this type, two main kinds of emission gases, SOX and NOX, have been considered, and the OPF function is determined via Equation (46) to optimize Fcost and V.D., emission, and Ploss.
The amount of weights have been chosen as in [80] with φ p = 22, φ v = 21, and φ e = 19. The best setting for control parameters that has been achieved by ITFWO has been given in Table 1. Moreover, the minimal objective function has been achieved by ITFWO compared to the optimal solutions achieved by optimization methods in Table 7; it can be seen that the optimum solution is 964.2606, which is suitable and better in comparison than the achieved optimal solutions in the recent papers. Furthermore, the convergence trends of the problem via the studied methods are given in Figure 8. The best setting for control parameters that has been achieved by ITF given in Table 1. Moreover, the minimal objective function has been achiev compared to the optimal solutions achieved by optimization methods in Ta seen that the optimum solution is 964.2606, which is suitable and better i than the achieved optimal solutions in the recent papers. Furthermore, the trends of the problem via the studied methods are given in Figure 8.

Type 7: Considering the Total Cost
The optimization function is to optimize the total generation cost determined by Equation (47) as follows: The best setting for control parameters that achieved by ITFWO are given in Table 8, with the highly minimized power generation cost in Type 7 compared to the basic TFWO. Furthermore, the convergence trends of the problem via the studied methods are shown in Figure 9. Carbon tax (C tax ) has been imposed on any unit amount of liberated greenhouse gases for modelling investment in greener kinds of power such as solar and wind. The evolutionary function of emissions has been modeled in [27]: C tax had been considered to be $20 per tonne in [27]. According to the optimal results shown in Table 9, it is clear that the ITFWO achieves highly stable and quality optimal results in comparison with TFWO.

Type 8: Considering the Total Cost with Carbon Tax
Carbon tax (Ctax) has been imposed on any unit amount of liberated greenhouse gases for modelling investment in greener kinds of power such as solar and wind. The evolutionary function of emissions has been modeled in [27]: Ctax had been considered to be $20 per tonne in [27]. According to the optimal results shown in Table 9, it is clear that the ITFWO achieves highly stable and quality optimal results in comparison with TFWO.
Furthermore, the convergence trends of the problem via the studied methods are shown in Figure 10.   Furthermore, the convergence trends of the problem via the studied methods are shown in Figure 10.

Discussions
This part illustrates the optimal results of the studied methods achieved for OPF problems to indicate ITFWO's effectiveness, such as indexes Time (simulatio Max (maximum), Mean (average), Min (minimum), and standard deviation (Std various problems shown in Table 10 for the eight types. According to Table 10, the solutions of ITFWO are more suitable than the optimal solutions of the basic TFWO comparisons show the optimization power of ITFWO to optimize the various c OPF problems; ITFWO is also able to discover a near-optimum solution in an ad running time. The effectiveness and importance of any algorithm should decide o terms: solution quality, computational efficiency, and robustness. The obtained v the objective function for each case are shown in the summarized result. The bes of the objective functions are achieved for the majority of test cases and compare isting techniques. The obtained values of the objective function are superior to th technique as well as previous techniques, and even obtained cost is better than for and developed based techniques; the comparisons are shown in Tables 2 to 9. The

Discussions
This part illustrates the optimal results of the studied methods achieved for various OPF problems to indicate ITFWO's effectiveness, such as indexes Time (simulation time) Max (maximum), Mean (average), Min (minimum), and standard deviation (Std.) of the various problems shown in Table 10 for the eight types. According to Table 10, the optimal solutions of ITFWO are more suitable than the optimal solutions of the basic TFWO. These comparisons show the optimization power of ITFWO to optimize the various complex OPF problems; ITFWO is also able to discover a near-optimum solution in an adequate running time. The effectiveness and importance of any algorithm should decide on three terms: solution quality, computational efficiency, and robustness. The obtained values of the objective function for each case are shown in the summarized result. The best values of the objective functions are achieved for the majority of test cases and compared to existing techniques. The obtained values of the objective function are superior to the recent technique as well as previous techniques, and even obtained cost is better than for hybrid and developed based techniques; the comparisons are shown in Tables 2-9. The results of the proposed approach are very competitive compared with notable results from previous research. So, from the comparisons, ITFWO is superior in terms of solution quality. In comparison with TFWO, a convergence characteristic of ITFWO that it is smoother and achieved convergence in fewer generations. The Std. results of Tables 2-10 show the enhanced ability of ITFWO to achieve superior quality solutions, in a computationally efficient and robust way. Furthermore, the proposed ITFWO provided a suitable balance between exploration and exploitation in the search space, which has led to finding the global optima in the presence of a large number of local optimum solutions. In summary, the improved mechanism of the proposed ITFWO has many advantages over the other methods-such as faster convergence characteristics, a lower standard deviation and simpler implementation.

Conclusions
This study suggested a novel modified ITFWO algorithm for optimizing various complex OPF problems such as piecewise quadratic and quadratic objective functions, total cost while considering emissions, and losses and valve point effects in the IEEE 30-bus network with PV and WT units while satisfying security, physical and feasibility limits. Firstly, the various complex OPF problems have been illustrated as real-world optimization problems with different limits in a typical network. OPF with the various complex cost functions has been efficiently solved through the proposed ITFWO method whose computational efficiency, robustness and applicability have been also evidenced. ITFWO has efficiently fulfilled the objective to discover near-global optimal or optimum solutions of the non-linear test functions of the typical power network more effectively than previous optimal solutions and confirms the optimization power of the ITFWO method in comparison with the other optimization techniques based on the result quality for the various complex OPF problems. An equation of this nature cannot be solved using conventional methods, such as the equal consumed energy increase ratio law, when the constraint is complex and the cost function is not convex. In terms of solving such problems, the proposed ITFWO provides a feasible and effective reference scheme. It is found that the proposed ITFWO provides the lowest minimum of total cost among all the heuristic optimization techniques and confirms its capability in yielding a suitable balance between exploitation and exploration with better performance in terms of efficiency and robustness.
It has been found that the proposed ITFWO algorithm performs better than the other algorithms. This algorithm beats the original TFWO and a lot of other optimization algorithms in recent papers. In light of the ITFWO's success in solving various OPF problems, it should also be applicable to other optimization problems. As part of our future studies, we will use the proposed algorithm to solve problems related to micro-grid power dispatch, global optimization of overcurrent relays, and dust control systems. Furthermore, ITFWO can solve complex hydrothermal scheduling, dynamic OPF, and optimal reactive power dispatch (ORPD). The author is particularly interested in the field of intelligent control of industrial dust in environmental protection, which is one of the areas of future research he plans to pursue.