AC optimal power ﬂow with thermal–wind–solar–tidal systems using the symbiotic organisms search algorithm

Optimal power ﬂow problem is one of the most important non-linear problems for power system planning and the operation of existing modern power networks. Recently, the incre-mental usage of renewable energy sources in power systems has revealed the signiﬁcance of power system planning. Thus, the aim is to model the AC optimal power ﬂow problem using thermal–wind–solar–tidal energy systems. In this study, uncertainties of wind, solar, and tidal energy systems were simulated using Weibull, Lognormal, and Gumbel probability distribution functions. Furthermore, the study presents solutions to the AC optimal power ﬂow problem by including test cases of stochastic wind, solar, and tidal energy systems involving minimisation of cost function, active power loss, voltage deviation, enhancement of voltage stability, and contingency conditions. The solutions were tested via IEEE 30-bus and IEEE 118-bus test systems incorporating renewable energy sources, using different locations according to the selected thermal generating units. The symbiotic organisms search algorithm, which is one of the recently introduced optimisation algorithms, was used to solve the proposed power system planning problem, and simulation results of this algorithm were compared to the results of other algorithms such as the imperialist competitive, harmony search, backtracking search optimisation, and gravitational search algorithms.

those for wind, solar, wave, hydro, and tidal energy.Because of the increased use of RESs in modern power systems, modern power systems have begun being more complicated network structures.For this reason, solving the OPF problem in modern power system planning and operations including RESs is a topic of interest to researchers [1][2][3][4][5].
In the beginning, power system research groups that sought to solve the OPF problem in different test systems of electrical power networks and to minimise total fuel costs by using thermal generation units applied a number of algorithms, including the improved colliding bodies optimisation [6], glowworm swarm optimisation (GSO) [7], improved teaching-learningbased optimisation algorithm via the Lévy mutation strategy [8], chaotic krill herd algorithm [9], modified sine-cosine algorithm [10], tree-seed algorithm [11], improved social spider optimisation algorithm [12], hybrid Harris hawk optimisation based on differential evolution [13], and long-term memory Harris hawk optimisation [14].
Recently, to solve the OPF problem, the power system groups have been investigating the use of meta-heuristic optimisation algorithms to solve the problem for both classical OPFs and OPFs, including RESs.Elattar and ElSayed used a modified JAYA algorithm to solve the OPF problem by considering RESs in different test systems [15].Gucyetmez and Cam proposed a hybrid genetic teaching-learning-based algorithm (G-TLBO) to solve the OPF problem using thermal-wind generating units and tested the algorithm on a 19-bus Turkish power system [16].Shilaja and Arunprasath solved the OPF problem using thermal, wind, and solar power systems by using hybrid-enhanced grey wolf optimisation and dragonfly algorithms on an IEEE 30-bus test system [17].Ullah et al. aimed to solve the OPF problem using a hybrid phasor particle swarm optimisation and gravitational search algorithm with RESs (wind and solar energy systems), and the proposed solution method and problem were tested on an IEEE 30-bus test system [18].Chen et al. focused on the solution of the OPF problem by incorporating some common RESs such as wind and solar power systems.They successfully applied a constrained multi-objective population extremal optimisation algorithm to solve the problem under different test cases on an IEEE 30-bus test system [19].Elattar undertook the OPF problem with a combined heat and power system involving stochastic wind energy by using a modified moth swarm optimisation algorithm, and the solution approach was tested on an IEEE 30-bus test system under various operational cases [20].Reddy studied the solution of the OPF problem using thermal generating units, wind energy, and a photovoltaic (PV) power system with batteries [21].Saha et al. focused on the investigation of the solution of the probabilistic multi-objective OPF with RESs using hybrid differential evolution and symbiotic organisms search (SOS) algorithm, which tested on IEEE 30-bus test system under different operational conditions [22].Duman et al. investigated the solution of the OPF problem with controllable wind and PV energy systems using differential evolutionary particle swarm optimisation [23]; in another study, they developed a modified particle swarm optimisation and gravitational search algorithm with chaotic maps to solve the OPF problem with flexible alternating current transmission system (FACTS) devices incorporating wind energy systems [5].Salkuti et al. applied the non-dominated sorting genetic algorithm-II (NSGA-II) algorithm for solving of multi-objective optimal generation planning involving wind and solar power systems [24].Salkuti presented the multi-objective GSO algorithm to solve the OPF problem considering the wind energy system [25].
In addition, different studies have explored the solution of the OPF problem by incorporating RESs using the NSGA II algorithm considering the selected strategies, which are the pareto frontier and the fuzzy satisfaction-maximizing method [26], the hybrid particle swarm optimisation and artificial physics optimisation [27], the adaptive parameter control technique of success-history-based adaptation of differential evolution with superiority of feasible solutions [28], the hybrid modified imperialist competitive algorithm (ICA) and sequential quadratic programming [29], the multi-objective evolution-ary algorithm based on decomposition with superiority of feasible solutions and summation-based multi-objective differential evolution with superiority of feasible solutions [30], and the modified bacteria foraging-based algorithm [31].
In this study, we proposed to solve the alternating current optimal power flow (ACOPF) problem for thermal, wind, solar, and tidal energy systems using the SOS algorithm.In addition, the most appropriate probability density functions (PDFs) were specified to create a model of the RESs used in the presented ACOPF and security-constrained ACOPF problems.The SOS algorithm [32] is a new meta-heuristic optimisation algorithm presented to the literature by Cheng and Prayogo.In the development of the algorithm, its main structure was composed using a simulation of the symbiotic behavior of organisms in an ecosystem, and it has been studied in different fields of science up to the present [33].The simulation results of the SOS approach were compared to those of the ICA [34], harmony search (HS) algorithm [35], backtracking search optimisation algorithm (BSA) [36], and gravitational search algorithm (GSA) [37].These comparison algorithms were applied to solve the various power system problems, which are the combined heat and power economic dispatch [38], optimal reactive power dispatch [39], OPF with two terminal high-voltage direct current (HVDC) systems [40], power system stability problem [41], the short-term hydrothermal scheduling [42], dynamic economic dispatch [43], unit commitment problem [44], and the reconfiguration problem of distribution systems [45].The main contributions of this study can be listed as follows.
(i) The ACOPF problem was examined for wind power, PV, and tidal energy systems.Tidal energy systems are defined as combined or hybrid systems of tidal range and tidal stream [46,47].(ii) The ACOPF and security-constrained ACOPF problems were presented using RESs and thermal generating units and included various objective functions and contingency conditions.(iii) The tidal energy system was considered as a generating system and included cost models for over-and underestimation conditions.Uncertainty cost models of the wind, PV, and tidal energy systems within the proposed ACOPF problem had not been previously reported; thus, the formulation of this problem in this study is a new and original contribution to the literature.(iv) To demonstrate the solvability and applicability of the presented ACOPF and security-constrained ACOPF problems for wind, PV, and tidal energy and thermal generating systems, the SOS, ICA, HS, BSA, and GSA algorithms were implemented under various test cases for an IEEE 30-bus power system.
The rest of this study is organised as follows.The mathematical formulations of the ACOPF problem for wind, PV, and tidal energy and thermal generating systems are given in Section 2. Section 3 demonstrates the RES uncertainty and power models.The SOS optimisation algorithm is defined in Section 4, and Section 5 elucidates the simulation studies and results for different operating cases in the proposed ACOPF problem.Section 6 summarises the conclusions of this study.

