1 Introduction

The power distribution networks analysis and study are important areas of research because these networks are the last connection between the bulk of electrical power system and consumers. Therefore, they are suffering from disturbances of power quality [1]. The flow of the reactive power in radial distribution networks (RDN) always leads to high system power loss, high voltage drop, and low power factor. The deviation in voltage profile because of high voltage drop is represented as one of the power quality problems [1]. These disturbances and effects can be minimized by providing Shunt Capacitor Banks (SCB) as a convenient source of reactive power compensation [2]. The optimal allocation of SCB has an efficient role in power system planning to insure the minimum system power losses, maximum net savings with improving voltage profile, and system power factor [3].

In recent years, optimal allocation of SCB has a huge competition among many types of research based on different optimization techniques and methods. These algorithms and mechanisms are presented as in the following studies. Swarup [4] implemented Genetic Algorithm (GA) as an optimization tool for optimal SCB in RDS. Sarma and Rafi [5] employed sensitivity factors to detect the appropriated buses for capacitor installation and then Plant Growth Simulation Algorithm (PGSA) is prepared for optimal SCB size and location from the elected buses. Shuaib et al. [6] employed sensitivity analysis to reduce the search space of optimization technique for recognizing the suitable sitings of SCB. The Gravitational Search Algorithm (GSA) was used as an optimization algorithm. The results are compared with the Interior-Point algorithm (IP) as an analytical technique and Simulation Annealing (SA) as a local search meta-heuristic, in addition to other methods. Abdelaziz et al. [7] proposed Flower Pollination Algorithm (FPA) and LSF for optimal placement and size of SCB in RDN. Das [8] implemented a hybrid Fuzzy set and Genetic Algorithm (Fuzzy-GA) to get the optimum installation of fixed and switched SCB. Hamouda et al. [9] proposed a sensitivity-based heuristic solution (heuristic) based on Markov chains as optimization algorithm for SCB locations in RDN. Raju et al. [10] implemented Direct Search Algorithm (DSA) for optimal reactive power compensation based on SCB allocation in RDN. Sultana [11] presented teaching learning-based optimization algorithm (TLBO) approach depending on two educational concepts teaching and learning phases to evaluate the optimal solution for SCB installation. El-Fergany [12] constructed a combination of Differential Evolution besides Pattern Search (DE-PS) that is used as a meta-heuristic optimization tool for solving the optimum level/size of SCB. In addition, LSF was utilized to find the most critical buses. Devabalaji et al. [13] performed Voltage Stability Index (VSI) for reaching to the optimum SCB location besides the Cuckoo Search Algorithm (CSA) to find the optimal capacity of SCB from the elected buses. Ali et al. [14] introduced the Power Loss Index (PLI) to determine the highest candidate buses for SCB allocations. Then, the proposed Improved Harmony Algorithm (IHA) is implemented to deduce the optimum decision of SCB placement and sizing in RDN.

Notwithstanding, these algorithms and techniques may not reach to the optimal solutions for minimizing the power losses and the total operating cost with maximizing the net savings due to many reasons. Some researchers employed many buses for reactive power compensation in the RDN [4, 12]. In addition, some works [5, 8, 9] were limited to small systems scale. Other studies focused on reducing the number of compensated buses with minimum sizing without caring about the optimal minimizing of costs and system power losses [6, 7, 11,12,13,14]. Moreover, the main goal of all optimization techniques is to be carried out to find the best global optimum to optimization problems. Furthermore, the meta-heuristic techniques should have two essential characteristics that are exploitation and exploration [15]. Consequently, the connotation of integrating the optimization techniques deals with balancing between the exploration and exploitation ability [16]. In hybrid mechanisms, the Particle Swarm Optimization (PSO) is one of the most widely used evolutionary technique, because of convergence speed, ability of searching global optimum, and less complex performing [17]. However, the PSO is combined with other optimization techniques for proposing the hybridized mechanisms [18]. The Gravitational Search Algorithm (GSA) is considered as one of the presently improved meta-heuristic techniques that is based on Newton’s law of gravity and low motion by Rashedi et al. [19]. The GSA has been confirmed by high performance in solving optimization problems [15]. The hybrid PSO and GSA approach has been implemented by Mirjalili and Hashim [20], by merging the PSO using its exploring feature pending the subsequent stages based on the social thinking in the method, and the GSA using its exploiting feature in the beginning stages of search process based on the local search in the method [21].

