Introduction

The flow of the reactive power can play a significant role for enhancing the stability and performance of the electric system. The reactive power flow control in transmission systems can be accomplished by controlling a set of components like the generators’ voltages, the transformer taps setting, and the reactive power of the compensators. Optimal setting of the previous components can be accomplished via optimal solution of the ORPD. The optimal reactive power dispatching (ORPD) solution process significantly enhances the stability and overall performance of electrical power systems. The ORPD solution process aims to reveal the optimal settings of system components (i, e,, the generators’ voltage and transformers’ taps in addition to the reactive powers of capacitors banks). This in turn leads to reducing the total losses and enhancing voltage profiles and stability of transmission systems while considering the system’s constraints. Many academic studies were carried out to solve this problem and attain optimal solutions for the ORPD process. The optimization methods that were implemented for the ORPD solution include physical, human, evolutionary-based techniques in addition to hybrid methods. Several evolutionary-based methods were presented in the literature. In1, the authors applied the evolutionary programming (EP) method to the ORPD solution of the IEEE 30–bus system. Walter M, et al. in2, applied the specialized genetics algorithm (SGA) to alleviate the power losses in different systems. In which, the authors applied to the SGA for IEEE 30, 57, 118, and 300-bus. K, Mahadevan, et al. proposed a comprehensive particle swarm optimization (PSO) as a method for enhancing the voltage profile and decreasing the active loss in IEEE 30-bus and 118-bus electrical systems3. Authors in4 solved the ORPD to diminish VDs and the system losses using the modified differential evolution (MDE) in the IEEE 30-bus. M, A, Abido presented a pareto evolutionary algorithm to resolve the ORPD on the IEEE systems such as 6-bus and 30-bus systems5. A, A, Abou El Ela et al. in6, presented the differential evolution (DE) on the IEEE 30-bus system to enhance the profile and stability of the voltage and diminish the power losses. Several physical-based methods were implemented for the ORPD solution. In7, Gonggui Chen et al., applied the gravitational search technique on IEEE 57, 30, and 14-bus systems for optimizing the voltage deviation and minimizing the losses of the power transmission. In8, the authors applied a modified sine-cosine algorithm to enhance the voltage profile, improve system stability, and minimize real power losses on the IEEE 30-bus system. Yuanye Wei et al. in9, solved the ORPD by the improved slime mould algorithm (ISMA) to enhance the performance of the IEEE 57, 118, and 300-bus systems. In10, authors aimed to solve the ORPD problem by using the water cycle algorithm to minimize the losses of the real power and the voltage deviation of the IEEE 30, 57, and 118-bus. Said A, et al., in11, applied the lightning attachment procedure optimization in IEEE 30-bus in the presence of renewable energy resources in order to diminish the power losses in the tested hybrid system. In12, the authors presented a study on IEEE 118, 57, and 30 bus systems to enhance and reduce real power losses using the gravitational search algorithm as a solution to the ORPD problem. Other methods based on several swarms’ schemes were presented for the ORPD solution. In13, T, T, Nguyen and D, N, Vo, in14, applied the improved social spider optimization on IEEE 30-bus and IEEE 118-bus systems. The suggested technique is an improved version of the standard SSO and was tested on standard benchmark functions before applying it to the tested system. This study included three objective functions, which include the minimization of the total power losses, voltage deviations, and improvement of voltage stability. The whale optimization technique was applied as a new technique for solving the ORPD problem and decreasing the power losses on the IEEE 30, 57, and 118-bus networks15. To resolve the ORPD of IEEE 118-bus and 30-bus systems, the authors in16 applied the PSO method. In17, the ant lion optimizer is used as an optimization method for ORPD solution on the IEEE 30, 118, and large-scale 118-bus. An improved ant-lion optimization technique was utilized for ORPD solution in IEEE 30, 57 and 118-buses systems in18 for reducing energy losses and improving the system voltage profile. There are many algorithms that depend on techniques related to human behaviors or biological matters related to humans. In19, the authors solved the ORPD for IEEE 57 and 30-bus systems using the harmony search technique for losses reduction and optimization the voltage stability and deviations. In20, biogeography-based optimization was applied to optimize the ORPD of IEEE 30-bus and IEEE 57-bus networks, where the study was carried out to decrease the real power losses. Authors, in21, proposed a modification for the teaching learning-based technique, where the quasi-oppositional learning (QOBL) was incorporated into the standard teaching learning-based optimization (TLBO) to accelerate convergence and enhance the quality of solutions for reducing network power losses and improving the voltage profile. Finally, several hybrid-based algorithms were implemented for the ORPD solution, where a hybrid PSO and the grey wolf optimization were used as optimization methods to solve the ORPD issue for boosting the performance of the IEEE 118, 30, and 14 bus systems22. In23, Z, Sahli et, al, presented the PSO and the tabu-search technique algorithms to solve the ORPD for the IEEE 30-bus. Authors, in24, applied a hybrid PSO with gravitational searching algorithms to reduce the \(\:{P}_{Loss\:}\)and boost the voltage profile for the IEEE 30-bus system.