FORMULATION OF ACOPF WITH RENEWABLE ENERGY SOURCES
Recently, the ACOPF problem has been defined as one of the important planning problems of modern power systems.In this problem, the main goal is identified and the stated objective function is then minimised to find the optimal control variables within the equality and inequality constraints.

AC optimal power flow problem
The mathematical formulation of the OPF problem can be expressed as follows: Minimize subject to where f obj (D,E) is the objective function, D and E are the state and the control variables, and m(D,E) and n(D,E) represent the equality and the inequality constraints, respectively.

Security constrained optimal power flow problem (SCOPF)
The mathematical formulation of the SCOPF problem can be defined and considered with a preventive approach as given below: where D 0 and E 0 represent the state and the control variables under pre-contingency cases, D a is the state variables of the ath contingency case, and c indicates the number of contingency cases.

State variables of the OPF problem
The state variables of the proposed OPF problem are identified as follows: where P THG1 is the active power of the swing generator; V L represents the voltage values of load (PQ) buses, Q G , Q WS , Q PVS , and Q WS+TDL represent the reactive power of traditional generating units, wind power, the PV system, and combined wind power and tidal systems, respectively; and S L is the apparent power of the transmission lines.NPQ , NTHG, NW, NPV, NWTDL, and NTL are the numbers of load buses, traditional generating units, wind farms, PV system, combined systems, and transmission lines in the system, respectively.