In this paper, the PSOGSA technique has been proposed to reduce drastically the computational difficulties and time required to solve the problems of optimal allocation of DGs and SCBs in distribution grids. Also, LSF is produced to evaluate the most candidate buses to compensate reactive power for reducing the search space of the optimization approach. Furthermore, a Voltage-Loss-Cost Index (VLCI) approach is integrated with the suggested scheme as an effective objective function to enhance the voltage level, minimize the system active power losses and the total annual operating cost. The Backward/Forward Sweep (BFS) algorithm is implemented for power flow determinations [21, 22]. The proposed schemes are applied and tested on 33-bus and 69-bus IEEE RDS, in addition, practical case study of Moscow Region 111-bus RDN [23]. To insure the proposed methodology capability and performance, the numerical results are compared with other various optimization techniques.

2 Problem formulation

2.1 Formulation of power flow

The Backward/Forward Sweep (BFS) algorithm is implemented for power flow evaluations [22, 23]. Figure 1 illustrates the sample of a distribution network, considering a line N is connected between two buses “i” and “j.

Fig. 1
figure 1

A sample of distribution network

The analysis of BFS method is constructed including three-main steps, which they based on the Kirchhoff’s voltage and currents law (KVL and KCL, respectively). The three steps comprise of (1) backward sweep, (2) forward sweep, and (3) nodal current analysis. These steps based upon convergence achievements if a maximum mismatch between voltages is less than the epsilon tolerance “error” (in this work, ɛt is considered = 0.000001). However, the active and reactive power losses for radial distribution system can be evaluated easily after the convergence. The determinations of BFS power flow are as the following:

The Pij and Qij flow through branch “N” from node “i” to node “j” can be derived in (1) backward sweep direction from the last node and are given as,

$$P_{ij} = P_{j}^{\prime } + R_{ij} \frac{\left( {P_{j}^{\prime 2} + Q_{j}^{\prime 2} } \right)}{V_{j}^{2} }$$
(1)
$$Q_{ij} = Q_{j}^{{\prime }} + X_{ij} \frac{{\left( {P_{j}^{{{\prime 2}}} + Q_{j}^{{{\prime 2}}} } \right)}}{{V_{j}^{2} }}$$
(2)

where \(P_{ij}^{{\prime }} = P_{j} + P_{Lj}\) and \(Q_{ij}^{{\prime }} = Q_{j} + Q_{Lj}\).

The voltage magnitude and angle at each node are developed in (2) forward sweep direction. Consider a voltage \(V_{i} \,\angle \,\delta_{i}\) at node “i” and \(V_{j} \,\angle \,\delta_{j}\) at node “j,” then the (3) the nodal current analysis flows through the branch “N” having an impedance, \(Z_{ij} = R_{ij} + jX_{ij}\) connected between “i” and “j” is given as,

$$I_{ij} = \frac{{\left( {V_{i} \angle \delta_{i} - V_{j} \angle \delta j} \right)}}{{R_{ij} + jX_{ij} }}$$
(3)

and

$$I_{ij} = \frac{{\left( {P_{i} - jQ_{i} } \right)}}{{V_{i} \angle - \delta_{i} }}$$
(4)

From Eqs. (3) and (4) the voltage at bus “j” can be written as the following formula,

$$V_{j} = \left[ {V_{i}^{2} - 2*\left( {P_{i} R_{ij} + jQ_{i} X_{ij} } \right) + \left( {R_{ij}^{2} + X_{ij}^{2} } \right)*\frac{{\left( {P_{i}^{2} + Q_{i}^{2} } \right)}}{{V_{i}^{2} }}} \right]^{0.5}$$
(5)