The inclusion of renewable energy-based generation resources (RERs), as well as the load variation, increases the uncertainty of power systems. Thus, it is essential to consider the system’s uncertainty and the stochastic nature of PV and WT generation systems. Very few research has solved the stochastic ORPD at the uncertainty of the system25,26,27. The contributions are outlined below:

  • This work proposes the SORPD solution process for uncertainties due to loading and the generated power of wind turbines and PV generation systems. The proposed method considers the jointly uncertain characteristics of loading and renewable generation.

  • A new modified Weighted Average Algorithm (MWAA) is proposed based on three improvement strategies for solving the SOPRD process. The proposed method benefits current and future installations of renewable sources for the energy transition. The suggested MWAA is also proposed in this work to solve the ordinary ORPD and SORPD processes.

  • The suggested MWAA is applied to CEC-2019 test suite and statistical comparison with other methods, including SCSO, GWO, CWO, and the standard classical WAA.

The paper’s organization is as follows: Sect. 2 depicts the associated fitness functions and constraints. Section 3 explains the system’s uncertainties. Sections 4 and 5 detail the WAA and MWAA algorithms. Section 6 provides the numerical results. Section 7 lists the conclusion of the paper.

Problem formulation

The ORDP problem is an essential task and requires finding optimal solutions, which are reflected in improving system performance and reducing system losses. The main target of ORPD is to assign the optimal sets for the elements of the system, including the transformer’s tapping, voltages, and the capacitor’s reactive power output while considering the system limits. The ORPD can be illustrated as follows:

$$\:Min\:\:{F}_{obj}(y,x)$$
(1)

In which,

$$\:{g}_{k}\left(y,x\right)=0\:\:\:$$
(2)
$$\:{h}_{n}\left(y,x\right)\le\:0\:\:\:$$
(3)

where \(\:{F}_{obj}\) refers to the function of objectives and y and x represent dependent/control parameters, respectively, which are depicted in (4) and (5).

$$\:y=[{V}_{G},{Q}_{C},{T}_{p}]$$
(4)
$$\:x=[{P}_{1},{V}_{L},{Q}_{G},{S}_{T}]$$
(5)

where Tp, VG, and QC refer to the transformation tapping ratio of transformers, capacitors VARs, and generators voltages, respectively. VL, ST, QG, and P1, refer to the voltages at load buses, TL’s power flow, the reactive power of the generator and the slack bus’s power, respectively.

Fitness functions

Power loss model

$$\:{P}_{Losses}=\sum\:_{i=1}^{NL\:}{G}_{mn}{(V}_{m}^{2}+{V}_{n}^{2}-2{V}_{m}{V}_{n}cos{\delta\:}_{mn})$$
(6)

where NL represents the number of TLs. Gmn denotes to the TL’s conductance of the line.

Voltages deflections

$$\:VD=\sum\:_{i=1}^{NBL}\left|\left({V}_{i}-1\right)\right|\:$$
(7)

where, the number of load buses is defined as \(\:NBL\).

Total expected power loss

$$\:TEPL=\sum\:_{n=1}^{{n}_{S}}{EPL}_{n}\:=\sum\:_{n=1}^{ns}{\sigma\:}_{n}\times\:{P}_{Losses,n}$$
(8)

where nS refers to the number of scenarios. σk corresponds to the scenario probability (n-th) while EPL_k is the corresponding EPL.

The total expected voltages deflections

$$\:TEVD=\sum\:_{n=1}^{{n}_{S}}{EVD}_{k}\:=\sum\:_{n=1}^{{n}_{S}}{\sigma\:}_{n}\times\:{VD}_{n}$$
(9)

where \(\:EVD\) is the expected VD.

The applied constraints

Equality applied constraints