Control variables of the OPF problem
The control variables of the proposed problem are given as follows: where P THG is the active power of the traditional generating units except for the swing generator; P WS , P PVS , and P WS+TDL are the active powers of the wind farm, PV system, combined wind power and tidal energy systems, respectively; and V G represents the voltage values of all generator buses, including the traditional generating units, wind farm, PV system, and combined systems.T and Q SH are, respectively, the tap ratios of the transformers and the shunt VAR compensation; NG, NT, and NC are number of generator buses (including thermal, wind, PV and combined units), tap setting transformers, and compensators, respectively.

Generation cost model of traditional generators
The traditional generation cost function in thermal generators is identified as a quadratic cost function in (7) depending on output active power.In (8), the cost model is defined as a quadratic function including valve-point effects, where x k , y k , and z k are fuel cost coefficients of the kth thermal generator, and d k and e k are the valve-point loading effect coefficients C F 1 (P THG ) = CF (P THG )

Emission and carbon tax model of thermal generators
The total emission value from the thermal generators using fossil fuel is mathematically defined as follows [28]: where σ k , β k , τ k , ω k , and μ k are emission coefficients of the kth thermal generator.In addition, due to increasing global warming, a carbon tax is added to the total emission value as shown below: where C E and C tax represent emission cost and tax, respectively.

Direct cost model of wind, PV, and tidal energy systems
A direct cost model of the wind power in the system is shown via a linear function of scheduled power [28].DC W,k , wp,k, and P WS,k can be defined as the direct cost function of wind power, the cost coefficient, and the scheduled power of the kth wind power system, respectively The direct cost model for the PV power is shown in (12), and DC PV,k , pv,k, and P PVS,k are the direct cost function of the PV system, the cost coefficient, and the scheduled power of the kth PV power system [28], respectively The direct cost value of the proposed combination model of wind power and tidal energy can be mathematically calculated as follows: where DC WSTDL,k , P tdl,k , and P TDLS,k are the direct cost function of the combined system, the cost coefficient, and the scheduled power of the kth tidal energy system, respectively.

Uncertainty cost model of wind, PV, and tidal energy systems
Overestimation and underestimation are defined as the uncertain cost models of the wind, PV, and combined model (wind-tidal) energy systems.Uncertainty cost models of wind power are shown as follows [28,30]: The overestimation and underestimation cost models of the PV power system are modelled by using the approach proposed in [28] and [30].Cost models for over-and underestimation conditions of the PV system can be calculated using the following equations: where OC PV,k and UC PV,k are over and underestimation cost values, C Opv,k and C Upv,k are the uncertainty cost coefficients, and P PVav,k is the available power of the kth PV power system.In our study, the tidal energy system was defined as an active power generating unit.Over-and underestimation cost models of the proposed model are prepared by the modelling approach in [28,30], and [48] where OC TDL,k and UC TDL,k are over-and underestimation cost values, respectively, C Otdl,k and C Utdl,k are the uncertainty cost coefficients, and P TDLav,k is the available power of the kth tidal energy system.

2.9
Objective functions

Total cost model of the proposed OPF
The total cost model of the proposed OPF using RESs is given as follows: In this objective function, thermal generating units are considered as the valve-point effect.