The magnitude and the phase angle equations can be used, respectively, in (2) a forward sweep direction to get the voltage and angle of all nodes of the radial distribution grid. The active and reactive power losses of line “N” between buses “i” and “j” can be evaluated as,

$$P_{Loss(ij)} = R_{ij} \frac{{\left( {P_{ij}^{2} + Q_{ij}^{2} } \right)}}{{V_{i}^{2} }}$$
(6)
$$Q_{Loss(ij)} = X_{ij} \frac{{\left( {P_{ij}^{2} + Q_{ij}^{2} } \right)}}{{V_{i}^{2} }}$$
(7)

The formulation of the total active power losses of RDN can be written as,

$$P_{TLoss} = \sum\limits_{j = 1}^{N} {P_{Loss(ij)} }$$
(8)

Therefore, the total active energy loss can be derived from,

$$E_{TLoss} = P_{TLoss} T_{h}$$
(9)

2.2 Power loss calculation with SCB

After locating SCB in the distribution network, the power losses through a line section in Fig. 1 can be deduced as,

$$P_{SCB,Loss(ij)} = R_{ij} \frac{{\left( {P_{SCB(ij)}^{2} + Q_{SCB(ij)}^{2} } \right)}}{{V_{i}^{2} }}$$
(10)

The mathematical formula of the total power loss with SCB is written by (11),

$$P_{SCB,TLoss} = \sum\limits_{j = 1}^{N} {P_{SCB,Loss(ij)} }$$
(11)

Therefore, the formula of the total active energy loss can be derived by (12),

$$E_{SCB,TLoss} = T_{h} P_{SCB,TLoss}$$
(12)

2.3 Power loss index

The ratio of total power loss with SCB to the total base power loss without SCB is deemed as the power loss index \(\Delta Pl_{SCB}\) and is estimated as follows,

$$\Delta Pl_{SCB} = \frac{{P_{SCB,TLoss} }}{{P_{TLoss} }}$$
(13)

The installation of SCB reduced the total power losses in the network. According to (13), the minimizing of the total network power losses can be realized by minimizing \(\Delta Pl_{SCB}\).

2.4 Voltage deviation index

The voltage deviation index \(\Delta V_{Dev}\) can be expressed as,

$$\Delta V_{Dev} = max\left( {\frac{{V_{1} - V_{i} }}{{V_{1} }}} \right),\quad \forall \;i = 1,2, \ldots ,nb\,(No.\;of\;buses)$$
(14)

2.5 Minimization of operational cost

The operational cost minimization is provided as one of the SCB location advantages in the distribution networks. The operational cost is proposed in two components. The first one is considered as the active energy supplied from the substation. The second component is the cost of installation and sizing of SCB that are located. The total operating cost (TOC) can be written by (15),

$$TOC = K_{e} E_{SCB,TLoss} + \left[ {K_{SCB} \sum\limits_{j}^{J} {Q_{j}^{c} + K_{b} K_{f} } } \right]$$
(15)

The capacitor size \(Q_{j}^{c}\) kVAr is considered as a discrete value by step of 50 kVAr that placed at the jth location. The net operating cost \(\Delta OC\) that represents as cost index is considered as the ratio between TOC with SCB and \(TOC_{base}\) before installing SCB can be minimized as in the following:

$$\Delta OC = \frac{TOC}{{TOC_{base} }}$$
(16)

2.6 Objective function

The objective function in this article is represented as Voltage-Loss-Cost Index (VLCI) multi-objective function approach for minimizing the power loss, voltage deviation, and total operating cost of the distribution network. It is formulated by the following:

$$Minimize\left( {VLCI} \right) = min\left( {\lambda_{1} \Delta V_{Dev} + \lambda_{2} \Delta Pl_{SCB} + \lambda_{3} \Delta OC} \right)$$
(17)

where

$$\sum\limits_{k = 1}^{3} {\lambda_{k} = 1.0} \quad \wedge \;\lambda_{k} \in [0,1]$$
(18)

