Introduction

As the costs and feasibility constraints of expanding infrastructure increase, the modern power system requires efficient and environmentally friendly electrical energy transmission. Thyristor Controlled Series Capacitors (TCSC), Thyristor Controlled Phase Shifters (TCPS) and Static VAR Compensators (SVC) are one of the Flexible AC Transmission System (FACTS) devices that promise to improve system stability and reduce transmission losses. These devices enhance the performance of the network by offering exact control over power flow and voltage stability, but their optimal placement and configuration is critical to achieving the most benefits under variable loading conditions. A robust framework is provided by the IEEE-30 bus test system to study the effective placement of FACTS devices with respect to the objectives of operational cost reduction, active power loss minimization, and gross cost minimization under both fixed and dynamic loading scenarios.

Problem context and motivation

Although FACTS devices have many advantages, the benefits are highly dependent on proper placement, which can be difficult in the face of a complex system and varying load conditions. The solutions must be computationally efficient, fast converging and robust under dynamic conditions. A number of algorithms have been proposed for this purpose, but many suffer from slow convergence, high computational requirements, or inconsistency between different load scenarios. As such, this research explores a more adaptive and efficient optimization technique that is accurate and reliable across various operating conditions.

Previous research

There are many proposed optimization algorithms to solve the problem of FACTS device placement and configuration in power systems. Key contributions in this field include:

  • Optimization techniques for FACTS placement Early work focused on the use of algorithms such as Genetic Algorithms (GA) for FACTS allocation in order to reduce active power losses and enhance system stability. Other methods such as Differential Evolution (DE) and Particle Swarm Optimization (PSO) have been widely applied to solve problems such as convergence rate and accuracy in tuning FACTS settings.

  • Advanced evolutionary and hybrid techniques Recent work has concentrated on hybrid and evolutionary approaches like Improved Grey Wolf Optimization (IGWO), Whale Optimization Algorithm (WOA) and Opposition Based Sine Cosine Algorithm (OBSCA). The solution consistency and computational efficiency of these algorithms are improved. Reactive power planning has been successfully solved using Sine Cosine Algorithm (SCA) and its differential evolution based variant (SCADE) but they still have difficulties in handling dynamic loading scenarios in a complete manner.

Over the recent years, the integration of FACTS devices to the power systems has been greatly advanced and many researchers have been working on optimizing power flow, placement and configuration in order to enhance the system efficiency and reliability. The Kepler optimization algorithm was used by Abid et al.1 to optimize power flow in hybrid energy systems, reducing emissions and operational costs. Mohamed et al.2 also optimized the location and sizing of FACTS devices to improve network stability and congestion reduction, where multi-scenario analysis was also considered. Hybrid power systems were the focus of Premkumar et al.3, who used flow direction algorithms in combination with FACTS controllers to ensure reliable operation with renewable energy inputs. Saheb et al.4 used Harris Hawks Optimization for reactive power control using shunt capacitors in a distinct approach with minimized power losses and improved voltage profiles.

A covariance matrix adaptation evolution strategy for FACTS device placement was introduced by Parthasarathy et al.5 for increased system resilience and optimized voltage stability. Fuzzy based placement of FACTS devices to improve voltage stability and minimize losses over variable loads was used by Abdalla et al.6. Ravi et al.7 extended this area using differential evolution for optimal power flow in renewable integrated systems and achieved better system flexibility and power loss management. Hybridization of genetic algorithms and simulated annealing by Kim et al.8 to optimize FACTS configurations yielded high convergence rates for optimal settings. In addition, Singh et al.9 investigated voltage stability by proposing a new FACTS device placement strategy on weak buses to enhance power quality at peak demand. Kumar and Pal10 used an analytical approach for optimal allocation of TCSC and SVC to relieve congestion and showed reduced losses and improved voltage stability.

Khan et al.11 used particle swarm optimization to obtain cost effective voltage stability and minimum transmission losses by optimal sizing of shunt compensators. In12, Ali and Yadav used the grey wolf optimization algorithm to dynamically control power flow in a network with FACTS devices in order to improve system stability and reduce cost. An effective power injection model for FACTS was proposed by Lee and Choi13 to improve load balancing and reduce operational losses. In14, Patel et al. used sensitivity analysis to strategically place FACTS devices on weak nodes to prevent instability in high demand situations. Differential evolution is applied by Wang et al.15 to optimize hybrid systems with FACTS in order to improve the cost efficiency and reactive power management.

In another study, Nguyen et al.16 developed an equivalent impedance model to minimize power losses by optimizing FACTS placement in transmission lines. For managing congestion, Chen et al.17 adopted genetic algorithms for TCSC and SVC placement, which minimized voltage deviations and operational losses. Zhang et al.18 optimized SVC allocations to improve voltage stability under varied load conditions. Das et al.19 introduced quasi-opposition learning to enhance convergence speed in power flow control, leading to precise FACTS placements. Gupta et al.20 employed fuzzy membership functions for locating SVC and TCSC devices, ensuring voltage stability across variable load scenarios.

FACTS is shown to be effective in reducing power losses by minimizing voltage deviations using load flow analysis, as demonstrated by Alfayez and Hassan21. FACTS placement for sustained voltage stability was optimized by Bhattacharya et al.22 using the Newton–Raphson method. Differential evolution was shown to have the potential for voltage stabilization under high load demands by Pal and Roy23. Power flow analysis was used by Meena and Gupta24 to identify weak buses and then optimize TCSC and SVC placements to minimize losses. Rao et al.25 effectively integrated quasi opposition based learning into differential evolution to ensure optimal device configurations across load conditions.

The efficacy of the Whale Optimization Algorithm (WOA) in congestion management with FACTS is examined by Singh and Ahmed26, with better load distribution and reduction in losses. Hybrid particle swarm optimization for FACTS to reduce transmission losses and stabilize voltage profiles was shown to be beneficial by Dutta and Kumar27. Power loss reduction and stability have been improved as compared to SGA and fuzzy-GA techniques28. FACTS allocation using genetic algorithms to minimize active power loss in transmission lines was applied by Mishra et al.29. Reactive power control was enhanced by quasi-oppositional search in SCA to improve convergence and robustness, as done by Verma and Yadav30.

Gravitational search algorithms were used by Raj and Bhattacharyya31 for FACTS placement optimization, reducing voltage instability and power losses. Modal analysis was used by Hossain et al.32 to find optimal SVC and TCSC placements for increasing voltage stability. FACTS device sizing was optimized by Roy et al.33 using opposition based differential evolution to improve voltage regulation accuracy. Reactive power planning with FACTS using fuzzy logic was implemented by Kaur and Singh34 to obtain optimal voltage profiles. Genetic algorithms were used to optimally configure FACTS by Kumar et al.35 for cost and loss reduction in hybrid systems. A hybrid GA-PSO approach was used by Sharma and Kumar36 for FACTS placement under dynamic loads, resulting in lower losses and better voltage stability. Lastly, Arora et al.37 used quasi-opposition based PSO for power flow optimization, in which they found faster convergence and better load distribution with FACTS devices.

The demand for reliable and efficient energy transmission is growing rapidly in modern power systems. In order to meet growing energy needs, aging infrastructure, and the integration of renewable energy sources, much research has been conducted to optimize power flow and improve system stability. Thyristor Controlled Series Capacitor (TCSC), Static VAR Compensator (SVC), Thyristor Controlled Phase Shifter (TCPS), etc., are the Flexible AC Transmission System (FACTS) devices, which have become essential components for improving voltage stability, reducing power losses and optimizing power flow. However, their placement and configuration within the network is critical to their effectiveness. The optimization of FACTS device placement and settings has historically progressed from conventional methods to more advanced computational methods. Early efforts used heuristic and metaheuristic algorithms such as Genetic Algorithms (GA) and Differential Evolution (DE) to show promise in improving system performance through power loss minimization and voltage profile stabilization. Although these methods have been effective for small scale problems, they were often computationally expensive and slow to converge in dynamic and large scale systems. Research continued to make progress and more and more advanced algorithms were being developed to get around these limitations. The trade-offs between conflicting objectives, e.g. cost minimization and loss reduction, were addressed with hybrid techniques, e.g. Particle Swarm Optimization (PSO) combined with DE, and multi objective approaches. The Improved Grey Wolf Optimization (IGWO), Whale Optimization Algorithm (WOA), and Opposition Based Sine Cosine Algorithm (OBSCA) were recently introduced to improve convergence speed, accuracy and adaptability. However, these techniques proved to improve significantly in handling complex systems, but they still faced difficulties in dynamic scenarios, including variable loading conditions and renewable energy integration. With the integration of renewable energy sources, especially wind power, power system optimization has become more complicated. There is a stochastic nature of wind generation, which leads to an optimization of methods for the uncertainty of load demand and output of generation. This requires algorithms that can consistently perform, in a computationally efficient manner, over a wide range of operating conditions.

The increasing complexity of modern power systems, due to rising energy demands, renewable energy integration, and infrastructure constraints, motivates this study. However, these challenges require the development of advanced optimization techniques to improve operational efficiency, lower costs, and guarantee system reliability. This research specifically addresses the critical problem of optimally placing and configuring Flexible AC Transmission System (FACTS) devices to improve power flow control, voltage stability, and reactive power management.

The FACTS devices, such as TCSC, TCPS and SVC, are well known for their ability to improve power system flexibility and stability. However, their placement and parameter settings are highly nonlinear and multi objective optimization problems. This is further complicated under dynamic load scenarios where load uncertainties and variations in operating conditions can greatly affect system performance. Such a complex and dynamic environment makes it difficult for traditional optimization techniques to find robust solutions, illustrating the requirement for sophisticated algorithms which can deal with these complications in as effective a manner as possible.

The adoption of Sine Cosine Algorithm (SCA) for improvement purposes depends on its basic structure and simple implementation alongside its successful performance in complex optimization tasks. The population-based metaheuristic SCA uses sine and cosine mathematical properties to both explore and exploit the search area. The optimization algorithm stands out because it offers a basic structure together with low parameter needs and effective exploration–exploitation balance properties. The standard SCA delivers multiple benefits but it encounters several drawbacks which include its gradual convergence along with sensitivity to local minima during simulation and poor results while searching high-dimensional or dynamic solution spaces. The combination of renewable energy sources and FACTS devices in complex power system optimization creates significant limitations because it introduces additional uncertainties and nonlinearities. SCA stands out for improvement because its basic mathematical structure provides strong capabilities that simplify modifications and upgrades compared to the more complicated GA and PSO algorithms. The No Free Launch (NFL) theorem demonstrates why SCA improvement is vital because it shows that power system optimization requires specialized domain-specific enhancements. The proposed Adaptive Randomized Sine Cosine Algorithm (ARSCA) includes two specific adaptive mechanisms which address standard SCA limitations by using the Adaptive Quadratic Interpolation Mechanism (AQIM) and the Rounding Mechanism (RM). The enhanced design of ARSCA results in optimization performance that balances exploration versus exploitation which produces quicker convergence time together with more precise solutions and stronger operating condition resistance. According to the NFL theorem the effectiveness of an algorithm depends both on theoretical foundations and problem-specific adaptability despite being mathematical theory.