Total cost model with emission and tax of the proposed OPF
In the proposed OPF problem, the objective function including emission and tax is defined as follows:

Active power losses
The minimisation of the active power losses of the power system is defined as an objective function shown as

Improvement of the voltage stability
To Improve the voltage stability problem, which is a well-known problem in modern power systems, the objective function is considered as follows [1,5]: NG is the number of generator (PV) buses, including RESs, and the L-index value of the jth bus is defined as L j .Y LL and Y LG are computed from the system YBUS matrix, as follows: and the objective function is given as

Voltage deviation
The value of voltage deviation of the power system in the proposed OPF problem is given as

Equality constraints
The equality constraints of the proposed ACOPF problem can be mathematically identified as follows: where P Gk and P Dk are the active powers of the kth generating unit (including thermal, wind, solar, and combined windtidal units) and the load buses, respectively.Q Gk , Q SHk , and Q Dk are the reactive powers of the kth generating unit (including thermal, wind, solar, and combined wind-tidal units), the shunt VAR compensator, and the load buses in the electrical power grid, respectively; N bus is the number of buses, V k and V l are the voltage values at the kth and lth buses, respectively, θ kl is the angle difference of voltage phasor values at the kth and lth buses, and g kl and b kl are the conductance and susceptance values of the transmission line between kth and lth buses, respectively.

Inequality constraints
(i) Transformer constraints: Lower and upper limits of the transformer tap settings are given as where T k,min and T k,max are minimum and maximum tap setting values of the transformers, respectively.
(i) Compensator constraints: Optimal operating ranges of the shunt VAR compensators are calculated as where Q SHk,min and Q SHk,max are the lower and upper limits of the shunt VAR compensators, respectively.
(i) Generator constraints: Minimum and maximum limits on the active, reactive power values, and the voltage magnitudes of the generating units (including thermal, wind, solar and combined wind-tidal units) are defined as (ii) Security constraints: The voltage value of each of the load buses must be within specified minimum and maximum limits, and the apparent power value of each transmission line can be restricted by its maximum capacity.These security constraints are calculated as follows: where V Lk,min and V Lk,max are the lower and upper voltage values of the kth load bus, respectively; S Lk and S Lk,max represent the apparent power value and maximum apparent power value of the kth line, respectively.
The fitness function of the proposed OPF problem, including the wind-solar-tidal energy systems, can be expressed as where λ VPQ , λ Pslack , λ QTHG , λ QWS , λ QPVS , λ QWSTDL , and λ SL were set as 1000 of the penalty coefficients for all test cases.