This objective function is minimized depending on the following constraints:

  1. A.

    The voltage at each bus \(V_{i}\) in radial system must be kept within the acceptable maximum \(V_{max}\) and minimum \(V_{min}\) limits, as the following,

    $$V_{min} \le V_{(i)} \le V_{max}$$
    (19)
  2. B.

    The limits of voltage drop,

    $$\left| {V_{1} - V_{i} } \right| \le \Delta V_{D}^{max}$$
    (20)
  3. C.

    The largest capacitor size \(Q_{c}^{max}\) is limited to the total load reactive power \(Q_{Load}^{T}\) with keeping the system power factor within lagging values as,

    $$Q_{c}^{max} \le Q_{Load}^{T}$$
    (21)
  4. D.

    Overall system power factor \(PF_{overall}\) should be kept within desirable lower \(PF_{min}\) and upper \(PF_{max}\) limit to maintain the system PF within lagging values and injecting the leading one as,

    $$PF_{min} \le PF_{overall} \le PF_{max}$$
    (22)
  5. E.

    The apparent power line flow “S” through the lines is limited by its maximum rating as,

    $$S_{l(i)} \le S_{l(i)}^{rated}$$
    (23)

3 Sensitivity factors analysis

Loss sensitivity factor (LSF) is implemented to estimate the most candidate buses for the SCB installations. A distribution line connected between “i” and “j” buses and a load of \(P_{j,eff} + jQ_{j,eff}\) are performed as the total effective active and reactive power supplied beyond bus “j” as seen in Fig. 1. Therefore, the active power losses through lines beyond bus “j” can be derived as,

$$P_{lineloss(ij)} = R_{ij} \frac{{\left( {P_{j,eff}^{2} + Q_{j,eff}^{2} } \right)}}{{V_{j}^{2} }}$$
(24)

The loss sensitivity factor (\(LSF_{(ij)}\)) can be formulated by submitting the first derivative of \(P_{lineloss(ij)}\) in (24) with respect to the reactive power load \(Q_{j,eff}\) as in the following:

$$LSF_{(ij)} = \frac{{\partial P_{lineloss} }}{{\partial Q_{j,eff} }} = \frac{{2*Q_{j,eff} *R_{ij} }}{{V_{j}^{2} }}$$
(25)

The voltage sensitivity factor (VSF) is formulated by the ratio of the base case voltage magnitudes at buses V(i) to the minimum limit of voltage (0.95 p.u.). The results of LSF are sorted (from largest to smallest values) in descending order for all the lines of the given system depending on VSF values [3]. The buses with largest values of LSF and smallest values of VSF are chosen as the critical buses for capacitors position. The VSF is chosen to be < 1.01 to increase the possibilities of choosing the most candidate buses for SCB placement [3].

4 A hybrid PSOGSA optimization algorithm

A new hybrid PSOGSA is implemented with the amalgamation of PSO and GSA [19]. In PSO, Eberhart Kennedy [24, 25] provided PSO that is deemed as an evolutionary technique. The PSO is insufflated from the social attitude of bird flocking. However, it employs several particles as candidate decisions that fly around in the search space to detect the best solution. To modify and update the sitting of each particle in PSO, it must be done based on the current velocity and position in addition to the distances of pbest and gbest.

The mathematical formulation of PSO can be submitted as the following [19],

$$\nu_{it}^{1 + ti} = w*\nu_{it}^{ti} + c_{1} *r_{1} \left[ {pbest_{it}^{ti} - x_{it}^{ti} } \right] + c_{2} *r_{2} \left[ {gbest_{it}^{ti} - x_{it}^{ti} } \right]$$
(26)
$$x_{it}^{1 + ti} = x_{it}^{ti} + \Delta t*\nu_{it}^{ti + 1}$$
(27)

where \(\nu_{it}^{ti}\) and positive constants “c1 and “c2 are the acceleration constants that are responsible for varying the particle speed toward pbest and gbest, respectively. Equation (27) produced the position update, depending on its previous position and its velocity, considering ∆t = 1. Equation (26) consists of three parts; first part presents exploration ability of PSO. Second and third parts are deemed as private thinking and cooperation of particles, respectively [19]. In (26), after evaluating velocities, the position of masses can be provided by (27). The iteration of the process will continue updating the particles’ placement till achieving the PSO its objective.