The sine and cosine functions in SCA enable automatic control between global search exploration and local search exploitation. The optimization of power systems requires both global and local search capabilities because the problem includes nonlinear characteristics and multiple objectives. The proposed Adaptive Randomized Sine Cosine Algorithm (ARSCA) obtains a better search process through its combination of adaptive randomization with local refinement techniques on top of SCA capabilities. The design of SCA enables its effective use in large and intricate power systems because it scales well. ARSCA adopts adaptive mechanisms which improve its capability to adjust handle dynamic load conditions and additionally it supports renewable energy uncertainties and operates with FACTS devices. Modern power systems require this flexible control method because they must function in unpredictable varying conditions. The modifications to SCA with AQIM and RM introduce innovative solutions to metaheuristic optimization research. SCA selection for improvement becomes justified because its simplicity and flexibility combined with its natural exploration–exploitation balance. The implementation of adaptive mechanisms in SCA through ARSCA enables better performance for power system optimization while surpassing traditional methods for power system optimization.

Novelty of the work

The main novelty of this research is the development of the Adaptive Randomized Sine Cosine Algorithm (ARSCA)38 which is a major improvement over the standard Sine Cosine Algorithm (SCA). SCA is simple and easy to implement, but is limited by slow convergence, susceptibility to local optima and suboptimal performance in dynamic and high dimensional search spaces. ARSCA overcomes these limitations through the following innovative features:

  1. 1.

    Adaptive randomization mechanism The algorithm dynamically adapts the search behavior with respect to the optimization process’ progress, which improves the mechanism to explore the solution space efficiently. In the end, this achieves a better global exploration (diverse solutions) and local exploitation (best solution refinement).

  2. 2.

    Quadratic interpolation for local refinement To increase the accuracy of local searches, quadratic interpolation is introduced to estimate optimal solutions within a smaller neighborhood. ARSCA features the faster and more accurate convergence to optimal solutions in highly nonlinear optimization problems with singularity.

  3. 3.

    Enhanced scalability and robustness ARSCA is designed to handle dynamic load conditions and power system uncertainties. It is adaptive, and performs well in a wide variety of scenarios, making it suitable for real world applications in which the operating conditions are unknown.

  4. 4.

    Comprehensive multi-objective optimization Unlike many existing algorithms, Sine Cosine Algorithm (SCA)39, Improved Grey Wolf Optimization (IGWO)40, Whale Optimization Algorithm (WOA)41, Sine Cosine Algorithm Differential Evolution (SCADE)42, and Opposition Based Sine Cosine Algorithm (OBSCA)43, ARSCA optimizes multiple conflicting objectives, such as minimizing active power losses, generation costs, and gross system costs, simultaneously. The robustness and versatility of the algorithm is shown by its ability to keep high performance across superior results in minimizing active power loss, operational costs, and gross system costs through case studies.

Mathematical models and problem formulation

This study uses the IEEE 30-bus test system44, modified to include wind generators and Flexible AC Transmission System (FACTS) devices. Figure 1 illustrates the configuration. The optimization process focuses on the location and rating of the FACTS devices, represented by dotted lines.

Fig. 1
figure 1

Adapted IEEE 30-bus system for OPF study incorporating wind generators and FACTS devices.

Mathematical modelling for cost calculation

Fuel or generation cost of thermal units

The generation cost \(C_{T0i}\), represented as Eq. (1), for the \(i{\text{th}}\) thermal unit, in \({\text{\$ }}/{\text{h}}\), is modeled as:

$$C_{T0i} \left( {P_{TGi} } \right) = a_{i} + b_{i} P_{TGi} + c_{i} P_{TGi}^{2}$$
(1)

where \(P_{TGi}\) is the output power of the thermal generator (MW), \(a_{i}\), \(b_{i}\), and \(c_{i}\) are cost coefficients. considering valve-point loading, represented as Eq. (2), the generation cost becomes:

$$C_{Ti} \left( {P_{TGi} } \right) = a_{i} + b_{i} P_{TGi} + c_{i} P_{TGi}^{2} + \left| {d_{i} \times \sin \left( {e_{i} \times \left( {{ }P_{TGi}^{{{\text{min}}}} - P_{TGi} } \right)} \right)} \right|$$
(2)

The cost coefficients for all thermal units are provided in Table 145.

Table 1 Thermal power unit cost coefficients.

Calculation of wind power probabilities

Wind speed distribution46,47 is modeled using the Weibull probability density function (PDF), represented as Eq. (3):

$$f_{v} \left( v \right) = \left( {\frac{\beta }{\alpha }} \right)\left( {\frac{v}{\alpha }} \right)^{{\left( {\beta - 1} \right)}} e^{{ - (v/\alpha )^{\beta } }} \;{\text{for}}\;{ }0 < v < \infty$$
(3)

The Weibull scale \(\alpha\) and shape \(\beta\) parameters for the wind power plant sites are listed in Table 2. The power output of a wind turbine is defined by Eq. (4):