$$\:\sum\:_{i=\:1}^{NG}{P}_{Gi}-\sum\:_{i\:=\:1}^{NBL}{P}_{Li}-\left|{V}_{i}\right|\sum\:_{j=1}^{NTL\:}\left|{V}_{j}\right|\:\left({G}_{ij}cos{\delta\:}_{ij}+{B}_{ij}s\:in{\delta\:}_{ij}\right)=\:0$$
(10)
$$\:\sum\:_{i=\:1}^{NG}{Q}_{Gi}-\sum\:_{i\:=\:1}^{NBL}{Q}_{Li}-\left|{V}_{i}\right|\sum\:_{j=1}^{NTL\:}\left|{V}_{j}\right|\:\left({G}_{ij}sin{\delta\:}_{ij}-{B}_{ij}cos{\delta\:}_{ij}\right)=0$$
(11)

where PG and QG refer to the generated real/reactive powers. QL and PL denote the reactive and the active load demand. NTL and NG refer to number of TLs and generators, respectively.

Inequality constraints

$$\:{P}_{g,n}^{min}\le\:{P}_{g,n}\le\:{P}_{g,n}^{max}\:\:\forall\:\:n\in\:\:NG$$
(12)
$$\:{Q}_{g,n}^{min}\le\:{Q}_{g,n}\le\:{Q}_{g,n}^{max}\:\:\forall\:\:n\in\:\:NG$$
(13)
$$\:{V}_{g,n}^{min}\le\:{V}_{g,n}\le\:{V}_{g,n}^{max}\:\:\forall\:\:n\in\:\:NG$$
(14)
$$\:{T}_{k}^{min}\le\:{T}_{k}\le\:{T}_{k}^{max}\:\:\forall\:\:k\in\:\:NT\:$$
(15)
$$\:{Q}_{C,n}^{min}\le\:{Q}_{C,n}\le\:{Q}_{C,n}^{max}\:\forall\:\:n\in\:\:NC$$
(16)
$$\:{S}_{T,n}\le\:{S}_{T,n}^{min}\:\forall\:\:n\in\:\:NTL\:$$
(17)
$$\:{V}_{m}^{min}\le\:{V}_{m}\le\:{V}_{m}^{max}\:\:\forall\:\:m\in\:\:NBL\:$$
(18)

where \(\:NG\), \(\:NT\), and \(\:NC\) are number of the generation units, transformers and capacitors, respectively. The weighted penalty sum method is used to consider the constraints with the studied objective function as follows24:

$$\:F={F}_{i}+{\delta\:}_{1}\:{\left({P}_{G1}-{P}_{G1}^{lim}\right)}^{2}+{\delta\:}_{2}\sum\:_{i=1}^{{N}_{G}}{\:\left({Q}_{Gi}-{Q}_{Gi}^{lim}\right)}^{2}+{\delta\:}_{3}\sum\:_{i=1}^{{N}_{Q}}{\:\left({V}_{Li}-{V}_{Li}^{lim}\right)}^{2}+{\delta\:}_{4}\sum\:_{i=1}^{{N}_{/}}{\:\left({S}_{Li}-{S}_{Li}^{lim}\right)}^{2}$$
(19)

where \(\:{\delta\:}_{1},\) \(\:{\delta\:}_{2}\), \(\:{\delta\:}_{3}\) and \(\:{\delta\:}_{4}\) refer to the factors of penalty, While \(\:lim\) is a superscript that denotes to the variables higher or lower limitations.

Uncertainty modelling

It should be highlighted here that the SORPD is solved considering three stochastic parameters. The first uncertain parameter is the loading, which was represented by the normal probability density function (PDF) according to (20)28.

$$\:{f}_{d}\left({P}_{d}\right)=\frac{1}{{\sigma\:}_{d}\sqrt{2\pi\:}}exp\left[-\frac{({P}_{d}\:-\:{\mu\:}_{d})2}{2{{\sigma\:}_{d}}^{2}}\right]$$
(20)

where \(\:{\mu\:}_{d}\)represents the average load demand, while \(\:{\sigma\:}_{d}\) refers to the standard deviation. The solar irradiance was modeled based on the lognormal PDF as follows29:

$$\:{f}_{s}\left({G}_{s}\right)=\frac{1}{{G}_{s}{\sigma\:}_{s}\sqrt{2\pi\:}}exp\left[-\frac{{\left({ln}\left({G}_{s}\right)-\:\mu\:s\right)}^{2}}{2{{\sigma\:}_{s}\:}^{2}}\right]\hspace{1em}{G}_{s}>0$$
(21)

where, \(\:{\sigma\:}_{s}\) is the standard deviation and \(\:\mu\:s\) denotes to the average solar irradiance30. The acquired power from the PV panels (\(\:{P}_{s}\)) is calculated using (22)31.