In GSA, Rashedi et al. [18] structured GSA as a modern heuristic optimization tool. Theory of this technique is produced from Newton’s gravitational force behavior that is called “action at a distance” [18, 19] and [26].

GSA can be implemented as a hybrid of agents “elected solutions” that have masses proportional directly to their value of fitness function. These masses are enticed between each other during generations. During the masses processes, the heavier masses that have a huge attraction force are possibly within easy reach the global optimum attracts other masses proportional directly to their distances.

For proposing GSA arithmetically, it is suggested that the system begins with randomly “Na” agents that are realized in the search space. The gravitational force is acquainted from k to l at time “t” as follows [18],

$$F_{lk}^{d} (t) = G(t)\frac{{M_{pl} (t)*M_{ak} (t)}}{{R_{lk} (t) + \varepsilon }}\left( {x_{k}^{d} (t) - x_{l}^{d} (t)} \right)$$
(28)

The gravitational constant is formulated as,

$$G(t) = G_{o} *\exp ( - \,\alpha *iter/maxitare)$$
(29)

The total force, which effects on agent l, is deduced as,

$$F_{l}^{d} (t) = \sum\limits_{k = 1,l \ne k}^{{N_{a} }} {r_{k} F_{lk}^{d} (t)}$$
(30)

The agent acceleration is concluded according to the law of motion by (31),

$$ac_{l}^{d} (t) = \frac{{F_{l}^{d} (t)}}{{M_{l} (t)}}$$
(31)

The velocity and position of agents are derived by (32) and (33),

$$vel_{l}^{d} (t + 1) = r_{l} *vel_{l}^{d} (t) + ac_{l}^{d} (t)$$
(32)
$$x_{l}^{d} (t + 1) = x_{l}^{d} (t) + vel_{l}^{d} (t + 1)$$
(33)

The GSA process is worked according to the previous equations from (29) to (33), and then it will be finished until amounting to the end of its criterion.

In this article and according to Mirjalili in Ref. [19], the PSO and GSA are hybridized based on the low-level co-evolutionary heterogeneous combination. The big merit in this modern mechanism is that the hybridized techniques run in parallel with each other. The basic connotation of PSOGSA is to incorporate the ability of social thought in PSO (gbest) with the local search capability (acceleration of all agents) of GSA \(ac_{l} (t)\). Agents here are deemed as SCB sizes “\(P_{SCB(j)}\)” that can be estimated according to the following formula:

$$V_{l} (t + 1) = w*V_{l} (t) + c_{1}^{{\prime }} *r*ac_{l} (t) + c_{2}^{{\prime }} *r*\left( {gbest - X_{l} (t)} \right)$$
(34)

where \(V_{l} (t)\) is the velocity,\(c_{1}^{{\prime }}\), \(c_{2}^{{\prime }}\), and \(w\) are considered as weighting factors. The positions of these particles (agents) are updated according to the following equation:

$$X_{l} (t + 1) = X_{l} (t) + V_{l} (t + 1)$$
(35)

These positions are deemed as the SCB allocations.

In this paper, the PSOGSA operates according to the following steps:

  1. A.

    Run the power flow program BFS without applying optimization algorithm and evaluate the voltage at each bus, system total active power losses, and LSFs depending on VSF to deduce the candidate buses.

  2. B.

    Run the optimization algorithm PSOGSA with the power flow BSF based on the Eqs. (28), (29), (30), (31), (32), (34), and (35) as the following processes [19]:

    1. 1.

      Generation of initial population,

    2. 2.

      Evaluation process of the fitness function for all agents,

    3. 3.

      Update the gravitational constant (G) and (gbest) for the population according to (28), (29), and (34),

    4. 4.

      Obtain M, forces, and accelerations for all agents according to (28), (29), (30), and (31),

    5. 5.

      According to Eqs. (34) and (35), update velocity and position,

    6. 6.

      Check if the proposed system meets end criterion, If “No,” repeat processes from “2” to “5.” If “Yes,” the program will be stopped and will go to the next step,

    7. 7.

      Type the results such as voltage at each bus, active and reactive power losses, \(E_{SCB,TLoss}\), \(TOC\), and VLCI.