WIND/SOLAR/TIDAL UNCERTAINTY AND POWER MODELS
Wind speed distribution is described by the Weibull PDF as shown in the following equation: where ξ and ψ are the shape and scale factors, respectively [28,30].
The output power in a wind energy system is shown as follows: where p wr , v w,in , v w,out , and v w,r represent the rated power, cutin, cut-out, and rated wind speeds, respectively.The power of a wind farm has discrete parts according to wind speeds as can be seen in (36).In these parts, the probability values are given as follows: Table 1 shows PDF parameters of the wind, solar, and tidal energy systems for IEEE 30-bus and IEEE 118-bus test systems.Wind speeds and rated power for each turbine were selected as v w,in = 3 m/s, v w,r = 16 m/s, and v w,out = 25 m/s and 3 MW, respectively [28,30].
The power output of the solar PV systems as a function of solar irradiation was identified by using the lognormal PDF.The probabilistic model and output power of the solar system can be mathematically described as follows [28,30]: , for G pv > 0 (40) where ζ and Ω are the mean and standard deviation values of the lognormal PDF, respectively, which are given in Table 1; G pv , G pvstd , and P pvrate are, respectively, the probability value of solar irradiance, the standard solar irradiance value, and the rated power of the PV system, which are set as 1000 W/m 2 and 40 MW at bus 11 for the IEEE 30-bus test system.Rc value was set as 180 W/m 2 .In this study, the probability model of discharge rate Q TDL in the tidal range was modelled by the Gumbel distribution [30], as shown in (42), and the distribution parameters are given in Table 1 .
The thermal generator at bus 13 of the IEEE 30-bus system was replaced with combined wind and tidal energy units.The output power in the tidal range can be represented as follows [47,[49][50][51]: where ρ and g are the water density (kg/m 3 ) and the gravity acceleration (m/s 2 ), Q TDL and η are, respectively, the discharge value (m 3 /s) across the turbine and the turbine efficiency, and H is the difference between high and low water levels (high water level -low water level).These parameters of the proposed tidal range system are set as H = 3.2 m, η = 0.85, ρ = 1025 kg/m 3 , and g = 9.81 m/s 2 .The extensively used tidal barrage structure in the tidal range technology is shown in Figure 1.In this technology, the generated power is expressed as a function of ebb-based generation, which is defined as the difference between water levels on both sides of the tidal range system [47,51].

SYMBIOTIC ORGANISMS SEARCH ALGORITHM
The SOS algorithm is one of the optimisation methods inspired by the symbiotic relationship between the organisms in an ecosystem.It was developed by Cheng and Prayogo in 2014 [32].The SOS method presents a simple and feasible structure for solving different optimisation problems [33].The algorithm structure is formed in three phases: mutualism, commensalism, and parasitism.The algorithm begins with candidate solutions to solve the problem, and these candidate solutions are expressed as each organism in the ecosystem.The initial ecosystem of the problem is randomly established within the limit values, and the application of the algorithm to the proposed OPF problem is represented as step-by-step in this section.
• Step 1: In this step, maximum iteration, ecosystem size, and stopping criteria are adjusted by the user, and the initial ecosystem is randomly created within the limit values.The creation of the model of organisms and ecosystem in algorithm is shown in Figure 2 [52].

• Step 2:
The fitness function of each organism in the ecosystem is computed as depending on the flow in Figure 2. The best organism is identified (X best ) in the ecosystem.• Step 3: In this step, the algorithm applies the mutualism operator, which is developed in the stages below.• An organism is randomly chosen from the ecosystem, where X m ≠ X n .• Benefit factors (B f1 and B f2 ) are computed using the codes below, and the mutualism vector are defined in (44).• The new candidate solutions are mathematically computed via the mutual relationship in nature • The fitness functions of the new candidate solutions (X mnew and X nnew ) are calculated, and if the fitness values of the new organisms exhibit better solution values than previous ones, the adaptation of the new organisms is accepted.Otherwise, the new organisms are refused, and the previous ones continue to be used in the ecosystem.• Step 4: In this step, the commensalism operator is applied via the symbiotic relationship of different organisms.The sub-steps of this operator are given as follows.• An organism is randomly chosen from the ecosystem (X n ), where X m ≠ X n .• The new organism (X mnew ) is computed by using random X n in the following equation: • The fitness value of the new organism (X mnew ) is computed, and if the new fitness value is better than the previous one, the new organism is used to replace it.Otherwise, the new organism is rejected, and the previous organism continues to be used in the ecosystem.

• Step 5:
The parasitism operator of the algorithm is applied to specify the new candidate solution in the ecosystem.• An organism is randomly chosen from the ecosystem (X n ), where X n ≠ X m .• A parasite vector (parasite_vect) is created by using X m organism in the ecosystem.• The fitness solution of the parasite vector is computed, and if the fitness value is better than the value of organism X n , the parasite vector is kept and replaces organism X n for use in the ecosystem.Otherwise, the parasite vector is rejected and organism X n continues to find optimal solution in the ecosystem • Step 6: If the determined ecosystem number is reached, the algorithm goes to Step 7. Otherwise, to identify the best organism, the algorithm goes to Step 2.

• Step 7:
The iteration number is determined as the termination criteria.If the iteration number is equal to the maximum iteration number, the algorithm stops, and the optimal solution of the problem is obtained.

SIMULATION RESULTS
In this study, to solve the ACOPF and security-constrained OPF problems, including the uncertainties of wind, solar, and tidal energy systems, the SOS, BSA, GSA, HS, and ICA algorithms were tested on IEEE 30-bus and IEEE 118-bus test systems.
The system parameters of the IEEE 30-bus and IEEE 118bus test systems were taken from [52][53][54][55][56]. The total active and reactive power load values of the IEEE 30-bus test system are 283.4MW and 126.2 MVAR, respectively.The test system has 41 transmission lines, 6 generating units, 4 tap rating transformers, and 2 shunt capacitor banks.The total active and reactive power base loads of the IEEE 118-bus system are 42.42 and 14.38 p.u. at the 100-MVA base, and this system has 54 generators, 9 tap rating transformers, and 14 shunt compensator units.
In our study, the reactive power limits of the RESs are set as -0.4×P max res,k p.u. and 0.5× P max res,k p.u. [28,30].P max res,k was the maximum active power of the RESs, which included wind, solar, and tidal energy sources.A single-line diagram of the modified IEEE 30-bus test system using wind, solar, and tidal energy systems is shown in Figure 3.
In this study, the optimisation algorithms used were run 30 times for all the test cases in order to obtain statistically valid simulation results.The setting parameters belonging to themselves of all optimisation algorithms in this paper were used the identical as in their original studies to ensure an equitable comparison among the obtained results from the algorithms.Furthermore, the maximum number of function evaluations (maxFEs) was used as the termination criteria, and the number of population size (Np) of the algorithms is described as the same value.Table 2 shows the setting parameters of all optimisation algorithms for this problem.

FIGURE 3 Modified IEEE 30-bus test system with RESs
Table 3 gives the direct, overestimation, and underestimation cost coefficients of the wind, solar, and tidal energy systems.The MATPOWER 6.0 was used to calculate the power flow equations of the proposed OPF problem using RESs [57,58].The simulation studies were carried out according to the test cases defined in the following.
Test system 1: Modified IEEE 30-bus test system with RESs Case 1: Solving an OPF problem with a quadratic cost function for thermal units, and a cost model of wind, solar, and combined wind-tidal energy sources.Case 2: Solving an OPF problem with a cost function using a valve-point effect for thermal units, and a cost model of wind, solar, and combined wind-tidal energy sources.Case 3: Solving an OPF problem with an active power loss for thermal units and the RESs.Case 4: Solving an OPF problem with emission and taxes for thermal units, and a cost model of the RESs.Case 5: Solving an OPF problem with an enhancement of voltage stability including the thermal units and the RESs.
Case 6: Solving an OPF problem with a voltage deviation including the thermal units and the RESs.Case 7: Solving a security-constrained OPF problem with chosen N -1 contingency conditions for thermal units and the RESs.
Test system 2: Modified IEEE 118-bus test system with RESs Case 8: Solving an OPF problem with a quadratic cost function for thermal generating units, and a cost model of the RESs.Case 9: Solving an OPF with cost function and valve-point effect for thermal generating units, and a cost model of the RESs.
The flowchart of the SOS algorithm used in solving the OPF problem is exhibited in Figure 4.

Case 1: Minimisation of the total cost for thermal and RES systems
Case 1 explains the minimizing of the total cost using the quadratic cost function of the thermal units and the cost model of the RESs.The optimal values of the control variables obtained from the proposed algorithm for all study cases are shown in Table 4.The minimum, average, maximum, and standard deviation values of the SOS, ICA, HS, BSA, and GSA algorithms for all cases are given in Table 6.According to the simulation study, the cost values of the SOS, ICA, HS, BSA, and GSA algorithms were 773.7797 $/h, 773.9525 $/h, 773.9589 $/h, 774.2297 $/h, and 779.3556, respectively.The resulting of the SOS algorithm was 0.0223%, 0.0231%, 0.0581%, and 0.7154% lower than that of the ICA, HS, BSA, and GSA algorithms.The convergence curves of the total cost values for the optimisation algorithms are shown in Figure 5(a).The figure clearly indicates that the SOS algorithm converges to the optimal value faster than the other heuristic algorithms.

Case 2: Minimisation of the total cost with valve-point effects for thermal and RES systems
Equation ( 20) was used to minimise the total cost with valvepoint effect for thermal units and the cost model of the RESs.

Case 3: Minimisation of the active power loss
In this case, minimisation of the active power loss of the IEEE 30-bus test system modified by using RESs was proposed by the SOS, ICA, HS, BSA, and GSA algorithms.According to the simulation results in Table 6, the SOS algorithm showed the best value compared to the simulation results from the other algorithms.The simulation curves of the algorithms are shown in Figure 6(a).

Case 4: Minimisation of the total cost with emission and carbon tax
The objective function given in (21) was used to optimise the total cost.The simulation results of the SOS, ICA, HS, BSA, and GSA optimisation algorithms were 777.7962 $/h, 777.8675 $/h, 777.9504 $/h, 778.0258 $/h, and 782.0579 $/h, respectively.Figure 6(b) shows the convergence curves of the optimisation algorithms used for this case.

Case 5: Enhancement of the voltage stability of test system
In order to enhance the voltage stability of the test system, minimisation of the L-index value, one of the well-known voltage stability indices, was proposed in this case.According to the results obtained at the end of the simulation studies, the minimum L-index value was found by the SOS optimisation algo-rithm, which was better than the other ICA, HS, BSA, and GSA optimisation algorithms.To be precise, the result of the SOS optimisation algorithm was 1.2639%, 1.0996%, 1.1139%, and 1.4702% lower than the simulation results of the ICA, HS, BSA, and GSA algorithms, respectively.

Case 6: Optimisation of the voltage deviation
Minimizing the voltage deviation of the test system was proposed in this case, and the simulation results obtained by the SOS, ICA, HS, BSA, and GSA optimisation algorithms were 0.12469, 0.13185, 0.13148, 0.13407, and 0.13111, respectively.It is clear from Table 6 that the result with the SOS algorithm was 5.4304%, 5.1642%, 6.9963%, and 4.8966% lower than with the other algorithms.

Case 7: N -1 contingency conditions in test systems
Power systems under continuous operation are subjected to various contingency conditions as outages in the lines.For this reason, modern power systems must provide satisfactory voltage stability under sudden unexpected conditions.In this study, to minimise the total cost and to improve the voltage stability of the test system using RESs, the objective function was considered as a single objective function, as follows: In this study, various contingency conditions were considered, including outages in the transmission lines between busses 2-6, and 15-18.
In the transmission line outage between buses 2 and 6 (Case 7.1), the SOS algorithm achieved the best objective function value of 820.2768, which was 0.5115, 0.6572, 1.1081, and 9.0855 lower than the simulation results of the ICA, HS, BSA, and GSA optimisation algorithms, respectively.It is clearly seen from Table 4 that the minimum cost value of the SOS algorithm is 806.4118$/h for this case.
An outage in the transmission lines between buses 15 and 18 was considered in Case 7.2.According to simulation results, the best optimal result of 817.2199 was achieved by the SOS algorithm, i.e., it was 0.02216%, 0.0419%, 0.05975%, and 0.90841% lower compared to the simulation results of the ICA, HS, BSA, and GSA optimisation algorithms, respectively.The convergence curves of the simulation results of the optimisation algorithms for Cases 7.1 and 7.2 are shown in Figure 7(a) and (b), where it is clearly seen that the SOS algorithm reached the optimal solution value of the problem faster than the other algorithms.
In this study, the lower and upper values of the all load busses are set as 0.95 and 1.05 p.u.The voltage profiles at the end of the simulation studies of all load buses for all cases are given in Figure 8(a) and (b), where the voltage profiles of all load buses are seen to be within the lower and upper values for all cases.

Case 8: Minimisation of the total cost for thermal and RES systems on the 118-bus test system
The optimisation of the total cost value using the quadratic cost function of the traditional generating units and the cost models of the RESs were studied in Case 8. Table 5 shows the control variables optimised as well as the objective function values from the SOS and the other algorithms.The total cost value of the Case 8 achieved via the SOS is 99852.5888$/h, which is the best result according to the results obtained from ICA, HS, BSA, and GSA algorithms.When the simulation results obtained were evaluated, the SOS result was 5.13092%, 5.72357%, 7.63292%, and 42.33847% lower than the results from the other algorithms.The convergence curves of the all optimisation algorithms are shown in Figure 9(a), and the voltage profile magnitudes of all load buses are remained within the acceptable range according to simulation results of the SOS algorithm for Cases 8 and 9, as shown in Figure 9(c).
The convergence curves of all algorithms: (a) Case 8, (b) Case 9, and (c) the voltage profiles of the load buses

Case 9: Minimisation of the total cost with valve-point effects for thermal and RES systems on the 118-bus test system
In Case 9, solving of the ACOPF problem considering the quadratic cost function with valve-point effect for thermal generating units, and the cost models of RES pro-posed using SOS, ICA, HS, BSA, and GSA optimisation algorithms.
The simulation results obtained from SOS method are shown in Table 5, and Table 6 shows the comparison with the results of all algorithms for this test system.The result of SOS algorithm is 104038.7111$/h, which is the best result in comparison with the simulation results of the other algorithms.The

CONCLUSION
This study investigated the modeling of the ACOPF problem using wind, PV, and tidal energy and thermal generating systems, and the SOS and other heuristic algorithms are used to solve the proposed ACOPF problem.The proposed problem using RESs was tested on IEEE 30-bus and IEEE 118-bus power test systems for various cases, which included different operating conditions of the thermal units and situations involving active power loss, voltage stability, voltage deviation, and specified N -1 contingencies.The simulation results obtained at the end of the optimisation process revealed that the SOS algorithm exhibited high convergence speed in reaching the optimal solution compared to the results of the ICA, HS, BSA, and GSA algorithms.The results of all the optimisation algorithms were examined statistically (minimum, mean, maximum, and standard deviation values) to confirm the optimal solution findings of the algorithms in all the test cases.The statistical results of all study cases demonstrated that the SOS algorithm presented the best value for each of the statistical cases.According to the standard deviation value of the results obtained from 30 test runs for all study cases, the results of the SOS algorithm were consistently found to be close to each other.Moreover, it is recommended that the ACOPF problem involving RESs also be investigated using various study cases to solve multi-objective problems on large power systems.This power system problem using wind power, PV power, tidal power, hydropower, plug-in electrical systems, and so forth can be considered as a dynamic ACOPF problem that could be incorporated into the power system network in a multi-terminal HVDC system incorporating FACTS devices.

FIGURE 4
FIGURE 4 The flowchart of the SOS algorithm for solving the OPF problem The simulation result of the SOS algorithm was 802.6983 $/h, which was 0.4843 $/h, 0.4669 $/h, 0.6195 $/h, and 6.9581 $/h lower than ICA, HS, BSA, and GSA algorithms.For Case 2, the convergence curves of the optimisation algorithms are shown in Figure 5(b).

FIGURE 5 FIGURE 6 FIGURE 7 FIGURE 8
FIGURE 5 The convergence curves of total cost values for all algorithms: (a) Case 1 and (b) Case 2

Figure 9 (
b) displays the convergence curves to optimal solution of all algorithms at the end of the optimisation process.

TABLE 1
PDF parameters for renewable energy sources

Tidal Ba rrage Turbine Tunnel Lower water level Sluice gate Sluice gate Land Sea High water level Head height Turbine Tidal Barrage FIGURE 1 Tidal range technology Ecosystem Organism a
11 , a 12 , a 13 ,…,a 1m a 21 , a 22 , a 23 ,…,a 2m a 31 , a 32 , a 33 ,…,a 3m

TABLE 2
The setting parameters of optimization algorithms

TABLE 3
The cost model coefficients of the renewable energy sources

TABLE 4
The simulation results of the proposed optimization algorithm for all cases

TABLE 5
The obtained simulation results of the IEEE 118-bus test system for Cases 8 and 9

TABLE 6
The minimum, mean, maximum and standard deviation values of the optimization algorithms for all cases