$$\:{P}_{s}\left({G}_{s}\right)\hspace{0.33em}\hspace{0.33em}=\left\{\begin{array}{c}{P}_{sr}\left(\frac{{{G}_{s}}^{2}}{{G}_{std\:}\times\:{X}_{c}\:}\right)\:for\:\:0<{G}_{s}\le\:{X}_{c}\\\:{\:\:P}_{sr}\left(\frac{{G}_{s}}{{G}_{std\:}\:}\right)\:\:\:\:\:\:\:\:\:\:\:for\:\:\:\:\:{G}_{s}\ge\:{X}_{c}\:\:\:\:\:\:\:\:\:\:\:\:\end{array}\right.$$
(22)

where \(\:{P}_{sr}\) denotes the rated power of PV panels. \(\:{X}_{c}\) and \(\:{G}_{std\:}\)denote constant value of irradiance (120\(\:\:\text{W}/{\text{m}}^{2}\))32 and standard irradiance level, respectively. The wind velocity is formed based on the Weibull PDF as follows:

$$\:{f}_{v}\left(v\right)=\frac{k}{\lambda\:}{\left(\frac{v}{\lambda\:}\right)}^{k-1}exp\left[-{\left(\frac{\nu\:}{\lambda\:}\right)}^{k}\right]$$
(23)

where k denotes the shape factor, while λ represents of the scale factor. The yielded power by WT is calculated using (24)33.

$$\:{P}_{w}\left(v\right)\hspace{0.33em}\hspace{0.33em}=\left\{\hspace{0.33em}\begin{array}{ccc}0&\:for&\:v<{v}_{in}\:\&\:\:{v}_{\omega\:}>{v}_{\omega\:o}\\\:{P}_{wr}\left(\frac{v-{v}_{in}}{{v}_{r}-{v}_{in}}\right)&\:for&\:\left({v}_{in}\le\:v\le\:{v}_{r}\right)\\\:{P}_{wr}&\:for\:&\:\left({v}_{r}<v\le\:{v}_{o}\right)\:\:\:\end{array}\right.$$
(24)

where \(\:{P}_{wr}\) denotes the WT’s rated power. The cut-out speed \(\:{v}_{o}\), rated speed \(\:{v}_{r}\), cut-in speed \(\:{v}_{in}\). The value of \(\:{\sigma\:}_{d}\) is 10 while \(\:{\mu\:}_{d}\:\)is 7034. The values of \(\:\lambda\:\) and \(\:k\) are selected to be 9 and 2, respectively35. The values of \(\:{\mu\:}_{s}\) and \(\:{\sigma\:}_{s}\) are 5,5 and 0,5, respectively. After representing the uncertain parameters of the Monte Carlo Simulation (MCS) is utilized to produce a set of scenarios. In this paper, 500 scenarios were generated for loading, wind speed are shown in Fig. 1. Figure 2 while the irradiance scenarios are shown in Fig. 3, respectively. Many scenarios are obtained from the MCS, and solving the ORPD in these scenarios increases the calculation burden. Thus, the scenario-based reduction (SBR) technique can minimize the produced scenarios to a suitable number. In which, the steps of implementing this method are depicted and detailed in36. In this work, Table 1 lists the generated scenario by the SBR method.

Table 1 The simulation results for TEPL without RERs.
Fig. 1
Fig. 1
Full size image

Scenarios of load demands by MCS.

Fig. 2
Fig. 2
Full size image

Scenarios wind speeds by MCS.

Fig. 3
Fig. 3
Full size image

Scenarios of solar irradiance by MCS.

Weighted average algorithm

The development of Weighted Average Algorithm (WAA) starts with the aim of finding the global optimum by iteratively improving the positions of individuals in the population over multiple iterations37. The algorithm initializes a set of candidate solutions within the search space, denoted mathematically as:

$$\:X=\left[\begin{array}{ccccc}{x}_{\text{1,1}}&\:{x}_{\text{1,2}}&\:\dots\:&\:{x}_{1,n-1}&\:{x}_{1,n}\\\:{x}_{\text{2,1}}&\:{x}_{\text{2,2}}&\:\dots\:&\:{x}_{2,n-1}&\:{x}_{2,n}\\\:&\:\vdots&\:\ddots\:&\:\vdots&\:\\\:{x}_{N-\text{1,1}}&\:{x}_{N-\text{1,2}}&\:\dots\:&\:{x}_{N-1,n-1}&\:{x}_{N-1,n}\\\:{x}_{N,1}&\:{x}_{N,2}&\:\dots\:&\:{x}_{N,n-1}&\:{x}_{N,n}\end{array}\right]$$
(25)

where \(\:{x}_{i,j}\)​ represents the j-th decision variable of the i-th candidate. N is the population size, and n is the problem’s dimensionality. Each candidate’s position is generated using the formula:

$$\:{x}_{ij}=rand\cdot\:\left(U{B}_{j}-L{B}_{j}\right)+L{B}_{j},i=\text{1,2},\dots\:,,,N,j=\text{1,2},\dots\:,n$$
(26)

Here, \(\:L{B}_{j}\)​ and \(\:U{B}_{j}\:\)are the lower and upper bounds of the j-th dimension, and \(\:rand\:\)is a random number between 0 and 1.

Weighted average position calculation

The algorithm determines the weighted average position using the following steps:

Sort candidate solutions

Candidates are sorted based on their fitness values, either maximizing or minimizing.

Calculate total fitness

For selected \(\:{N}_{Candidate}\:\)solutions, the total fitness is computed as:

$$\:\text{F}\text{i}\text{t}\text{n}\text{e}\text{s}\text{s}\left({X}_{i}\right)\sum\:_{i=1}^{{N}_{Candidate}}\:=\text{\:SumFitness\:}$$
(27)

Determine weighted average position

The weighted average is calculated as:

For maximizing:

$$\:{X}_{\text{Miu\:}}=\frac{\sum\:_{i=1}^{{N}_{\text{Candidate\:}}}\:{X}_{i}\left({Sum}_{\text{Fitness\:}}-Fitness\left({X}_{i}\right)\right)}{{{Sum}}_{\text{Fitrness\:}}\left({N}_{\text{Candidate\:}}-1\right)}$$
(28)

For minimizing:

$$\:{X}_{\text{Miu\:}}=\sum\:_{i=1}^{{N}_{\text{Candidate\:}}}\:{X}_{i}\text{\:Fitness\:}\left({X}_{i}\right)/{\text{S}\text{u}\text{m}}_{\text{Fitness\:}}$$
(29)

where \(\:{X}_{\text{Miu\:}}\)is the weighted average position.

Exploration and exploitation strategies

The algorithm balances exploration and exploitation phases through a parameter function:

$$\:f\left(it\right)=(\alpha\:\cdot\:\text{r}\text{a}\text{n}\text{d}-1)\text{s}\text{i}\text{n}\left(\pi\:\frac{it}{{\text{M}\text{a}\text{x}}_{lt}}\right)$$
(30)
  • If \(\:f\left(it\right)\:\)≥ 0.5 exploitation is performed.

  • If \(\:f\left(it\right)\:\:\:\)< 0.5 exploration is applied.

Exploitation strategies

The algorithm implements three strategies based on the weighted average, global best, and personal best positions:

Strategy 1:

$$\:\begin{array}{c}{X}_{i}(it+1)=w11\cdot\:\left({X}_{\text{Miu\:}}\left(it\right)-{X}_{{\text{Global\:}}_{\text{B}\text{est\:}}}\left(it\right)\right)+w12\cdot\:\left({X}_{\text{Miu\:}}\left(it\right)-{X}_{{\text{Personal\:}}_{\text{B}\text{est\:}}}\left(it\right)\right)\\\:\end{array}+w13\cdot\:{X}_{\text{Miu\:}}\left(it\right)$$
(31)

Strategy 2:

$$\:{X}_{i}(it+1)=w21\cdot\:\left({X}_{Miu}\left(it\right)-{X}_{{\text{Personal\:}}_{\text{B}\text{est\:}}}\left(\text{\:it\:}\right)\right)+w22\cdot\:{X}_{{\text{Personal\:}}_{\text{B}\text{est\:}}}\left(it\right))$$
(32)

Strategy 3:

$$\:{X}_{i}(it+1)=w31\cdot\:\left({X}_{\text{Miu\:}}\left(it\right)-{X}_{{\text{Global\:}}_{\text{B}\text{est\:}}}\left(it\right)\right)+w32\cdot\:{X}_{{\text{Global\:}}_{\text{Best\:}}}\left(it\right)$$
(33)

Exploration strategies

  1. a)

    Levy flight method:

$$\:{X}_{i,j}(it+1)={X}_{{\text{Global\:}}_{\text{gett\:}j}}\left(it\right)+S$$
(34)

where \(\:S\:\)is the step length following the Levy distribution:

$$\:S=\frac{U}{|V{|}^{\frac{1}{\beta\:}}}$$
(35)
  1. b)

    Random walk strategy:

$$\:{X}_{i}(it+1)=\text{r}\text{a}\text{n}\text{d}\cdot\:\left(U{B}_{min}-L{B}_{min}\right)+L{B}_{\text{min\:}}$$
(36)

The modified weighted average algorithm

Three strategies were implemented to improve the traditional WAA’s performance and searching capabilities. QOBL is the first strategy which has been implemented with several algorithms to enhance the convergence rate of these algorithms38. The opposite vector (\(\:{p}_{i,j}^{o}\)) of the vector (\(\:{p}_{i,j}\)) is described using (37)28.

$$\:{p}_{i,j}^{o}={Lb}_{j}+{Ub}_{j}-{X}_{i,j},\:\:i=\text{1,2},\dots\:,n$$
(37)

The quasi-oppositional vector is formulated as follows:

$$\:{p}_{i,j}=\left({Lb}_{j}+{Ub}_{j}\right)/2$$
(38)