5 Analysis of 111-bus of Moscow region distribution network

The measurements and analysis have been carried out for many distribution systems in Moscow region to define the power quality disturbances and then to mitigate and improve the problems of these systems with considering the Russian GOST standard [1]. This work is deemed as a project to enhance the power quality for Moscow distribution networks.

In Fig. 2, the 111-bus of Moscow region case study is shown. The measurement of this system is recorded over two-weeks; one week in summer and the other week in the winter season at the importantly loaded nodes. The rest of nodes are evaluated from the previous measurements.

Fig. 2
figure 2

111 nodes of radial distribution network (the PS bus is bus no. 1)

Figure 3 explains that the small screenshot of voltage profile with time at 6 load buses (at buses: 29, 34, 50, 56, 67, 111, and the primary substation bus “PS”) from all measurement nodes is presented as a case study in winter and in summer seasons. The primary substation bus “PS” was measured at medium voltage 6 kV, and the load buses were measured at low voltage 0.4 kV. As shown in Fig. 3, in the winter season, the voltage profile located below the standard limits which is selected as one of the power quality disturbances. In addition to, the summer season is located within the standard limit.

Fig. 3
figure 3

The measured voltage profile in the (a) winter and (b) summer

In Fig. 4, the measured profile of voltage at the loaded buses in the summer and in winter seasons of the proposed distribution network is introduced. In the winter, the voltage decreased remarkably below the standard limits (< 0.9 U, p.u.) at the loaded buses than in the summer that caused disturbances in the profile of voltage and increases the power losses and voltage drop of the distribution network. Therefore, in this article, the worst case from the measurements in winter season is provided to improve voltage profile, decrease voltage drop, and power losses by reactive power compensation depending on the optimal SCB.

Fig. 4
figure 4

The measured voltage profile at the loaded buses in the summer and winter seasons

6 Test Results

The proposed methodology using PSOGSA algorithm has been implemented via MATLAB package [27], which is installed in an Intel® Core™ i5-5200U CPU @ 2.20 GHz, 2.19 GHz with a set up memory of 6.00 GB and 64-bit operating system. The proposed methodology has been applied and tested on two IEEE standard RDNs: 33-bus [28] and 69-bus [29]. In addition, the suggested algorithm has been applied on the practical case study of Moscow Region RDN [1, 21]. The parameters definitions of the proposed methodology PSOGSA are introduced in Table 1, in addition to all system parameters. The numerical results illustrated the superiority of the proposed PSOGSA methodology as the following.

Table 1 The definition of used parameters

6.1 The results of 33-bus IEEE system

The suggested mechanism is applied on 33-bus IEEE radial distribution test system, which the rated voltage of this test model is 12.66 kV as shown in Fig. 5. The system data are given in [28]. The results of LSF and VSF are illustrated in Table 2. The PSOGSA selected the most critical buses from the first 10 rows of LSF that are 8, 13, and 30. In Table 3, the total power losses are reduced from initial value of 202.65–134.0725 kW, the minimum voltage is increased from 0.9131 to 0.94 p.u., the TOC is minimized from 106,510 to 78,418.506 $/year with maximizing the net savings to 26.3745%. Figure 6 shows the effect of compensated devices on voltage profile for the 33-bus system by PSOGSA optimization algorithms. The objective function (VLCI) convergence is illustrated in Fig. 7. In these regards, the computational time (CPU) required by the proposed scheme with the PSOGSA reached to the optimal solutions after 3 iterations is 2.32 s. Therefore, the system has high speed and performance to find the optimal solutions early. Table 4 illustrates the switched SCB at various load condition to validate the proposed algorithm. The fixed SCBs are 150 kVAr at Bus 13 and 600 kVAr at Bus 30 that required at light loads (50% loading). The switched SCBs are 450 kVAr at Bus 8, 300 kVAr at Bus 13, 900 kVAr at Bus 30 required at nominal loads (100% loading) and additional 150 kVAr at bus 8, 300 kVAr at Bus 13, 600 kVAr at Bus 30 switched SCB at heavy loads (150% loading). The superiority of PSOGSA is assured with high performance by realizing the lowest active power and energy losses and highest net saving in the case of fixed/switched SCB at the different loads condition.