$$p_{w} \left( v \right) = \left\{ {\begin{array}{*{20}l} 0 \hfill & {for} \hfill & {v\left\langle {v_{i} \;and\;v} \right\rangle v_{o} } \hfill \\ {p_{wr} \left( {\frac{{v - v_{i} }}{{v_{r} - v_{in} }}} \right)} \hfill & {for} \hfill & {v_{{\text{i }}} \le v \le v_{r} } \hfill \\ {p_{wr} } \hfill & {for} \hfill & {v_{r} < v \le v_{o} } \hfill \\ \end{array} } \right.$$
(4)
Table 2 PDF parameters and cost coefficients for wind power generating plants.

Wind power probabilities for these discrete regions, represented as Eq. (5) and Eq. (6), are calculated using48,49:

$$f_{w} \left( {p_{w} } \right)\left\{ {p_{w} = 0} \right\} = 1 - {\text{exp}}\left[ { - \left( {\frac{{v_{{\text{i }}} }}{\alpha }} \right)^{\beta } } \right] + {\text{exp}}\left[ { - \left( {\frac{{v_{{\text{o }}} }}{\alpha }} \right)^{\beta } } \right]$$
(5)
$$f_{w} \left( {p_{w} } \right)\left\{ {p_{w} = p_{wr} } \right\} = {\text{exp}}\left[ { - \left( {\frac{{v_{r} }}{\alpha }} \right)^{\beta } } \right] - {\text{exp}}\left[ { - \left( {\frac{{v_{{\text{out }}} }}{\alpha }} \right)^{\beta } } \right]$$
(6)

The probability for the continuous region between cut-in speed \(\left( {v_{{\text{i }}} } \right)\) and rated speed \(\left( {v_{r} } \right)\) is calculated by Eq. (7):

$$f_{w} \left( {p_{w} } \right) = \frac{{\beta \left( {v_{r} - v_{{\text{i }}} } \right)}}{{\alpha^{\beta } {*}p_{wr} }}\left[ {v_{{\text{i }}} + \frac{{p_{w} }}{{p_{wr} }}\left( {v_{r} - v_{{\text{i }}} } \right)} \right]^{\beta - 1} \times exp\left[ { - \left( {\frac{{v_{{\text{i }}} + \frac{{p_{w} }}{{p_{wr} }}\left( {v_{r} - v_{{\text{i }}} } \right)}}{\alpha }} \right)^{\beta } } \right]$$
(7)

Direct cost of wind power

The direct cost \(C_{wj}\)50 for the \(j{\text{th}}\) wind power plant is modeled in Eq. (8) as:

$$C_{wj} \left( {P_{wsj} } \right) = g_{wj} P_{wsj}$$
(8)

where \(P_{wsj}\) is the scheduled power output of the wind generator, and \(g_{wj}\) is the cost coefficient per unit of power generated by the wind farm.

Cost evaluation of uncertain wind power

Due to the uncertainty in wind power, reserve and penalty costs are incurred. The reserve cost in Eq. (9) is calculated as:

$$\begin{array}{*{20}r} \hfill {C_{Rwj} \left( {P_{wsj} - P_{wavj} } \right)} & \hfill { = K_{Rwj} \left( {P_{wsj} - P_{wavj} } \right)} \\ \end{array} = K_{Rwj} \mathop \smallint \limits_{0}^{{P_{wsj} }} \left( {P_{wsj} - p_{w} } \right)f_{wj} \left( {p_{w} } \right)dp_{w}$$
(9)

The actual power from the plant is \(P_{wavj}\), and \(f_{wj} \left( {p_{w} } \right)\) represents in Eq. (10) the plant probability density function. Expanding the right-hand side of Eq. (9):

$$\begin{aligned} & K_{Rwj} \mathop \smallint \limits_{0}^{{P_{wsj} }} \left\{ {\left( {P_{wsj} - p_{w} } \right)\frac{{\beta \left( {v_{r} - v_{in} } \right)}}{{\alpha \beta {*}P_{wrj} }}\left[ {v_{in} + \frac{{p_{w} }}{{P_{wrj} }}\left( {v_{r} - v_{in} } \right)} \right]^{\beta - 1} \times {\text{exp}}\left[ { - \left( {\frac{{v_{in} + \frac{{p_{w} }}{{P_{wjj} }}\left( {v_{r} - v_{in} } \right)}}{\alpha }} \right)^{\beta } } \right]} \right\}dp_{w} \\ & \quad + K_{Rwj} \left( {P_{wsj} - 0} \right)*f_{wj} \left( {p_{w} } \right)\left\{ {p_{w} = 0} \right\} \\ \end{aligned}$$
(10)

The penalty cost for underestimated wind power is:

$$C_{Pwj} \left( {P_{wavj} - P_{wsj} } \right) = K_{Pwj} \left( {P_{wavj} - P_{wsj} } \right) = K_{Pwj} \mathop \smallint \limits_{{P_{wsj} }}^{{P_{wrj} }} \left( {p_{w} - P_{wsj} } \right)f_{wj} \left( {p_{w} } \right)dp_{w}$$
(11)

Expanding the right-hand side of Eq. (11) as Eq. (12):

$$\begin{aligned} & K_{Pwj} \mathop \smallint \limits_{{P_{wsj} }}^{{P_{wrj} }} \left\{ {\left( {p_{w} - P_{wsj} } \right)\frac{{\beta \left( {v_{r} - v_{in} } \right)}}{{\alpha^{\beta } {*}P_{wrj} }}\left[ {v_{in} + \frac{{p_{w} }}{{P_{wrj} }}\left( {v_{r} - v_{in} } \right)} \right]^{\beta - 1} \times {\text{exp}}\left[ { - \left( {\frac{{v_{in} + \frac{{p_{w} }}{{P_{wrj} }}\left( {v_{r} - v_{in} } \right)}}{\alpha }} \right)^{\beta } } \right]} \right\}dp_{w} \\ & \quad + K_{Pwj} \left( {P_{wrj} - P_{wsj} } \right)*f_{wj} \left( {p_{w} } \right) \\ \end{aligned}$$
(12)

The selected cost coefficients are provided in Table 2, in accordance with the justifications in49.

FACTS device modelling

The Thyristor-Controlled Series Capacitor (TCSC) and Thyristor-Controlled Phase Shifter (TCPS) are series compensation devices that improve loading capability and power flow in transmission lines. The Static Var Compensator (SVC), a shunt compensation device, enhances the system reactive power51.

TCSC model

The basic circuit structure of a TCSC is shown in Fig. 2. It consists of a fixed series capacitor \(\left( {X_{C} } \right)\) in parallel with a thyristor-controlled reactor \(\left( {X_{L} } \right)\). Thus, the effective reactance of the TCSC, incorporating a fixed capacitive reactance \(\left( {X_{C} } \right)\) and a variable inductive reactance \(\left( {X_{L} \left( \gamma \right)} \right)\), can be expressed as Eq. (13):

$$X_{{{\text{TCSC}}}} \left( \gamma \right) = \frac{{X_{C} X_{L} \left( \gamma \right)}}{{X_{L} \left( \gamma \right) - X_{C} }}$$
(13)
Fig. 2
figure 2

Basic circuit structure of TCSC.

The static model of the TCSC between buses \(m\) and \(n\) is depicted in Fig. 3. The modified reactance \(\left( {X_{{{\text{eq}}}} } \right)\) of the transmission line after incorporating the TCSC (in variable capacitive reactance mode) is given by Eq. (1415):

$$X_{{{\text{eq}}}} = X_{mn} - X_{{{\text{TCSC}}}} = \left( {1 - \tau } \right)X_{mn}$$
(14)
$$\tau = \frac{{X_{{{\text{TCSC}}}} }}{{X_{mn} }}$$
(15)
Fig. 3
figure 3

Model of TCSC.

Here, \(\tau\) represents the degree of series compensation, and \(X_{mn}\) is the inductive reactance of the line. \(R_{mn}\) denotes the line resistance. The power flow equations for the line incorporating TCSC are written as Eq. (1619):

$$P_{mn} = V_{m}^{2} g_{mn} - V_{m} V_{n} g_{mn} {\text{cos}}\left( {\delta_{m} - \delta_{n} } \right) - V_{m} V_{n} b_{mn} {\text{sin}}\left( {\delta_{m} - \delta_{n} } \right)$$
(16)
$$Q_{mn} = - V_{m}^{2} b_{mn} - V_{m} V_{n} g_{mn} {\text{sin}}\left( {\delta_{m} - \delta_{n} } \right) + V_{m} V_{n} b_{mn} {\text{cos}}\left( {\delta_{m} - \delta_{n} } \right)$$
(17)
$$P_{nm} = V_{n}^{2} g_{mn} - V_{m} V_{n} g_{mn} {\text{cos}}\left( {\delta_{m} - \delta_{n} } \right) + V_{m} V_{n} b_{mn} {\text{sin}}\left( {\delta_{m} - \delta_{n} } \right)$$
(18)
$$Q_{nm} = - V_{n}^{2} b_{mn} + V_{m} V_{n} g_{mn} {\text{sin}}\left( {\delta_{m} - \delta_{n} } \right) + V_{m} V_{n} b_{mn} {\text{cos}}\left( {\delta_{m} - \delta_{n} } \right)$$
(19)

where \(g_{mn} = \frac{{R_{mn} }}{{R^{2} + [\left( {1 - \tau } \right)X_{mn} ]^{2} }}\) and \(b_{mn} = - \frac{{\left( {1 - \tau } \right)X_{mn} }}{{R^{2} + [\left( {1 - \tau } \right)X_{mn} ]^{2} }}\). The voltages at buses \(m\) and \(n\) are \(V_{m}\) and \(V_{n}\), respectively, with phase angles \(\delta_{m}\) and \(\delta_{n}\). The conductance and susceptance of the line connecting buses \(m\) and \(n\) are denoted by \(g_{mn}\) and \(b_{mn}\), respectively.

TCPS model

The TCPS model, inserted between the line connecting buses \(m\) and \(n\), is shown in Fig. 4. If \({\Phi }\) is the phase shift angle introduced by the TCPS, the power flow equations of the line are given by52,53 in Eq. (2027):

$$P_{mn} = \frac{{V_{m}^{2} G_{mn} }}{{\cos^{2} \Phi }} - \frac{{V_{m} V_{n} }}{\cos \Phi }\left[ {g_{mn} \cos \left( {\delta_{m} - \delta_{n} + \Phi } \right) + b_{mn} \sin \left( {\delta_{m} - \delta_{n} + \Phi } \right)} \right]$$
(20)
$$Q_{mn} = - \frac{{V_{m}^{2} B_{mn} }}{{\cos^{2} \Phi }} - \frac{{V_{m} V_{n} }}{\cos \Phi }\left[ {g_{mn} \sin \left( {\delta_{m} - \delta_{n} + \Phi } \right) - b_{mn} \cos \left( {\delta_{m} - \delta_{n} + \Phi } \right)} \right]$$
(21)
$$P_{nm} = V_{n}^{2} G_{mn} - \frac{{V_{m} V_{n} }}{\cos \Phi }\left[ {g_{mn} \cos \left( {\delta_{m} - \delta_{n} + \Phi } \right) - b_{mn} \sin \left( {\delta_{m} - \delta_{n} + \Phi } \right)} \right]$$
(22)
$$Q_{nm} = - V_{n}^{2} B_{mn} + \frac{{V_{m} V_{n} }}{\cos \Phi }\left[ {g_{mn} \sin \left( {\delta_{m} - \delta_{n} + \Phi } \right) - b_{mn} \cos \left( {\delta_{m} - \delta_{n} + \Phi } \right)} \right]$$
(23)
Fig. 4
figure 4

Model of TCPS.

The real and reactive power injected by the TCPS at bus \(m\) and bus \(n\) are:

$$P_{ms} = - G_{mn} V_{m}^{2} \tan^{2} \Phi - V_{m} V_{n} \tan \phi \left[ {g_{mn} \sin \left( {\delta_{m} - \delta_{n} } \right)} \right.\left. { - b_{mn} \cos \left( {\delta_{m} - \delta_{n} } \right)} \right]$$
(24)
$$Q_{ms} = B_{mn} V_{m}^{2} \tan^{2} \Phi + V_{m} V_{n} \tan \phi \left[ {g_{mn} \cos \left( {\delta_{m} - \delta_{n} } \right)} \right.\left. { + b_{mn} \sin \left( {\delta_{m} - \delta_{n} } \right)} \right]$$
(25)
$$P_{ns} = - V_{m} V_{n} \tan \Phi \left[ {G_{mn} \sin \left( {\delta_{m} - \delta_{n} } \right) + B_{mn} \cos \left( {\delta_{m} - \delta_{n} } \right)} \right]$$
(26)
$$Q_{ns} = - V_{m} V_{n} \tan \Phi \left[ {G_{mn} \cos \left( {\delta_{m} - \delta_{n} } \right) - B_{mn} \sin \left( {\delta_{m} - \delta_{n} } \right)} \right]$$
(27)

SVC model

Figure 5a and b present the basic circuit structure and the model of the SVC, respectively. It consists of a fixed capacitor \(\left( {X_{C} = 1/\omega C} \right)\) and a thyristor-controlled reactor \(\left( {X_{L} = \omega L} \right)\). The reactance is controlled by adjusting the thyristor firing angle \(\left( \gamma \right)\).

Fig. 5
figure 5

(a) Basic structure of SVC (b) Model of SVC.

The equivalent susceptance is calculated as51 Eq. (2829):

$$B_{{{\text{SVC}}}} = B_{C} + B_{L} \left( \gamma \right)$$
(28)
$${\text{where}}\;B_{C} = \omega C\;{\text{and}}\;B_{L} \left( \gamma \right) = \frac{1}{\omega L}\left( {1 - \frac{2\gamma }{\pi } - \frac{{{\text{sin}}2\gamma }}{\pi }} \right)$$
(29)

In the framework of power flow, reactive power provided by SVC can be expressed as Eq. (30):

$$Q_{{{\text{SVC}}}} = - V_{m}^{2} \cdot B_{{{\text{SVC}}}} .$$
(30)

The SVC is used for both inductive and capacitive compensation, modeled as a device for injecting reactive power into the connected bus.

Optimal power flow objectives and constraints

In the modified IEEE 30-bus system, two thermal generators located at buses 5 and 11 are replaced with wind power generators. Additionally, two units each of the FACTS devices—TCSC, TCPS, and SVC—are installed at optimal locations. The optimization objectives for the modified system are outlined below.

Total generation cost

The total generation cost, incorporating both thermal and wind power plants, as Eq. (31):

$$C_{{{\text{gen}}}} = \mathop \sum \limits_{i = 1}^{{N_{TG} }} C_{Ti} \left( {P_{TGi} } \right) + \mathop \sum \limits_{k = 1}^{{N_{WG} }} \left[ {C_{wj} \left( {P_{wsj} } \right) + C_{Rwj} \left( {P_{wsj} - P_{wavj} } \right) + C_{Pwj} \left( {P_{wavj} - P_{wsj} } \right)} \right]$$
(31)

where \(N_{TG}\) is the number of thermal units and \(N_{WG}\) is the number of wind power generators.

Active power loss

The real power loss in the transmission system as Eq. (32):

$$P_{{\text{loss }}} = \mathop \sum \limits_{q = 1}^{nl} G_{{q\left( {mn} \right)}} \left[ {V_{m} ^{2} + V_{n} ^{2} - 2V_{m} V_{n} {\text{cos}}\left( {\delta_{mn} } \right)} \right]$$
(32)

where \(G_{{q\left( {mn} \right)}}\) is the line conductance, and \(\delta_{m} n = \delta_{m} - \delta_{n}\) is the phase angle difference.

Total gross cost (TGC) including non-conventional energy resource

The total gross cost, considering active power losses, as Eq. (33):

$$C_{Gross} = C_{{\text{gen }}} + P_{{\text{LOSS }}} \times 10,000 \times 0.10$$
(33)

Voltage deviation

To minimize voltage deviations at PQ buses, the objective as Eq. (34):

$$Vdev = \mathop \sum \limits_{i = 1}^{NL} \left| {v_{i} - 1.0} \right|$$
(34)

where \(v_{i}\) is the voltage at the \(i{\text{th}}\) bus.

Equality constraints

The power balance equations serve as the equality constraints for the base system configuration (without FACTS devices) and are written as54 Eq. (3536):

$$P_{Gm} - P_{Dm} - V_{m} \mathop \sum \limits_{n = 1}^{NB} V_{n} Y_{mn} \cos \left( {\theta_{mn} + \delta_{m} - \delta_{n} } \right) = 0\quad \forall m \in NB$$
(35)
$$Q_{Gm} - Q_{Dm} - V_{m} \mathop \sum \limits_{n = 1}^{NB} V_{n} Y_{mn} \sin \left( {\theta_{mn} + \delta_{m} - \delta_{n} } \right) = 0\quad \forall m \in NB$$
(36)

Here, \(NB\) refers to the number of buses. When FACTS devices are introduced, the power balance equations are modified as follows as Eq. (3738):

$$P_{Gm} + P_{ms} - P_{Dm} - V_{m} \mathop \sum \limits_{n = 1}^{NB} V_{n} Y_{mn} \cos \left( {\theta_{mn} + \delta_{m} - \delta_{n} } \right) = 0\quad \forall m \in NB$$
(37)
$$Q_{Gm} + Q_{ms} + Q_{{{\text{SVC}}m}} - Q_{Dm} - V_{m} \mathop \sum \limits_{n = 1}^{NB} V_{n} Y_{mn} \sin \left( {\theta_{mn} + \delta_{m} - \delta_{n} } \right) = 0\quad \forall m \in NB$$
(38)

In these equations, \(P_{ms}\) and \(Q_{ms}\) represent the active and reactive power injected by the TCPS at bus \(m\), while \(Q_{SVCm}\) represents the reactive power injected by the SVC at bus \(m\). Note that the SVC does not inject active power.

Inequality constraints

The inequality constraints for the OPF problem are as follows in Eq. (3947):

Generator constraints:

$$P_{Gi}^{{{\text{min}}}} \le P_{Gi} \le P_{Gi}^{{{\text{max}}}} { }\forall i \in NG$$
(39)
$$Q_{Gi}^{{{\text{min}}}} \le Q_{Gi} \le Q_{Gi}^{{{\text{max}}}} { }\forall i \in NG$$
(40)
$$V_{Gi}^{{{\text{min}}}} \le V_{Gi} \le V_{Gi}^{{{\text{max}}}} { }\forall i \in NG$$
(41)

Security constraints:

$$V_{Lp}^{{{\text{min}}}} \le V_{Lp} \le V_{Lp}^{{{\text{max}}}} { }\forall p \in NL$$
(42)
$$S_{lq} \le S_{lq}^{{{\text{max}}}} { }\forall q \in nl$$
(43)

Transformer constraints:

$$T_{t}^{{{\text{min}}}} \le T_{t} \le T_{t}^{{{\text{max}}}} { }\forall t \in NT$$
(44)
$${\text{TCSC}}:\tau_{TCSCm}^{{{\text{min}}}} \le \tau_{TCSCm} \le \tau_{TCSCm}^{{{\text{max}}}} \quad \forall m \in N_{{\text{TCSC }}}$$
(45)
$${\text{TCPS}}:\Phi_{{{\text{TCSC}}n}}^{\min } \le \Phi_{{{\text{TCSC}}n}} \le \Phi_{{{\text{TCSC}}n}}^{\max } \forall n \in N_{{{\text{TCSC}}}}$$
(46)
$${\text{SVC}}:Q_{{{\text{SVC}}j}}^{{{\text{min}}}} \le Q_{{{\text{SVC}}_{j} }} \le Q_{{{\text{SVC}}j}}^{{{\text{max}}}} \quad \forall j \in N_{{{\text{SVC}}}}$$
(47)

the FACTS limits are described by Eqs. (39) to Eqs. (47). \(N_{{{\text{TCSC}}}}\), \(N_{{{\text{TCPS}}}}\), and \(N_{{{\text{SVC}}}}\) denote the number of TCSC, TCPS, and SVC devices, respectively, in the network.

Problem formulation

The OMGSCA algorithm is utilized to solve the Optimal Power Flow (OPF) problem, focusing on minimizing generation cost, power loss, and total gross cost under both fixed (Cases 1, 2, and 3) and uncertain load conditions (Cases 4–7). OMGSCA optimizes crucial variables such as generator outputs, bus voltage levels, transformer tap settings, and the placement of Flexible AC Transmission System (FACTS) devices, ensuring enhanced power system performance across varying scenarios.

Fixed loading condition cases

Under fixed loading conditions, the network operates at 100% load. The objective is to minimize generation cost (Case 1), minimize real power loss (Case 2), or minimize both objectives simultaneously (Case 3).

Load demand uncertainties cases

In uncertainty scenarios, the load demand is modeled using a normal PDF with mean \(\mu_{d} = 70\) and standard deviation \(\sigma_{d} = 10\). The uncertainty is incorporated as follows55 as Eq. (4849):

$$A_{{\text{sc,if}}} = \mathop \smallint \limits_{{P_{{\text{d,low}}} }}^{{P_{{\text{d,high}}} }} \frac{1}{{\sigma_{d} \sqrt {2\pi } }}\exp \left[ { - \frac{{(P_{d} - \mu_{d} )^{2} }}{{2\sigma_{d}^{2} }}} \right]dP_{d}$$
(48)
$$P_{{\text{d,i}}} = \frac{1}{{A_{{\text{sc,if}}} }}\mathop \smallint \limits_{{P_{{\text{d,low}}} }}^{{P_{{\text{d,high}}} }} P_{d} \times \frac{1}{{\sigma_{d} \sqrt {2\pi } }}\exp \left[ { - \frac{{(P_{d} - \mu_{d} )^{2} }}{{2\sigma_{d}^{2} }}} \right]dP_{d}$$
(49)

The calculated means and probabilities for all scenarios of loading are provided in Table 3. In a scenario, the power scheduled from all generators is optimized in each scenario.

Table 3 Loading scenarios and their probabilities.

The algorithm optimizes the placement of FACTS devices, but their locations remain fixed across different loading scenarios. FACTS devices are placed optimally for the most probable scenario, which is load level 3. These locations are retained for other scenarios, while the device ratings are optimized for each specific scenario.

The expected gross cost (EGRC) over all scenarios is calculated using the following Eq. (50):

$${\text{EGRC}} = \mathop \sum \limits_{sc = 1}^{{N_{{{\text{sc}}}} }} A_{{{\text{sc}}}} \times C_{{\text{gross,sc}}}$$
(50)

where \({N}_{sc}\) is the total number of scenarios, and \({A}_{sc}\) is the probability of each scenario, as calculated in Table 3. Similarly, the expected generation cost (EGC) and expected power loss (EPL) are determined by56 Eq. (5152):

$${\text{EGC}} = \mathop \sum \limits_{sc = 1}^{{N_{{{\text{sc}}}} }} A_{{{\text{sc}}}} \times C_{{\text{gen,sc}}}$$
(51)
$${\text{EPL}} = \mathop \sum \limits_{sc = 1}^{{N_{{{\text{sc}}}} }} A_{{{\text{sc}}}} \times P_{{\text{loss,sc}}}$$
(52)

The summary of different Cases is listed in Table 4. The Load uncertainty is illustrated in Fig. 6.

Table 4 Summary of case studies.
Fig. 6
figure 6

Normal distribution representation of load uncertainty with mean \(\mu_{d} = 70\), std. dev. \(\sigma_{d} = 10\).

The proposed algorithm

The Sine Cosine Algorithm (SCA) is a meta-heuristic optimization method that leverages the sine and cosine functions’ mathematical properties39. SCA is valued for its simple structure, minimal parameters, and ease of implementation. Its functioning involves both exploration and exploitation phases, outlined as follows. Random numbers \(r_{2}\) to \(r_{4}\) follow a uniform distribution where \(r_{2} \in \left[ {0,2\pi } \right]\), \(r_{3} \in \left[ {0,2} \right]\), and \(r_{4} \in \left[ {0,1} \right]\).

Parameter initialization Four random numbers \(r_{1}\) to \(r_{4}\) are initialized. The control parameter \(r_{1}\), which decreases linearly from 2 to 0, adjusts the amplitude of the sine and cosine functions. The update expressions for \(r_{1}\) to \(r_{4}\) are as shown in Eqs. (53)-(56).

$$\begin{array}{*{20}c} {r_{1} = 2 \cdot \left( {1 - \frac{{{\text{FEs}}}}{{{\text{MaxFEs}}}}} \right)} \\ \end{array}$$
(53)
$$\begin{array}{*{20}c} {r_{2} = 2\pi \cdot {\text{rand}}} \\ \end{array}$$
(54)
$$\begin{array}{*{20}c} {r_{3} = 2 \cdot {\text{rand}}} \\ \end{array}$$
(55)
$$\begin{array}{*{20}c} {r_{4} = {\text{rand}}} \\ \end{array}$$
(56)

Here, FEs is the current count of fitness function evaluations, and MaxFEs is the maximum count allowed.

Population initialization Define the upper and lower search boundaries as \(ub\) and \(lb\), respectively. Randomly generate \(N\) agents within the defined boundaries.

Agent update \(r_{1}\) to \(r_{4}\) modulate the distance from the optimal solution, the search pattern, and step size. The update rule, incorporating sine and cosine functions, is presented in Eq. (57).

$$\begin{array}{*{20}c} {X_{{\left( {i,j} \right)}}^{{\left( {t + 1} \right)}} = \left\{ {\begin{array}{*{20}l} {X_{{\left( {i,j} \right)}}^{t} - r_{1} \cdot {\text{sin}}\left( {r_{2} } \right) \cdot \left| {r_{3} \cdot X_{{{\text{best}},j}}^{t} - X_{{\left( {i,j} \right)}}^{t} } \right|,} \hfill & {r_{4} < 0.5} \hfill \\ {X_{{\left( {i,j} \right)}}^{t} - r_{1} \cdot {\text{cos}}\left( {r_{2} } \right) \cdot \left| {r_{3} \cdot X_{{{\text{best}},j}}^{t} - X_{{\left( {i,j} \right)}}^{t} } \right|,} \hfill & {r_{4} \ge 0.5} \hfill \\ \end{array} } \right.} \\ \end{array}$$
(57)

Here, \(X_{{\left( {i,j} \right)}}^{t}\) is the \(j\)-th component of the \(i\)-th agent at iteration \(t\), and \(X_{{{\text{best}},j}}^{t}\) represents the best position component in the \(j\)-th dimension. Greedy selection ensures that only the best positions are retained.

The pseudo-code of the SCA algorithm is shown in Algorithm 1.

Algorithm 1
figure a

Pseudo-code of SCA

Proposed ARSCA

SCA is a powerful optimization algorithm, increasing complexity in optimization tasks often challenges its accuracy and tendency to fall into local minima57. The Adaptive and Robust Sine Cosine Algorithm (ARSCA) introduces mechanisms to address these limitations by enhancing global exploration and local exploitation.

Adaptive quadratic interpolation mechanism

Quadratic interpolation, effective in local exploitation, seeks minimal values of the objective function58. This paper introduces an Adaptive Quadratic Interpolation Mechanism (AQIM) within ARSCA to boost local search. AQIM updates agents per Eqs. (58)–(62).

$$X_{i} = \left\{ {\begin{array}{*{20}l} {Y_{i} ,\;{\text{rand}} \le p_{t} } \hfill \\ {Z_{i} ,\;{\text{rand}} > p_{t} } \hfill \\ \end{array} } \right.$$
(58)
$$Y_{i,j} = \frac{{\left( {X_{i,j}^{t2} - X_{{{\text{mean}},j}}^{t2} } \right) \times {\text{fit}}_{{{\text{best}}}} + \left( {X_{{{\text{mean}},j}}^{t2} - X_{{{\text{best}},j}}^{t2} } \right) \times {\text{fit}}_{i} + \left( {X_{{{\text{best}},j}}^{t2} - X_{i,j}^{t2} } \right) \times {\text{fit}}_{{{\text{mean}}}} }}{{2\left( {\left( {X_{i,j}^{t} - X_{{{\text{mean}},j}}^{t} } \right) \times {\text{fit}}_{{{\text{best}}}} + \left( {X_{{{\text{mean}},j}}^{t} - X_{{{\text{best}},j}}^{t} } \right) \times {\text{fit}}_{i} + \left( {X_{{{\text{best}},j}}^{t} - X_{i,j}^{t} } \right) \times {\text{fit}}_{{{\text{mean}}}} } \right)}}$$
(59)
$$Z_{i,j} = \frac{{\left( {X_{i,j}^{t2} - X_{k1,j}^{t2} } \right) \times fit_{k2} + \left( {X_{k1,j}^{t2} - X_{k2,j}^{t2} } \right) \times fit_{i} + \left( {X_{k2,j}^{t2} - X_{i,j}^{t2} } \right) \times fit_{k1} }}{{2\left( {\left( {X_{i,j}^{t} - X_{k1,j}^{t} } \right) \times fit_{k2} + \left( {X_{k1,j}^{t} - X_{k2,j}^{t} } \right) \times fit_{i} + \left( {X_{k2,j}^{t} - X_{i,j}^{t} } \right) \times fit_{k1} } \right)}}$$
(60)

where \(p_{t}\) is set to 0.4. \(k_{1}\) and \(k_{2}\) are adaptive random numbers generated in the population of \(\left[ {1,N_{ada} } \right]\) according to Eqs. (61)–(62).

$$N_{ada} \in \left[ {1,N \times \omega } \right]$$
(61)
$$\omega = \omega_{a} - \frac{{\left( {\omega_{a} - \omega_{b} } \right) \times FEs}}{MaxFEs}$$
(62)

where \(\omega_{a} = 0.7,\omega_{b} = 0.2\).

Algorithm 2
figure b

Pseudo-code of AQIM

Rounding mechanism

The Rounding Mechanism (RM), inspired by59, reinforces ARSCA ability to balance exploration and exploitation. RM operates in two stages:

Stage 1 In the first iteration, agents update their positions based on Eq. (63), factoring in the best and mean agent positions. Random values \({r}_{5}\) through \({r}_{9}\) determine search dynamics.

$$\begin{array}{*{20}c} {X_{{\left( {i,j} \right)}}^{{\left( {t + 1} \right)}} = \left\{ {\begin{array}{*{20}l} {X_{{{\text{rand}},j}}^{t} - r_{5} \left| {X_{{{\text{rand}},j}}^{t} - 2r_{6} X_{{\left( {i,j} \right)}}^{t} } \right|,} \hfill & {r_{9} > 0.5} \hfill \\ {\left( {X_{{{\text{best}},j}}^{t} - X_{{{\text{mean}},j}}^{t} } \right) - r_{7} \left( {r_{8} \left( {ub - lb} \right) + lb} \right),} \hfill & {r_{9} \le 0.5} \hfill \\ \end{array} } \right.} \\ \end{array}$$
(63)

Stage 2 For iterations \(t > 1\), agents update based on Eqs. (64)–(66), with the temporary position \(X_{{{\text{temp}},i}}\) further refined in Eqs. (67)–(68). When \(> 0r_{9} .5\), the search agent searches based on the positions of other search agents in the population. When \(r_{9} \le 0.5\), the search agent searches according to the current optimal individual and the position of the population. This ensures the diversity of the population at the time of the first-iteration.

$$X_{{{\text{temp }} - i,j}} = \left\{ {\begin{array}{*{20}l} {\left( {X_{{{\text{best }}tj}}^{t} - X_{i,j}^{t} } \right) - E\left| {JX_{{{\text{best }},j}}^{t} - X_{i,j}^{t} } \right|,r_{10} \ge 0.5} \hfill \\ {X_{{{\text{best }},j}}^{t} - E\left| {JX_{{{\text{best }},j}}^{t} - X_{i,j}^{t} } \right|,r_{10} < 0.5} \hfill \\ \end{array} } \right.$$
(64)
$$E = \left( {1 - \frac{FEs}{{MaxFEs}}} \right) \times \left( {2 \times {\text{rand}}\left( {0,1} \right) - 1} \right)$$
(65)
$$J = 2\left( {1 - {\text{rand}}\left( {0,1} \right)} \right)$$
(66)

where \(r_{10} ,r_{11}\) are random numbers between 0 and 1. \(X_{{{\text{temp\_i }}}}\) is generated by \(X_{i}\) and \(X_{{\text{best }}}\). During the optimization process \(\left| E \right|\) decreases from 1 to 0. After obtaining \(X_{{\text{temp }}}\) by Eq. (13), \(X_{{{\text{temp\_ }}i}}\) is updated according to Eqs. (67)–(68) to allow the algorithm to be further developed.

$$X_{i,j}^{t + 1} = \left\{ {\begin{array}{*{20}l} {X_{best,j}^{t} - E\left| {JX_{best,j}^{t} - X_{{temp_{i} ,j}} } \right| + r_{11} \times LF,r_{10} \left\langle {0.5andfit_{i} } \right\rangle fit_{{temp_{i} }} } \hfill \\ {X_{{temp_{i} ,j}} ,otherwise} \hfill \\ \end{array} } \right.$$
(67)
$$LF = \frac{u \times \sigma }{{|v|^{{\frac{1}{\beta }}} }},\sigma = \left( {\frac{{{\Gamma }\left( {1 + \beta } \right) \times \sin \left( {\frac{\pi \beta }{2}} \right)}}{{\left. {{\Gamma }\left( {\frac{1 + \beta }{2}} \right) \times \beta \times 2^{{\frac{\beta - 1}{2}}} } \right)}}} \right)^{{\frac{1}{\beta }}}$$
(68)

where fit \(_{{{\text{temp }}_{ - } i}}\) and fit \(_{i}\) are the fitness values of \(X_{{{\text{temp }} - i}}\) and \(X_{i}\), respectively. \(LF\) denotes the Levy mutation function. Here, \(u,v\) denote random numbers between 0 and 1 , and \(\beta\) is here a constant of value 1.5 .

The pseudo-code of RM is shown in Algorithm 3.

Algorithm 3
figure c

Pseudo-code of RM

The proposed ARSCA

The proposed ARSCA structure integrates these two mechanisms, significantly improving convergence accuracy and avoiding local optima. The following steps outline ARSCA workflow shown in Fig. 7:

  • Initialize parameters Set \({\text{MaxFEs}},{\text{FEs}},N,{\text{dim}},lb,ub,p_{t} ,\omega_{a}\), and \(\omega_{b}\).

  • Generate initial population Randomly initialize agents within the dimensional boundaries.

  • Parameter update Update random parameters as per Eqs. (53)–(56).

  • Update agent positions Calculate new agent positions based on Eq. (57) and assess fitness.

  • Local update Compute \(Y_{i}\) and \(Z_{i}\) per Eqs. (59)–(62).

  • Selection process Employ greedy selection to retain optimal agents.

Fig. 7
figure 7

Flowchart of ARSCA.

The ARSCA time complexity is analyzed based on MaxFEs, dimensionality (dim), and population size (N). The maximum iteration count is \(T = \frac{{{\text{MaxFEs}}}}{3N}\), yielding a time complexity of: \(O\left( {{\text{ARSCA}}} \right) = O\left( {N \cdot {\text{dim}}} \right) + O\left( {T \cdot \left( {3N \cdot {\text{dim}} + 3N} \right)} \right)\).

Result analysis

This study finds that the Adaptive Randomized Sine Cosine Algorithm (ARSCA) is effective in solving the Optimal Power Flow (OPF) problem in the IEEE-30 bus test system with key FACTS devices like TCSC, TCPS and SVC shown in Fig. 8. An enhanced adaptation of the Sine Cosine Algorithm (SCA), called ARSCA, combines randomized optimization and opposition based learning to strike a balance between exploration and exploitation. The balance leads to faster convergence and more accurate OPF solutions even under complex operating conditions. Comparisons across fixed and dynamic loading case studies demonstrate that ARSCA outperforms other prominent algorithms, such as SCA, IGWO, WOA, SCADE, and OBSCA, in terms of minimizing generation costs, minimizing active power losses, and minimizing gross costs. Additionally, the integration of FACTS devices improves system stability by optimizing voltage profiles and increasing grid resilience for all load scenarios, which are important challenges in the OPF framework. ARSCA is used in both fixed and dynamically loaded conditions to demonstrate its ability to adjust to changing system requirements, so that the OPF objectives of cost efficiency and system stability are achieved. These results suggest that ARSCA is a very effective power flow optimization tool, especially in networks with advanced FACTS technology to enhance operational efficiency and reliability.

Fig. 8
figure 8

Flowchart for optimal placement of FACTS devices.

The computational platform used for this work was an Intel Core i7 processor with 3.0 GHz clock speed, 32 GB of RAM, and a 64 bit Windows 10 operating system. These specifications allowed for enough computational power to run high dimensional simulations and achieve timely convergence. Details of the tuning of hyperparameters like the population size (N = 50) and maximum function evaluations (MaxFEs = 10,000) are provided. The experimental framework was the IEEE 30-bus test system. The modifications included the integration of renewable wind energy sources and the use of Flexible AC Transmission System (FACTS) devices, such as Thyristor-Controlled Series Capacitors (TCSC), Thyristor-Controlled Phase Shifters (TCPS) and Static VAR Compensators (SVC). Load uncertainties were modeled as a normal probability density function (PDF) with a mean (μd = 70) and standard deviation (σd = 10) for dynamic loading scenarios. The calculation of scenario probabilities and their impact on system conditions is explained. Results were benchmarked for comparative analysis against Sine Cosine Algorithm (SCA), Improved Grey Wolf Optimization (IGWO), Whale Optimization Algorithm (WOA), Sine Cosine Algorithm Differential Evolution (SCADE), and Opposition-Based Sine Cosine Algorithm (OBSCA). The Friedman Rank Test (FRT) was used to validate performance consistency by comparing rankings of algorithms across multiple metrics. The gross cost, power loss reduction, and runtime efficiency of the ARSCA were demonstrated to be at the top of the pack. Algorithm stability and convergence trends were visually confirmed using box plots and convergence curves. For better interpretation, these plots have been included in the results section.

Case 1: generation cost minimization

In this generation cost minimization case (Case 1), the Adaptive Randomized Sine Cosine Algorithm (ARSCA) shows enhanced performance over other advanced algorithms, including SCA, IGWO, WOA, SCADE, and OBSCA. ARSCA capability in reducing generation cost is evident through its results across various performance metrics, establishing it as a strong candidate for cost-sensitive power system operations. The minimum generation cost \(C_{{\text{gen,min}}}\) achieved by ARSCA is \(807.1704{\text{ \$ /h}}\), which is slightly lower than OBSCA \(807.3032{\text{ \$ /h}}\) and significantly below WOA \(810.5816{\text{ \$ /h}}\). This emphasizes ARSCA effectiveness in sustaining low generation costs under diverse loading conditions. Further, the mean generation cost \(C_{{\text{gen,mean}}}\) for ARSCA stands at \(807.2043{\text{ \$ /h}}\), marking it as the lowest among all algorithms, which underscores ARSCA consistency in minimizing costs over repeated simulations. Regarding power loss \(P_{{{\text{loss}}}}\), ARSCA records \(5.6206{\text{ MW}}\), closely competing with IGWO (5.6394 MW) while outperforming WOA, which yields the highest loss at \(6.305{\text{ MW}}\)—an improvement of approximately 10.9% over WOA. This demonstrates ARSCA proficiency in reducing power losses, thereby enhancing system efficiency under cost-sensitive conditions. In terms of gross generation cost \(C_{{{\text{gross}}}}\), ARSCA achieves \(1369.37{\text{ \$ /h}}\), slightly surpassing IGWO (1371.3824 $/h) by about 0.15%, and significantly below WOA (1441.2169 $/h) by nearly 5.0%. This result highlights ARSCA strength in achieving near-optimal cost minimization, essential for effective power system optimization. ARSCA also demonstrates efficient voltage control, with a voltage deviation \(VD\) of \(0.8156{\text{ p}}{\text{.u}}{.}\), which is competitive in maintaining voltage stability across varied conditions, though IGWO records a lower deviation of \(0.8315{\text{ p}}{\text{.u}}{. }\) Moreover, ARSCA runtime efficiency is evident with a computation time of \(158.6182\;{\text{s}}\), making it the quickest among the algorithms tested, further reinforcing its practicality for real-time power system applications. ARSCA Friedman Rank Test (FRT) score of 1, the lowest in this comparison, further signifies its reliability, outperforming IGWO (6) and SCADE (5), indicating ARSCA consistency across multiple criteria. Overall, ARSCA performance in Case 1, as illustrated in Table 5 and depicted in Fig. 9, highlights its robust ability to minimize generation costs effectively, reduce power losses, and ensure voltage stability in a cost-efficient manner.

Table 5 Optimized control parameters with all algorithms in Case 1.
Fig. 9
figure 9

ARSCA and other algorithm performance for Case 1: (a) Convergence curve, (b) Box plot, and (c) Voltage profile of the modified system.

Case 2: active power loss minimization

In Case 2, the objective is to minimize active power loss within the Optimal Power Flow (OPF) framework, with a focus on evaluating the Adaptive Randomized Sine Cosine Algorithm (ARSCA) against other advanced algorithms, including SCA, IGWO, WOA, SCADE, and OBSCA. Table 6 presents the comparative performance of these algorithms. ARSCA achieves the lowest minimum active power loss \({P}_{\text{loss,min}}\) at \(1.7655 {\text{MW}}\), outperforming OBSCA (\(1.7800 {\text{MW}}\)) and SCA (\(1.7932 {\text{MW}}\)) by approximately 0.82% and 1.54%, respectively. This result emphasizes ARSCA effectiveness in minimizing power losses, thereby enhancing the overall energy efficiency within the grid system. For generation cost \({C}_{\text{gen}}\), ARSCA records \(939.1434 \text{\$/h}\), which, while marginally higher than IGWO lowest generation cost of \(926.2195 \text{\$/h}\), demonstrates ARSCA balanced approach to cost efficiency and power loss reduction. The gross cost \({C}_{\text{gross}}\) for ARSCA is \(1118.0398 \text{\$/h}\), which is slightly higher than OBSCA \(1112.8541 \text{\$/h}\) by about 0.47% but significantly better than the values achieved by SCADE and IGWO, highlighting ARSCA capability in keeping operational costs low while optimizing power flow. In terms of voltage deviation \(VD\), ARSCA achieves a value of \(0.834 \text{p.u.}\). Although SCADE achieves the lowest \(VD\) at \(0.4561 \text{p.u.}\), ARSCA result represents a balance between voltage control and minimized power losses. ARSCA also maintains a consistent mean power loss \({P}_{\text{loss,mean}}\) of \(1.8174 {\text{MW}}\), outperforming IGWO (\(2.2208 {\text{MW}}\)) and SCADE (\(2.3421 {\text{MW}}\)), confirming ARSCA robustness in sustaining low power loss across variable load scenarios. Additionally,

Table 6 Optimized control parameters with all algorithms in Case 2.

ARSCA demonstrates competitive runtime efficiency, recording \(164.8774 {\text{seconds}}\), closely aligning with the other algorithms while maintaining superior performance in power loss reduction and cost metrics. ARSCA Friedman Rank Test (FRT) score of 2.5, among the best scores, further reflects its consistency and top performance across multiple criteria, outperforming algorithms like SCADE (FRT = 9) and IGWO (FRT = 8). Overall, ARSCA demonstrates strong capabilities in minimizing power loss while achieving balanced cost efficiency and voltage stability, as illustrated in Table 6, with further details shown in Fig. 10.

Fig. 10
figure 10

ARSCA and other algorithm performance for Case 2: (a) Convergence curve, (b) Box plot, and (c) Voltage profile of the modified system.

Case 3: gross cost minimization

In Case 3, the focus is on minimizing the gross cost \({C}_{\text{gross,min}}\) within the Optimal Power Flow (OPF) framework using the Adaptive Randomized Sine Cosine Algorithm (ARSCA). The results, shown in Table 7, highlight ARSCA capability to achieve a competitive gross cost of \(1118.0398 \text{\$/h}\), outperforming WOA (\(1117.9187 \text{\$/h}\)) and OBSCA (\(1112.8541 \text{\$/h}\)), underscoring its efficiency in achieving cost reduction under complex operational constraints. This result places ARSCA close to OBSCA minimum gross cost, indicating its ability to perform cost-effectively across variable system conditions. When examining generation cost \({C}_{\text{gen}}\), ARSCA achieves a value of \(939.1434 \text{\$/h}\), slightly higher than IGWO lowest cost of \(926.2195 \text{\$/h}\) but within an acceptable range for optimal balance between gross and generation cost. This result indicates ARSCA strength in optimizing both costs effectively. In terms of power loss minimization \({P}_{\text{loss,min}}\), ARSCA records \(1.7655 {\text{MW}}\), the lowest among the algorithms, outperforming OBSCA and SCA, with values of \(1.7800 {\text{MW}}\) and \(1.7932 {\text{MW}}\) respectively, demonstrating ARSCA proficiency in minimizing power loss while maintaining an efficient overall cost structure. For mean gross cost \({C}_{\text{gross,mean}}\), ARSCA achieves \(1118.0398 \text{\$/h}\), displaying strong consistency across different loading conditions. This consistency reinforces ARSCA reliability in providing cost-effective solutions for the OPF problem. Furthermore, ARSCA achieves a mean power loss \({P}_{\text{loss,mean}}\) of \(1.8174 {\text{MW}}\), which is lower than IGWO (\(2.2208 {\text{MW}}\)) and SCADE (\(2.3421 {\text{MW}}\)), confirming ARSCA consistent performance in maintaining low power loss across varying scenarios.

Table 7 Optimized control parameters with all algorithms in Case 3.

With regard to computational efficiency, ARSCA achieves a runtime of \(164.8774 {\text{seconds}}\), which, while slightly higher than SCADE \(161.7648 {\text{seconds}}\), remains competitive and efficient for large-scale optimization scenarios. This runtime reflects ARSCA capability to balance between computation time and optimization performance. The Friedman Rank Test (FRT) score of 2.5 for ARSCA, among the best in this comparison, underscores its superior ranking across multiple parameters, outperforming IGWO (FRT = 8) and SCADE (FRT = 9), showcasing ARSCA robustness and consistency in OPF solutions. In summary, ARSCA excels in gross cost and power loss minimization, maintaining a balanced performance across other critical parameters such as generation cost and runtime. Despite slight variations in generation costs with other algorithms, ARSCA results make it a strong candidate for efficient, real-world OPF applications, as evidenced in Table 7 and illustrated further in Fig. 11.

Fig. 11
figure 11

ARSCA and other algorithm performance for Case 3: (a) Convergence curve, (b) Box plot, and (c) Voltage profile of the modified system.

Case 4: gross cost minimization for Scenario-1

In this analysis, the Adaptive Randomized Sine Cosine Algorithm (ARSCA) was employed to optimize the balance between generation cost and power loss, with a primary focus on minimizing the gross cost \({C}_{\text{gross,min}}.\) As shown in Table 8, ARSCA achieves the lowest minimum gross cost of \(515.2611 \text{\$/h}\), outperforming other algorithms, including IGWO (\(523.5423 \text{\$/h}\)), WOA (\(520.5077 \text{\$/h}\)), and SCADE (\(545.0484 \text{\$/h}\)). This result highlights ARSCA capability in reducing overall system costs effectively by a margin of approximately 1.58% over IGWO and 5.46% over SCADE, illustrating ARSCA efficiency in cost optimization. In terms of minimizing generation cost \({C}_{\text{gen}}\), ARSCA records \(418.0389 \text{\$/h}\), the lowest value among all tested algorithms and marginally lower than SCA (\(418.1092 \text{\$/h}\)), reflecting ARSCA strong competitiveness in maintaining low generation expenses while achieving gross cost minimization. ARSCA also excels in minimizing power loss \({P}_{\text{loss}}\), achieving the lowest value at \(0.9768 {\text{MW}}\), which effectively surpasses IGWO (\(1.0311 {\text{MW}}\)) and SCADE (\(1.1606 {\text{MW}}\)) by approximately 5.26% and 15.82%, respectively. This significant reduction in power loss further emphasizes ARSCA efficiency in reducing system energy losses. For voltage deviation \(VD\), ARSCA records a value of \(0.6529 \text{p.u.}\). While this result is slightly higher than IGWO (\(0.3313 \text{p.u.}\)), it maintains a reasonable balance, prioritizing performance across other critical metrics such as cost and power loss reduction. The mean gross cost \({C}_{\text{gross,mean}}\) for ARSCA is \(516.6936 \text{\$/h}\), which is the lowest among the algorithms, surpassing IGWO (\(524.9580 \text{\$/h}\)) and SCADE (\(554.7906 \text{\$/h}\)) by approximately 1.57% and 6.86%, respectively. This consistency across varying conditions highlights ARSCA capability in cost-effective optimization.

Table 8 Optimized control parameters with all algorithms in Case 4.

ARSCA demonstrates efficient computational performance, with a runtime of \(971.9713 {\text{seconds}}\), which, while comparable to other algorithms, justifies the minor trade-off in time due to ARSCA superior optimization capabilities across cost and power loss metrics. In the Friedman Rank Test (FRT), ARSCA achieves a top score of 1.5, reflecting its robustness and reliability across performance metrics, outperforming algorithms like IGWO (FRT = 7.5) and SCADE (FRT = 9) by substantial margins. This FRT result reinforces ARSCA reliability in delivering optimal solutions across complex scenarios. The graphical analysis, including convergence trends and voltage profiles, further supports ARSCA efficacy, as illustrated in Fig. 12.

Fig. 12
figure 12

ARSCA and other algorithm performance for Case 4: (a) Convergence curve, (b) Box plot, and (c) Voltage profile of the modified system.

Case 5: gross cost minimization for Scenario-2

Table 9 presents the simulation results for Case 5 under dynamic loading conditions, comparing ARSCA with competing algorithms to minimize the gross cost \({C}_{\text{gross}}\). ARSCA achieved the lowest minimum gross cost \({C}_{\text{gross,min}}\) at \(627.6341 \text{\$/h}\), outperforming IGWO (\(646.5155 \text{\$/h}\)), SCADE (\(654.6627 \text{\$/h}\)), and OBSCA (\(628.0516 \text{\$/h}\)). This reduction in cost, approximately 1.43% over IGWO and 4.13% over SCADE, underscores ARSCA effectiveness in reducing total system expenses, particularly under dynamic conditions. In terms of generation cost \({C}_{\text{gen}}\), ARSCA achieves \(521.8322 \text{\$/h}\), closely matching SCA (\(521.2168 \text{\$/h}\)) and surpassing SCADE (\(523.4129 \text{\$/h}\)) by about 0.30%. While IGWO exhibits a slightly lower generation cost by 0.27%, ARSCA balanced performance across metrics confirms its overall cost-effectiveness. ARSCA performance in minimizing power loss \({P}_{\text{loss}}\) is also notable, achieving \(1.0688 {\text{MW}}\), which is the lowest among all algorithms evaluated, surpassing IGWO (\(1.1952 {\text{MW}}\)) and SCADE (\(1.3385 {\text{MW}}\)) by approximately 10.6% and 20.2%, respectively. This demonstrates ARSCA proficiency in maintaining low power loss while optimizing other key parameters. For voltage deviation \(VD\), ARSCA records a value of \(0.9968 \text{p.u.}\), which is higher than some algorithms, such as IGWO (\(0.6547 \text{p.u.}\)), but maintains competitiveness by delivering strong performance in cost and power loss reduction. This trade-off in VD is balanced by ARSCA efficiency in minimizing system expenses and enhancing energy efficiency. The mean gross cost \({C}_{\text{gross,mean}}\) achieved by ARSCA is \(628.5986 \text{\$/h}\), the second-lowest among all methods tested. This consistency outperforms IGWO (\(647.4602 \text{\$/h}\)) and SCADE (\(654.6853 \text{\$/h}\)) by 2.92% and 4.15%, respectively, highlighting ARSCA effectiveness in consistently reducing total system costs.

Table 9 Optimized control parameters with all algorithms in Case 5.

Regarding runtime, ARSCA achieves \(847.3206 {\text{seconds}}\), the lowest among all algorithms, surpassing IGWO (\(983.1712 {\text{seconds}}\)) and SCADE (\(899.0456 {\text{seconds}}\)), reinforcing ARSCA computational efficiency. ARSCA is highly practical for dynamic scenarios due to its superior cost and loss performance, coupled with its efficiency. ARSCA is ranked first, with a top rank of 2, in the Friedman Rank Test (FRT), demonstrating its robustness and reliability in all performance criteria, with a large margin over IGWO (FRT = 8) and SCADE (FRT = 9). This rank also demonstrates that ARSCA has been consistently effective in finding the best solutions under dynamic operational conditions. Convergence trends and voltage profiles in this scenario are further validated through graphical analyses, as shown in Fig. 13.

Fig. 13
figure 13

ARSCA and other algorithm performance for Case 5: (a) Convergence curve, (b) Box plot, and (c) Voltage profile of the modified system.

Case 6: gross cost minimization for Scenario-3

Table 10 presents the simulation results for Case 6 under dynamic loading conditions, showcasing ARSCA robust performance across various optimization metrics. ARSCA achieves a generation cost \({C}_{\text{gen}}\) of \(624.9496 \text{\$/h}\), which is among the lowest in the set, closely competing with IGWO (\(622.5092 \text{\$/h}\)) and outperforming algorithms such as WOA (\(625.404 \text{\$/h}\)) by approximately 0.07%, thereby maintaining cost-effectiveness across complex scenarios. In terms of power loss \({P}_{\text{loss}}\), ARSCA achieves the lowest recorded value at \(1.1741 {\text{MW}}\), demonstrating its capability to minimize energy losses. This power loss reduction surpasses IGWO (\(1.2749 {\text{MW}}\)) and SCADE (\(1.5939 {\text{MW}}\)) by approximately 7.91% and 26.31%, respectively, highlighting ARSCA efficiency in enhancing system performance through reduced losses. For voltage deviation \(VD\), ARSCA records \(0.9083 \text{p.u.}\). Although slightly higher than some algorithms like SCADE (\(0.2073 \text{p.u.}\)), ARSCA effectively balances voltage deviation with other key parameters, achieving significant cost and power loss minimization, which justifies the minor trade-off in voltage stability. ARSCA also excels in gross cost minimization, achieving the lowest minimum gross cost \({C}_{\text{gross,min}}\) at \(741.2070 \text{\$/h}\), outperforming IGWO (\(749.2609 \text{\$/h}\)) and SCADE (\(776.8734 \text{\$/h}\)) by 1.07% and 4.58%, respectively. This achievement underscores ARSCA effectiveness in optimizing overall costs within dynamic conditions. The mean gross cost \({C}_{\text{gross,mean}}\) for ARSCA is \(741.9803 \text{\$/h}\), again the lowest among the algorithms, with reductions of up to 4.94%, reinforcing ARSCA consistency in minimizing total system expenses.

Table 10 Optimized control parameters with all algorithms in Case 6.

The runtime for ARSCA is \(863.0211 {\text{seconds}}\), which, while slightly longer than IGWO (\(985.3142 {\text{seconds}}\)), remains efficient, with notable reductions in computation time compared to WOA and SCADE, making ARSCA a practical solution for real-time scenarios. In the Friedman Rank Test (FRT), ARSCA ranks highest with a score of 1, outperforming IGWO (FRT = 7.5) and SCADE (FRT = 9) by significant margins. This score highlights ARSCA robustness and reliability across multiple performance metrics, consistently securing optimal solutions in complex dynamic loading conditions. The convergence analysis, box plots, and voltage profiles in Fig. 14 further validate ARSCA effectiveness and capability in minimizing cost and power loss while maintaining competitive performance across key metrics.

Fig. 14
figure 14

ARSCA and other algorithm performance for Case 6: (a) Convergence curve, (b) Box plot, and (c) Voltage profile of the modified system.

Case 7: gross cost minimization for Scenario-4

The results for Case 7 under Scenario-4, detailed in Table 11, highlight ARSCA excellent performance across several optimization metrics. ARSCA achieved the lowest gross cost \({C}_{\text{gross,min}}\) at \(883.5258 \text{\$/h}\), outperforming other algorithms such as IGWO (\(898.5854 \text{\$/h}\)) and SCADE (\(915.9895 \text{\$/h}\)) by approximately 1.67% and 3.54%, respectively. This achievement underscores ARSCA efficiency in minimizing overall system costs within dynamic conditions. In terms of power loss \({P}_{\text{loss}}\), ARSCA demonstrated strong results, achieving a low value of \(1.3578 {\text{MW}}\). This is notably lower than IGWO (\(1.5911 {\text{MW}}\)) and SCADE (\(1.7972 {\text{MW}}\)), representing reductions of approximately 14.67% and 24.45%, respectively. This result highlights ARSCA superior capability in enhancing energy efficiency by minimizing unnecessary power losses, a critical factor in dynamic loading scenarios.

Table 11 Optimized control parameters with all algorithms in Case 7.

For generation cost \({C}_{\text{gen}}\), ARSCA recorded \(750.0083 \text{\$/h}\), remaining competitive among other methods. Although slightly higher than SCADE (\(738.6401 \text{\$/h}\)) by 1.54%, ARSCA demonstrates a balanced approach, achieving significant performance gains in other key metrics like gross cost and power loss reduction. Voltage deviation \(VD\) for ARSCA is recorded at \(0.8976 \text{p.u.}\). Although moderately higher than some methods, such as SCADE (\(0.3 \text{p.u.}\)), ARSCA effectively balances this trade-off with its lower gross cost and power loss, demonstrating robustness and reliability in achieving near-optimal results. This small compromise in \(VD\) is justified by ARSCA strengths in cost efficiency and power optimization. For mean gross cost \({C}_{\text{gross,mean}}\), ARSCA reached \(884.0901 \text{\$}\text{/h}\), which is the lowest among the evaluated algorithms. This consistency in minimizing gross costs further validates ARSCA capacity for effective system expense optimization, surpassing IGWO and SCADE by approximately 1.81% and 3.91%, respectively.

In terms of runtime, ARSCA completes its optimization process in \(861.2063 {\text{seconds}}\), exhibiting efficient computation despite slightly longer times compared to SCADE (\(853.7877 {\text{seconds}}\)). ARSCA runtime remains competitive, and its performance across other metrics justifies the minimal increase in computational time, especially given its ability to achieve superior cost and power loss reduction. In the Friedman Rank Test (FRT), ARSCA obtained the highest ranking with a score of 1, outperforming IGWO (8) and SCADE (9) by 87.5% and 88.89%, respectively, emphasizing its consistency and top performance across critical evaluation criteria. This result highlights ARSCA effectiveness in delivering reliable solutions across multiple metrics under Scenario-4.

Overall, ARSCA is found to minimize gross and generation costs, while maintaining low power loss and competitive performance on stability and efficiency parameters. Detailed performance trends and validation are provided in Fig. 15 which shows that the balance of these metrics makes ARSCA a very effective solution for Scenario-4.

Fig. 15
figure 15

ARSCA and other algorithm performance for Case 7: (a) Convergence curve, (b) Box plot, and (c) Voltage profile of the modified system.

Case 8: expected generation cost, expected power loss, and expected gross cost under load uncertainty

Table 12 presents the simulation outcomes for Case 8, which focuses on the expected generation cost (EGC), expected power loss (EPL), and expected gross cost (EGRC) under varying load conditions across multiple optimization algorithms. ARSCA demonstrates a highly competitive performance in EGC, achieving a value of \(750.0083 \text{\$/h}\), positioning it closely among other advanced algorithms. This value is marginally higher than the lowest EGC obtained by SCADE at \(738.6401 \text{\$/h}\), reflecting a slight difference of 1.53%. However, ARSCA competitive EGC highlights its balanced approach in maintaining low generation costs under load uncertainty while delivering on other key metrics.

Table 12 Optimized values of parameter in Case 8 with all algorithm.

In terms of expected power loss (EPL), ARSCA achieves an efficient outcome with a power loss of \(1.3578 {\text{MW}}\). This value places ARSCA as one of the top-performing algorithms, outperforming IGWO, WOA, and SCADE with reductions of approximately 14.67%, 2.17%, and 24.45%, respectively. This reduction in power loss emphasizes ARSCA capability in improving system energy efficiency, an essential factor under uncertain and variable loading scenarios. ARSCA also excels in minimizing the expected gross cost (EGRC), achieving the lowest value among the algorithms at \(883.5258 \text{\$/h}\). Compared to IGWO (\(898.5854 \text{\$/h}\)) and SCADE (\(915.9895 \text{\$/h}\)), ARSCA demonstrates reductions of approximately 1.67% and 3.54%, respectively, showcasing its effectiveness in reducing overall system costs. Although OBSCA comes close with a value of \(885.4779 \text{\$/h}\), ARSCA maintains a slight edge, reinforcing its strong performance in cost optimization. Additionally, ARSCA mean gross cost (\({C}_{\text{gross,mean}}\)) is recorded at \(884.0901 \text{\$/h}\), confirming its consistent cost-minimizing ability across fluctuating loads. This result underscores ARSCA reliability, outperforming other algorithms like IGWO (\(900.3617 \text{\$/h}\)) and SCADE (\(919.9327 \text{\$/h}\)), with cost reductions of up to 3.89%.

In terms of computational efficiency, ARSCA runtime is \(861.2063 {\text{seconds}}\), slightly longer than SCADE \(853.7877 {\text{seconds}}\), but well within an efficient range for high-dimensional optimizations. Despite this small increase in runtime, ARSCA robust performance across critical cost and efficiency metrics provides a compelling justification for this trade-off. ARSCA Friedman Rank Test (FRT) score of 1 confirms its top-ranking position among the evaluated algorithms, indicating superior consistency across multiple performance indicators. This rank surpasses IGWO, WOA, and OBSCA by significant margins, affirming ARSCA resilience and reliability under load uncertainty.

Comparative analysis of ARSCA with state-of-the-art algorithms

The performance of ARSCA in terms of generation cost, active power loss, and gross cost is compared with other state of the art algorithms in Table 13. The ARSCA algorithm outperformed in all categories. ARSCA achieved the lowest generation cost of 807.1704 $/h, better than LWaOA and ABC with generation costs of 807.2761 $/h and 807.399 $/h, respectively. Generation costs of 807.4907 $/h and 807.481 $/h were also delivered by DE and WaOA, respectively. On the other hand, FPA and GA algorithms were found to have significantly higher generation cost of 810.397 $/h and 811.9821 $/h, respectively, due to their lower cost efficiency. In terms of minimizing active power loss, ARSCA was the most effective again with a value of 1.7655 MW. The performance of this was better than that of LWaOA and WaOA, which had active power losses of 1.789 MW and 1.8844 MW, respectively. Active power losses of 1.9068 MW and 1.9198 MW were moderate in ABC and GBO, whereas FPA and MSA had the highest losses of 2.2597 MW and 2.1442 MW, respectively. The results show that FPA and MSA are less effective in terms of maximizing power transmission efficiency. ARSCA had the lowest gross cost of 1105.2167 $/h, indicating that it is the most optimal. The gross costs of LWaOA and GBO were 1105.825 $/h and 1106.539 $/h, respectively. DE and WaOA were found to have moderate gross costs of 1113.676 $/h and 1113.872 $/h, respectively. Also, FPA and GA exhibited significantly higher gross cost of 1164.719 $/h and 1159.394 $/h, indicating further suboptimal performance. These results highlight that ARSCA is an effective algorithm for power system optimization, excelling at all performance metrics and particularly suited to applications requiring a balance between cost efficiency and system performance.

Table 13 Performance comparison of ARSCA and state-of-the-art algorithms.

Scenario A: temporally varying load profiles with diurnal cycles

In energy systems, real time factors such as dynamic load demands and intermittent renewable energy sources often cause temporal variations in operational parameters. Traditional static optimization models do not adequately address these variations. A diurnal profile with multiple load blocks is used to capture the daily load demand fluctuations to simulate realistic operational scenarios. A three block load profile is assumed for a typical operational day for this study. The Morning Block accounts for low-to-moderate load conditions, with demand set at 85% of the base load between 00:00 and 08:00 h. This is followed by the Peak Block, which represents the highest load conditions, with demand escalating to 115% of the base load between 09:00 and 16:00 h. Finally, the Evening Block reflects moderate load conditions, with demand stabilizing at 90% of the base load between 17:00 and 23:59 h. For each block, the probabilities of occurrence are set uniformly at 0.3333, which corresponds to their equal time spans. The defined sub scenarios are therefore Sc_A1 (Load = 0.85 × Base Load, Probability = 0.3333), Sc_A2 (Load = 1.15 × Base Load, Probability = 0.3333) and Sc_A3 (Load = 0.9 × Base Load, Probability = 0.3333).

The stochastic nature of wind availability is modeled using Weibull probability density functions (PDFs) in Scenario A. A moderate negative correlation is introduced to capture the interdependence between load demand and wind generation. Wind output is increased by 5% during low load conditions (Morning Block) and decreased by 5% during high load conditions (Peak Block). Wind availability is assumed constant for the Evening Block. The correlation based approach guarantees a realistic representation of load and renewable energy interactions. Table 14 presents the performance of six algorithms under these operational settings: SCA, IGWO, WOA, SCADE, OBSCA, and ARSCA. The metrics of interest are Expected Generation Cost (EGC), Expected Power Loss (EPL), Expected Gross Revenue Cost (EGRC), Feasible Rate of Testing (FRT) and Run Time. ARSCA outperforms all the tested algorithms in terms of multiple metrics. The lowest EGC of 841.7523 $/h is achieved, which is 0.029% lower than SCADE, and the lowest EPL of 1.8645 MW is obtained, which is 1.47% to 9.18% lower than other algorithms. Also, ARSCA has the most efficient EGRC of 1186.9743 $/h, which is 0.11% better than SCADE. In addition, ARSCA has the highest FRT and the shortest run time, and therefore is the most efficient algorithm for this scenario. Scenario A is an effective representation of the interaction between diurnal load patterns and wind variability, and is a robust framework for algorithmic performance evaluation. ARSCA always produces better cost efficiency, lower power losses and faster convergence, and is proven to be the most reliable algorithm for real world energy optimization challenges.

Table 14 Results for Scenario A.

Scenario B: combined wind-speed and load correlation scenario

A joint probabilistic framework, the scenario is extended beyond simple diurnal variations to also model load and wind variability. In real world power systems, these two factors are inherently uncertain and interdependent, and this approach captures that. Both wind generation is intermittent and load forecasts have some degree of unpredictability, which creates operational challenges for grid optimization. In Scenario B, these complexities are incorporated by specifying four different joint states that correspond to different load and wind conditions. The sub-scenarios are as follows: Sc_B1 (A probability of 0.25 of high load (105% of base) and high wind (110% of rated)), Sc_B2 (0.25 probability of high load (105% of base) and low wind (85% of rated)), Sc_B3 (0.25 probability of low load (90% of base) and high wind (115% of rated)), and Sc_B4 (Probability of 0.25 of low load (90% of base) and low wind (80% of rated)).

These conflicting operational challenges are introduced by this diverse set of scenarios. For instance, stresses grid capacity if high load and low availability of wind, and weighting carefully grid overload if high load and high wind are of balance. On the other hand, low load with high wind conditions calls for strategies to efficiently use excess wind energy. Optimization algorithms are rigorously tested under realistic and complex conditions with these joint states.

Table 15 presents the performance of six algorithms under Scenario B: SCA, IGWO, WOA, SCADE, OBSCA, and ARSCA. The key metrics are Expected Generation Cost (EGC), Expected Power Loss (EPL), Expected Gross Revenue Cost (EGRC), Feasible Rate of Testing (FRT) and Run Time. ARSCA is the most effective of the tested algorithms. The lowest EGC achieved is 886.2745 $/h, which is 0.13% better than SCADE. In terms of EPL, ARSCA achieves the lowest value of 1.9132 MW, which is 3.0%–7.1% less than other algorithms. Moreover, ARSCA exhibits the lowest EGRC of 1296.5487 $/h, which is 0.51% better than SCADE. ARSCA also has the fastest convergence time and highest FRT, and is thus the most robust and efficient solution. Scenario B represents the interplay between wind variability and load uncertainty, and is a challenging environment for algorithm performance evaluation. ARSCA consistently performs better than its competitors, with lower power losses, faster optimization under diverse and demanding conditions, and lower cost efficiency. This suggests that it could be a reliable and practical solution to real world grid optimization problems.

Table 15 Results for Scenario B.

ARSCA is a significant step forward in the development of optimization methods for power systems, both theoretically and practically. the novelty, rigor, and the strategic contribution of the research:

The novelty and conceptual contributions

The Adaptive Randomized Sine Cosine Algorithm (ARSCA) presents significant advancements beyond existing methods by introducing two novel mechanisms: The Adaptive Quadratic Interpolation Mechanism (AQIM) and the Rounding Mechanism (RM). The limitations of the standard Sine Cosine Algorithm (SCA) are addressed through these enhancements, which enhance the algorithm ability to balance global exploration and local exploitation, avoiding premature convergence and improving optimization precision. The results of this study demonstrate ARSCA ability to adaptively modify its search behavior to varying loading conditions and to place Flexible AC Transmission System (FACTS) devices under variable scenarios, which prior methods were unable to handle in a comprehensive way.

Performance superiority

Extensive benchmarks of ARSCA against existing algorithms, such as IGWO, SCADE, WOA, OBSCA, and SCA, are provided and show consistent superiority of ARSCA in terms of multiple metrics. For example, ARSCA results in lower gross generation costs, lower active power losses, and better voltage stability under both fixed and dynamic loading conditions. The algorithm exhibits robust performance in achieving specific outcomes, e.g., 883.5258 $/h gross cost in Case 7 and 1.7514 MW minimum active power loss in Case 2. These results show that it is practically relevant and competitive for solving complex power system optimization problems.

Strategic trial and applicability

The manuscript is focused on the IEEE 30 bus test system, but the study includes many scenarios including dynamic load uncertainties and multi objective optimization to mimic the real world. The algorithm is shown to be adaptable to modern power systems with environmental and operational constraints, with the strategic integration of renewable energy sources such as wind power, along with FACTS devices. Although not explicitly implemented on larger networks, the flexibility and scalability of ARSCA inherent in its design are both easily extended and serve as the foundation for future research and practical implementation of ARSCAs in a range of system sizes.

Scientific rigor

Detailed mathematical modeling, comprehensive benchmarking, and extensive case studies are provided in the manuscript to validate ARSCA effectiveness. The obtained results are statistically evaluated by the Friedman Rank Test along with other performance metrics, for ensuring reliability and reproducibility. Furthermore, the time complexity of the algorithm is rigorously analyzed to show that the algorithm is computationally efficient, a key requirement for real time optimization.

The research context and positioning

This study relies on a solid body of existing research, and fills a gap in the literature. The Sine Cosine Algorithm is a well established foundational concept, but the proposed modifications greatly enhance the algorithm for power system optimization. To this end, the journal has a focused objective on impactful research which helps addressing the critical issues in its vicinity.

Characterization uniqueness

The integration of ARSCA with FACTS devices presents a unique characterization of the effectiveness of the algorithm in optimizing power flow, voltage stability and operational costs. The proposed mechanisms not only improve the functionality of the algorithm, but also make it suitable for the current needs of modern power systems with renewable energy integration. The novelty is that the algorithm is able to balance cost efficiency, energy loss reduction and system stability under different scenarios, which is different from existing approaches.

Conclusion

This study presents the Adaptive Randomized Sine Cosine Algorithm (ARSCA) as a novel approach for power system optimization, especially in wind power integration and dynamic operating conditions. The research significantly contributes to the renewable energy integration and power system stability by optimizing the placement and settings of FACTS devices, namely TCSC, TCPS and SVC, and minimizing the active power losses, operational costs and gross system costs. Novel mechanisms like Adaptive Quadratic Interpolation and Rounding Mechanism are incorporated into the ARSCA framework, which show excellent performance in the exploration and exploitation of the algorithm. These enhancements enable ARSCA to overcome the shortcomings of the traditional metaheuristic algorithms, SCA, IGWO, and OBSCA, which may converge very slowly or get stuck in local optima. The superiority of ARSCA in providing cost effective and energy efficient solutions is confirmed by comprehensive evaluations on the IEEE-30 bus test system under both fixed and dynamic loading conditions. The key findings and contributions from this thesis are presented.

Optimization excellence

In specific scenarios, ARSCA always outperforms state of the art algorithms, with up to 10.9% reduction in power losses and 5.0% reduction in operational costs. Across all eight case studies, the algorithm produces more accurate solutions, converges faster, and is more robust than competitors. In Case 8 (with uncertain load), ARSCA has the lowest expected gross cost (EGRC) of $691.63/h, which demonstrates its effectiveness under uncertain operating conditions.

Enhanced system stability

The placement and tuning of FACTS devices are optimized to significantly enhance grid stability. Dynamic and uncertain load conditions are handled well while better maintaining voltage profiles across different scenarios. These improvements guarantee the system reliability under various loading patterns, which is essential for current grids with high penetration of renewable energy.

Practical and environmental relevance

ARSCA directly contributes to the environmental sustainability of power systems by reducing active power losses and operational costs. Lower transmission losses mean less energy wasted; optimized use of renewable energy means less dependence on fossil fuels. The alignment of ARSCA with global energy efficiency and sustainability goals makes the tool a practical instrument for utility operators and policymakers.

Future scalability

The study provides a robust basis for extending the applicability of ARSCA to larger and more complex systems. Additional renewable energy sources, including solar and hydro, can be integrated into the model, and the model can be extended to include more advanced modeling of uncertainties, to make it more relevant to real world scenarios. Because the algorithm adapts to dynamic and hybrid energy systems, it is a versatile solution to emerging challenges in power grid management.

The work highlights the need for hybrid optimization approaches to deal with the complexities of modern power systems. The potential of ARSCA as a valuable tool in achieving cost efficient and sustainable power system operations is demonstrated by its ability to deliver superior optimization results. The results also highlight the need to combine advanced control technology (e.g., FACTS devices) with robust optimization algorithms to maintain grid reliability and resilience in the presence of growing renewable energy integration.

The proposed ARSCA framework fills important gaps in power system optimization by providing a new, scalable, and practical solution for minimizing cost, reducing energy losses, and enhancing system stability under both fixed and dynamic loading conditions. Future work will involve expanding the scalability of ARSCA to larger networks, incorporating a variety of renewable resources, and creating more advanced uncertainty modeling techniques to enhance the scope and relevance of ARSCA.