The second modification strategy is the FDB approach. In FDB, the WAA will update their locations in terms of the distance between the current and best populations and the values of the objective functions of the populations39. The best FDB approach was implemented to improve the performance of several optimization techniques40. The fitness function vector and the distance vector for all populations are depicted as follows41:

$$\:F={\left[\begin{array}{c}{f}_{1}\\\: \vdots \\\:{f}_{n}\end{array}\right]}_{nx1}$$
(39)
$$\:DP={\left[\begin{array}{c}{d}_{1}\\\:\vdots\\\:{d}_{m}\end{array}\right]}_{mx1}$$
(40)

In which,

$$\:{D}_{{P}_{i}}=\sqrt{\begin{array}{c}{\left({x}_{1}-{x}_{best1}\right)}^{2}+{\left({x}_{2}-{x}_{best2}\right)}^{2}+\cdots\:\\\:+{\left({x}_{i,n}-{x}_{best,n}\right)}^{2}\end{array}}$$
(41)

Then the score vector is calculated as follows:

$$\:{\text{\:FDBscor\:}}_{i}=\alpha\:\left(1-\text{n}\text{o}\text{r}\text{m}\:{F}_{i}\right)+(1-\alpha\:)\times\:\text{n}\text{o}\text{r}\text{m}\:{D}_{{P}_{i}}$$
(42)

\(\:\text{n}\text{o}\text{r}\text{m}\:{D}_{{P}_{i}}\)Where and \(\:\text{n}\text{o}\text{r}\text{m}\:{F}_{i}\) are the normalized distances and the fitness. \(\:\alpha\:\) is a penalty factor that was selected to be 0.5.

Finally, the third improvement method is the Weibull flight motion. It can be represented as using (42) and (43).

$$\:{X}_{i}(it+1)={X}_{i}\left(it\right)+Step$$
(43)

In which