Fig. 5
figure 5

The line diagram of IEEE 33-bus RDN

Table 2 The results of LSF and VSF of 33-bus distribution network
Table 3 The results of 33-bus distribution network
Fig. 6
figure 6

The effect of compensated devices on voltage profile for 33-bus IEEE system

Fig. 7
figure 7

The change of objective function (VLCI) with iterations number for 33-bus IEEE system

Table 4 The results of switched SCB at different loads condition for 33-bus radial distribution system

6.2 The results of 69-bus IEEE system

The PSOGSA is satisfied on 69-bus radial distribution test system, which the rated voltage of this test model is 12.66 kV and the schematic diagram of the tested network is presented in Fig. 8. The system data is available in [29]. The LSF and VSF results are shown in Table 5. The PSOGSA selected from the first 10 rows of LSF values only two buses for the optimal size of SCB, which they are 17 (300 kVAr) and 31 (1350 kVAr). The results from Table 6 are produced as the following: active power losses are decreased from 224.8948 kW to 145.2075 kW, the minimum voltage is improved from 0.9091 p.u. to 0.9330 p.u., the TOC is minimized from 118,202.184 $/year to 83,271 $/year with maximizing the net savings to 29.5520%. Although, the FPA method has the lowest total injected reactive power, the proposed PSOGSA as compared with the FPA method and other methods has the lowest active power and energy losses and has the highest net saving. Figure 9 illustrates the effect of compensated devices on voltage profile for the 69-bus system by the optimization methodology. The objective function (VLCI) convergence is illustrated in Fig. 10. In this regard, the computational time (CPU) required by the proposed scheme with the PSOGSA reached to the optimal solutions after 3 iterations is 3.30 s. Therefore, the system has high performance with a suitable speed to get the optimal solutions early. The PSOGSA has the highest performance and accuracy to get the capacitors allocation and sizing than other mechanisms and algorithms.

Fig. 8
figure 8

The schematic diagram of IEEE 69-bus RDN

Table 5 The results of LSF and VSF for 69-bus radial distribution system
Table 6 The results of 69-bus IEEE radial distribution system
Fig. 9
figure 9

The effect of compensated devices on voltage profile for 69-bus IEEE system

Fig. 10
figure 10

The change of objective function (VLCI) with iterations number for 69-bus IEEE system

To insure the proposed method validation, Table 7 shows the switched SCB at various load condition. The fixed SCB is 600 kVAr at Bus 61 that required at light loads (50% loading). The switched SCBs are 300 kVAr at Bus 17, 1350 kVAr at Bus 61 needed at nominal loads (100% loading) and additional 300 kVAr at Bus 17, 1350 kVAr at Bus 61 switched SCBs at heavy loads (150% loading). The robust of PSOGSA is insured with high quality by realizing the lowest active power and energy losses and highest net saving with fixed and switched SCB.

Table 7 The results of switched SCB at different loads condition for 69-bus radial distribution system

6.3 The practical case study 111-bus system of Moscow region results

The rated voltage of this test model is 6 kV, and the model data have been given in [1]. The schematic diagram of 111-bus Moscow region is shown in Fig. 2. The results of LSF are deduced in Fig. 11. The most candidate buses are as: {13, 15, 11, 16, 29, 20, 19, 9, 12, 14, 72, 17, 18, 22, 33, 70, 30, 21, 63, 32, 45, and 23}. The total active power losses 637.1711 kW, minimum voltage 0.7709 p.u. at bus 111, over all power factor 0.8200, and TOC 334,900 $/year are shown in Table 8. After applying the PSOGSA algorithm at nominal load condition, the most critical buses are {13, 32, and 72} as illustrated in Fig. 11 and Table 8. Also, the fixed and switched SCB are proposed at different load conditions. Figure 12 shows the effect of compensated devices on voltage profile of 111-bus system at nominal load condition. Figure 13 illustrates the convergence of the objective function (VLCI). The computational time (CPU) needed by the schematic methodology to reach the optimal solutions with 7 iterations is 25.15 s. From the results, the PSOGSA method proved its superiority to realize the optimal solutions for SCB in large RDN.