$$\:Step=\left\{\begin{array}{c}\text{c}\text{l}\text{}(\text{0.5,1},[1,d\left]\right)\times\:0.5\times\:sign(r(1,d)-0.5)\\\:\times\:norm\left({p}_{\text{best\:}}-{x}_{i}\right),if{p}_{\text{best\:}}\ne\:p\\\:\text{}\text{c}\text{l}\text{}(\text{0.5,1},[1,d\left]\right)\times\:0.1\times\:sign(r(1,d)-0.5)\text{}\end{array}\right.$$
(44)

where, \(\:\text{cl\:denotes}\) a random value that is produced by the Weibull distribution with scalar parameters 0.5 and 1. The pseudocode of QOBL can be described in Algorithm 142 .

Algorithm 1
Algorithm 1
Full size image

QOBL pseudocode.

The procedure of the proposed MWAA for SORPD is depicted in Fig. 4. The steps of the proposed algorithm is depicted in Algorithm 2.

Fig. 4
Fig. 4
Full size image

Flowchart representation of the bio-inspired MWAA.

Algorithm 2
Algorithm 2
Full size image

The steps of the proposed MWAA.

The numerical results and discussion

The MWAA is utilized to solve the ORPD. The suggested MWAA is initially examined on standard and CEC-2019 benchmark functions. The results of the MWAA are compared to those obtained by the whale optimization algorithm (WOA)43, grey wolf optimizer (GWO)44, sand cat swarm optimization (SCSO)45, Chernobyl disaster optimizer (CDO)46, and WAA, The selected parameters of these techniques are provided in Table 2. The program was conducted in Core I7 CPU & 3,40 GHz.

Table 2 The data of the studied algorithms.

Statistical analysis

In this section, the performance of MWAA was tested is tested using CEC-2019 test suite48. The results yielded by MWAA are compared to other optimization methods in terms of the average and the standard deflections (SD), as reported in Table 3. As per the listed results, it is evident clear that the suggested MWAA achieved the best optimal solutions for all functions except for CEC4, CEC8, and CEC10. For further verifying the performance of the proposed optimization method, it has been tested using Wilcoxon test in which can be used to compared between two optimizers based on their median’s values49. Wilcoxon test uses the p-value index to evaluate whether the proposed MWAA demonstrated a significant advantage over other algorithms. The results of Table 4 show that most p-values were below 0.05, confirming the strong performance of MWAA in most cases. However, in some cases, the values exceeded 0.05, indicating that the differences were not always statistically significant. The Friedman test is also used to compare three or more groups of results to verify the effectiveness of the MWAA compared to the other optimization algorithms. The Friedman test is based on ranking the results obtained by optimization algorithms. According to Fig. 5, it is evident that MWAA is 1st rank compared to the other methods.

Table 3 The CEC 2019 functions statistical results of the different algorithms.
Table 4 p-value for CEC-2019 functions.
Fig. 5
Fig. 5
Full size image

Friedman mean ranks test by different algorithms for CEC-2019 functions.

Convergence analysis

The performance of MWAA was evaluated through a convergence analysis and compared with other optimization techniques. Figure 6 illustrates the convergence pattern for the CEC-2019 functions. Based on these convergence curves, it is obvious that MWAA demonstrates superior convergence in most functions, achieving faster and more stable convergence compared to the other techniques. This highlights its efficiency in reaching optimal solutions with fewer iterations.

Boxplot analysis

Boxplot is a common method to represent the results obtained in quadrants to depict the data distribution characteristics. Figure 7 shows the boxplots of the CEC 2019 benchmark functions. It is clear that the MWAA has the best and a narrower range compared to other competing algorithms.

Fig. 6
Fig. 6
Full size image

Convergence curves SCSO, GWO, WOA, CDO, WAA and MWAA for the CEC-2019.

Fig. 7
Fig. 7
Full size image

The Boxplot for CEC-2019 by different algorithms.

Solving the conventional ORPD

The suggested MWAA was executed to solve the conventional ORPD of the IEEE 30-bus network. Figure 8 shows the construction of the studied network and the system data are provided in50. The demand loading of the system is 283.4 MW + j 126.2 MVAR50. Refereeing to Fig. 8, the system involves 6 thermal generation systems, 4 transformers, 9 capacitor banks, and 41 transmission lines (TLs), The limits of the control variables are provided in Table 5, while the allowable boundaries of voltages are [0,95 − 1,05] p, u, and the thermal loading of TLs is provided in51. The value of the real power loss of the base case is 5.596 MW, and the VD is 0.8691 p, u. The value of power losses that have been obtained by the WAA and the MWAA are 4.8170 MW and 4.5845 MW, or the reductions of losses are 13.92% and 18.08% by applying WAA and the MWAA, respectively. The ORPD solution using the WAA and the MWAA have been depicted in Table 5. A comprehensive comparison of power loss reduction is listed in Table 6. According to Table 6, the best results for power loss reduction were obtained by applying the proposed MWAA compared with WAA, SCSO, GWO, CDO, WOA, and other well-known optimization methods.

Table 5 The optimal setting for the ORPD solution process by the WAA and the MWAA.
Table 6 The best, the mean, and the average power losses for different optimizers.

Moreover, the ORPD problem for VDs reduction was solved by the proposed MWAA. The values of the VDs gained by the WAA and the MWAA are 0.3701 p, u, and 0.1240 p, u., respectively. In other words, the reductions in the VDs by application of the WAA and the MWAA are 57.42% and 85.73%, respectively. The optimal setting of the system components for VDs reduction by MWAA and WAA are displayed in the 5th and 6th columns of Table 6. Figures 9 and 10 show the convergence carves of the MWAA, WAA, SCSO, GWO, CDO, and WOA. According to these figures, the MWAA has well and stable convergence characteristics.

Fig. 8
Fig. 8
Full size image

The IEEE system of 30-bus.

Fig. 9
Fig. 9
Full size image

The trends of the \(\:{P}_{Losses}\:\)by different techniques.

Fig. 10
Fig. 10
Full size image

The trends of VDs by different techniques.

Solving the stochastic ORPD

In this case, the SORPD is solved by applying MWAA. In the base case, the value of the TEPL is 6.701 MW, and the TEVD is 0.8227 p.u. Here, the considered uncertain parameters are the load demand, the generated powers of PV and WT. The selected locations of the PV panels and WTs are at 7th bus and 21st bus, respectively62. The size of the PV panels and WTs are optimally selected, and the maximum allowable limit is 50 MW, and the cut-out wind speed, the rated, and the cut-in are 25, 16, and 3 m/s, respectively. By application of the proposed MWAA for TEPL reduction, the TEPL is decreased to 1.5785 MW compared to the base case. Table 7 lists the results obtained without inclusion of RERs for TEPL. The values of the Ploss and the TEPL are listed in Table 7. Referring to Table 10, the highest value of power loss is at 7th scenario because the loading value is the highest in this scenario. The optimal settings of the system parameters for this case are shown in Fig. 11. In the case of including WTs, and PV panels, the TEPL is reduced to 1.3024 MW compared to without RERs as depicted in Fig. 12. The optimal rating of the solar PV panels and WT are 41.7649 MW and 43.3441 MW, respectively. The simulation results for this case include the Ploss, EPL, VD, and EVD, as well as the output powers of the RERs, which are depicted in Table 8. The output of PV panels and WTs varied with fluctuation of the irradiance and the wind velocity in each scenario, referring to Table 1.

Table 7 The simulation results for TEPL without RERs.
Table 8 The simulation results for TEPL with RERs.

In the case of application, the MWAA for reducing the TEVD, the TEVD without RERs is reduced from 0.8227 MW at the base case to 0.1554 p.u. The optimal setting of the voltages, the reactive powers of capacitors, and the tap ratios of transformers for the TEVD are provided in Fig. 13. The obtained results for solving the ORPD, including the VDs and the EVDs, are given in Table 9. The TEVD with optimal integration of the RERs diminished is reduced from 0.8227 p, u, at the based case to 0.1377 p, u. The optimal variables that are associated with ORPD for this case are depicted in Fig. 14. The simulation results for solving the TEVD with RERs are provided in Table 10. Figures 15 and 16 show the profile of voltages under solving the SORPD without and without incorporating the RERs. It is clear that the voltage profile is improved by solving the ORPD with or without the RERs. The TEPLs were reduced from 6.701 MW at the base case 1.7624 MW (with solving the SORPD without RERs) and to 1.4478 MW (with solving SORPD with RERs). Likewise, the TEVDs were lowered from 0.8227 p, u, at the base case to 0.1554 p.u. (with solving SORPD without RERs) and to 0.1377 p.u. (with solving SORPD with RERs).

Table 9 The simulation results for TEVD without RERs.
Table 10 The results with RERs for TEVD.
Fig. 11
Fig. 11
Full size image

The optimal control variable for TEPL without RERs: (a) Voltage magnitudes. (b) Transformer taps, (c) Reactive powers of capacitors.

Fig. 12
Fig. 12
Full size image

The optimal control variable for TEPL with RERs: (a) Voltage magnitudes, (b) Transformer taps, (c) Reactive powers of capacitors.

Fig. 13
Fig. 13
Full size image

The optimal control variables for TEVD without RERs: (a) Voltage magnitudes, (b) Transformer taps, (c) Reactive powers of capacitors.

Fig. 14
Fig. 14
Full size image

The optimal control variables for TEVD without RERs: (a) Voltage magnitudes, (b) Transformer taps, (c) Reactive powers of capacitors.

Fig. 15
Fig. 15
Full size image

The voltages without RERs.

Fig. 16
Fig. 16
Full size image

The voltages with RERs.

Conclusions

This study introduces a modified version of the Weighted Average Algorithm (WAA) to efficiently solve both stochastic and conventional Optimal Reactive Power Dispatch (ORPD) problems. Three key enhancement strategies were implemented to boost the performance of the traditional WAA. The first enhancement utilizes the QOBL, while the second applies the FDB methodology to enhance the exploitation process. The third improvement is the use of the Weibull flight orientation to strengthen the exploration capability. The proposed MWAA was rigorously tested on standard benchmark functions, CEC-2019 test suites, and the IEEE 30-bus transmission system. The SORPD problem was addressed by accounting for uncertainties in power generation from PV systems and wind turbines (WTs), as well as variations in load demand. The results highlight the efficiency and superiority of MWAA in solving ORPD problems, both with and without uncertainty, outperforming conventional methods such as CDO, WOA, GWO, and SCSO. Furthermore, the Total Expected Power Losses (TEPL) were significantly reduced from 6.701 MW for the base case to 1.5785 MW when solving the SORPD without Renewable Energy Resources (RERs) and further to 1.3024 MW when considering RERs. Similarly, the Total Expected Voltage Deviations (TEVD) decreased from 0.8227 p.u. into 0.1554 p.u. when solving the SORPD without RERs, and to 0.1377 p.u. when incorporating RERs.