Fig. 11
figure 11

The values of LSF for 111-bus system of Moscow region

Table 8 The results of switched SCB at different loads condition for 111-bus radial distribution system
Fig. 12
figure 12

The effect of compensated devices on voltage profile for 111-bus distribution system

Fig. 13
figure 13

The change of objective function (VLCI) with iterations number for 111-bus of Moscow region

7 Statistical Evaluation of PSOGSA Algorithm

To evaluate and prove the performance of the PSOGSA algorithm, it is required to define a set of metrics that can be valuable for the evaluation. Table 9 has various quality metrics to evaluate the PSOGSA optimization algorithm. Such indexes contain; the relative error RE, mean absolute error (MAE), root-mean-square error (RMSE), standard deviation (STD), and median. These metrics measure the values of the best minimum value of objective function (\(VLCI_{\hbox{min} }\)) and the value of objective function at each time of run (\(VLCI_{i}\)) which is obtained by the optimization algorithm. In Table 9, (\(n_{r}\)) is the number of data-set groups (runs of power system). The parameters of each algorithm are set as the original references of the number of iterations (20) and the size of population (20). As well as, PSOGSA algorithm has been executed 30 times.

Table 9 Quality indexes employed for evaluating the performance of PSOGSA algorithm

Table 10 shows the performance evaluation of PSOGSA for different three systems. From this table, it is observed that PSOGSA has acceptable RMSE. Moreover, the STD demonstrates that the results do not change along the iterative process, which indicated the stability of the proposed algorithm.

Table 10 Performance evaluation of PSOGSA algorithm under different cases of Study “number of runs is 30”

The objective function (VLCI) convergence for the three systems over 30 times of run is illustrated in Figs. 14, 15, and 16. In this regard, the computational time (CPU) required by the proposed scheme with the PSOGSA reached to the optimal solutions in average after 3 iterations is 3.30 s as shown from figures. Therefore, the system has high performance with a suitable speed to get the optimal solutions early. The PSOGSA has the highest performance and accuracy to get the capacitors allocation and sizing than other mechanisms and algorithms.

Fig. 14
figure 14

The change of objective function (VLCI) with iterations number for 33-bus IEEE system over 30 times of run

Fig. 15
figure 15

The change of objective function (VLCI) with iterations number for 69-bus IEEE system over 30 times of run

Fig. 16
figure 16

The change of objective function (VLCI) with iterations number for 111-bus Moscow region over 30 times of run

8 Conclusion

This paper presents a strategy based on novel PSOGSA optimization methodology with LSFs to produce the optimal installations and sizing of SCBs in the different RDN. For power flow calculations, the Backward/Forward Sweep (BFS) algorithm is implemented. Moreover, the sensitivity factors are used to evaluate the most candidate buses that are needed for reactive power compensation to minimize the search space of the optimization algorithms. On the other hand, the proposed methodology PSOGSA is employed to find the optimal sizing of SCB and their locations from candidate buses of LSF. A novel VLCI is constructed as the main objective function to increase the robustness and superiority of the proposed mechanism reaching to the most optimum solutions. The proposed methodology has been tested on different radial distribution systems. In addition, the optimal allocation of fixed/switched SCB is achieved at different loading conditions. The results of the suggested scheme have been compared with other algorithms and mechanisms to insure its effectiveness. The concluded results as compared to other mechanisms prove that the suggested approach (PSOGSA) has a highest accuracy and superiority to overcome the problems of optimum siting and sizing of the SCBs in various distribution networks. It is shown that the upgrading in the profile of voltage, minimizing the active power and energy losses besides TOC of the network and the correction of power factor are sufficiently realized.