Keywords

12.1 Introduction

Reactive power compensation can be used for enhancing system power quality, reducing power loss, improving voltage profile, increasing power factor and network capacity and reliability, reducing power flow in feeder lines, and enhancing the network’s loadability and stability, as well as minimizing energy cost.

The most conventional devices that have been applied for reactive power compensation are capacitor banks which include the switched and fixed types, in addition to phase shifters and shunt reactor. D-FACTS devices have been incorporated in the distribution network for reactive power compensation. The main advantages of D-FACTS devices are fast response, fine controllable and continuous adjustment compared to conventional devices. Several types of D-FACTS devices have been presented for enhancing the performance of distribution networks such as DSTATCOM [1], UPQC [2] and Distribution Static Synchronous Series Compensator (DSSSC) [3].

Optimal allocation of such compensation devices is an important issue to maximize the benefits of these devices. Several techniques have been presented for solving the optimal allocation problem of compensation devices in distribution networks such as analytical techniques, numerical programming techniques, heuristic techniques and artificial intelligence techniques [4]. The analytical methods are based on calculus analytical approaches to determine the maximum of a certain objective function, and the shortage of these methods is the obtained capacitor sizes aren’t matched with the standard sizes hence the solution is rounded up to standard capacitor sizes which may lead to overvoltage or less loss saving [5,6,7]. The numerical programming techniques are iterative optimization approach that can be applied to determine the optimal size and locations of compensation devices [8,9,10,11]. It should point out that the obtained results using these methods are more accurate compared to the analytical methods, but these techniques could be trapped in local optimal solution. Heuristic techniques are applied for minimizing the search space of optimization techniques where heuristic techniques are based on determining the most candidate nodes for reactive power compensation using sensitivity analysis [12]. Recently, artificial intelligence (AI) techniques are widely used for solving the allocation problem of compensation devices in distribution networks. Most of AI techniques are inspired from the natural phenomena behaviors. The AI methods can be applied to the nonlinear and complex problems.

This chapter introduces an application of Grasshopper Optimization Algorithm (GOA) for solving problem allocation of compensators in distribution network where GOA is employed to determine the optimal placement of shunt capacitor banks for minimizing the total cost (energy loss cost along with capacitor cost) moreover GOA is applied for assigning the optimal location and size of DSTATCOM for minimizing the total loss, improving the voltage profile and enhancing the voltage stability simultaneously.

12.2 Operation Principles of Distributed Compensators

The fixed and switched capacitor types are the most common devices that have been incorporated for reactive power compensation. Different FACTS devices are implemented for changing the parameters of network such as; transmission line impedance, the bus voltage, the active and reactive power through networks for enhancing the performance of electric systems [13, 14]. FACTS devices can be classified as: (a) series members such as Thyristor Controlled Series Capacitor (TCSC) and Static Synchronous Series Compensator (SSSC) (b) Shunt connected devices include Static VAR Compensator (SVC), Static Synchronous Compensator (STATCOM) and (c) Combined shunt-series controllers like Interline Power Flow Controller (IPFC) and Generalized Unified Power Flow Controller (GUPFC) [15,16,17,18].

12.2.1 Shunt Capacitor

The power flow equations of distribution system can be obtained from Fig. 12.1 as

Fig. 12.1
figure 1

Single line diagram of a radial distribution network

$$P_{n + 1} = P_{n} - P_{L,n + 1} - R_{n} \left( {\frac{{P_{n}^{2} + jQ_{n}^{2} }}{{\left| {V_{n} } \right|^{2} }}} \right)$$
(12.1)
$$Q_{n + 1} = Q_{n} - Q_{Ln + 1} - X_{n} \left( {\frac{{P_{n}^{2} + jQ_{n}^{2} }}{{\left| {V_{n} } \right|^{2} }}} \right)$$
(12.2)
$$V_{n + 1}^{2} = V_{n}^{2} - 2\left( {R_{n} P_{n} + X_{n} Q_{n} } \right) + \left( {R_{n}^{2} + X_{n}^{2} } \right)\left( {\frac{{P_{n}^{2} + jQ_{n}^{2} }}{{\left| {V_{n} } \right|^{2} }}} \right)$$
(12.3)

where

\(P_{n} ,Q_{n}\) :

Real and reactive power flows into the receiving end of branch n + 1 connecting bus n and node n + 1.

\(R_{n} ,X_{n}\) :

Resistance and reactance of the line section between buses n and n + 1.

\(V_{n}\) :

The bus voltage magnitude at bus n

The active and reactive power loss of the nth line between buses n and n + 1 are given as

$$P_{{loss\left( {n,n + 1} \right)}} = R_{n} \left( {\frac{{P_{n}^{2} + jQ_{n}^{2} }}{{\left| {V_{n} } \right|^{2} }}} \right)$$
(12.4)
$$Q_{{loss\left( {n,n + 1} \right)}} = X_{n} \left( {\frac{{P_{n}^{2} + jQ_{n}^{2} }}{{\left| {V_{n} } \right|^{2} }}} \right)$$
(12.5)

The system security level can be realized using the voltage stability index [19] as

$$VSI_{{\left( {n + 1} \right)}} = \left| {V_{n} } \right|^{4} - 4\left( {P_{n + 1} X_{n} - Q_{n + 1} R_{n} } \right)^{2} - 4\left( {P_{n + 1} X_{n} + Q_{n + 1} R_{n} } \right)\left| {V_{n} } \right|^{2}$$
(12.6)

where \(VSI_{{\left( {n + 1} \right)}}\) is the voltage stability index at bus n + 1. Enhancing the voltage profile depends upon minimizing the voltage deviations as

$$VD = \sum\limits_{n = 1}^{k} {\left( {V_{n} - V_{ref} } \right)}^{2}$$
(12.7)

where \(k\) is a number of buses and \(V_{ref}\) is the reference voltage that commonly equals to 1 pu.

The capacitor banks are included in distribution systems for enhancing the power quality and minimizing the total cost by injecting reactive power into the systems. Figure 12.2 illustrates a shunt capacitor that is incorporated at bus n + 1 and the reactive power through the transmission line is given as

Fig. 12.2
figure 2

Radial distribution system with a shunt capacitor

$$Q_{n + 1} = Q_{n} - Q_{Ln + 1} - X_{n} \left( {\frac{{P_{n}^{2} + jQ_{n}^{2} }}{{\left| {V_{n} } \right|^{2} }}} \right) + Q_{C,n + 1}$$
(12.8)

12.2.2 Distributed Static Compensator (DSTATCOM)

New members of FACTS controllers have been emerged due to progress of power electronic devices. DSTATCOM is a developed controller based on voltage source converter (VSC). DSTATCOM can inject or absorb both active and reactive power at a point of coupling connection (PCC) by injecting a variable magnitude and phase angle voltage at PCC. DSTATCOM is incorporated in electric systems for enhancing the power quality, improving the power factor, balancing the loading, mitigating the harmonic, reactive power compensation, reducing the power fluctuations of photovoltaic units minimizing the voltage sag, mitigating the flicker in the electric system and minimizing the power loss [20,21,22,23].

DSTATCOM consists of voltage source converter, dc bus capacitor, ripple filter and coupling transformer as shown in Fig. 12.3. VSC is constructed by using insulated gate bipolar transistors (IGBT) and MOSFET where the switching of component is based on pulse-width modulation (PWM) sequences. The coupling transformer is utilized for matching the inverter voltage with the bus voltage. The DSTATCOM topologies are categorized based on three-phase three-wire (3P3 W) and three-phase four-wire (3P4 W) as illustrated in [24].

Fig. 12.3
figure 3

Schematic diagram of DSTATCOM device

DSTATCOM has an ability to exchange active and reactive current with the network. A steady state modeling DSTATCOM has been presented in [25].

Figure 12.4 shows DSTATCOM controller which included in the radial distribution system at bus n + 1 where DSTATCOM inject or absorb \(I_{D}\) at this bus. By applying KVL, the voltage at bus n + 1 can be obtained as

Fig. 12.4
figure 4

Radial distribution system with DSTATCOM

$$V_{n + 1} \angle \theta_{n + 1} = V_{n} \angle \theta_{n} - \left( {R_{n} + jX_{n} } \right)\left( {I_{n} \angle \delta + I_{D} \angle \left( {\theta_{n + 1} + \frac{\pi }{2}} \right)} \right)$$
(12.9)

where

\(V_{n + 1} \angle \theta_{n + 1}\) :

Voltage of bus n + 1 after inclusion DSTATCOM.

\(I_{D}\) :

The injected current by DSTATCOM.

\(I_{n}\) :

The line current after inclusion of DSTATCOM

Equation (12.9) represents the essential idea for modeling DSTATCOM which can be solved by separating it to real and imaginary terms as

$$V_{n + 1} {\text{Cos}}(\theta_{n + 1} ) = Re\left( {V_{n} \angle \theta_{n} } \right) - Re\left( {I_{n} \angle \delta \left( {R_{n} + jX_{n} } \right)} \right) + X_{n} I_{D} {\text{Sin}}\left( {\theta_{n + 1} + \frac{\pi }{2}} \right) - R_{n} I_{D} {\text{Cos}}\left( {\theta_{n + 1} + \frac{\pi }{2}} \right)$$
(12.10)
$$V_{n + 1} {\text{Sin}}(\theta_{n + 1} ) = Im\left( {V_{n} \angle \theta_{n} } \right) - Im\left( {I_{n} \angle \delta \left( {R_{n} + jX_{n} } \right)} \right) - X_{n} I_{D} {\text{Cos}}\left( {\theta_{n + 1} + \frac{\pi }{2}} \right) - R_{n} I_{D} Sin\left( {\theta_{n + 1} + \frac{\pi }{2}} \right)$$
(12.11)

Equations (12.10) and (12.11) can be simplified as

$$a{\text{Cos}}x_{2} = k_{1} - b_{1} x_{1} {\text{Sin}}x_{2} - b_{2} x_{1} {\text{Cos}}x_{2}$$
(12.12)
$$a{\text{Sin}}x_{2} = k_{2} - b_{2} x_{1} {\text{Sin}}x_{2} + b_{1} x_{1} {\text{Cos}}x_{2}$$
(12.13)

where

$$k_{1} = Re\left( {V_{n} \angle \theta_{n} } \right) - Re\left( {I_{n} \angle \delta \left( {R_{n} + jX_{n} } \right)} \right)$$
$$k_{2} = Im\left( {V_{n} \angle \theta_{n} } \right) - Im\left( {I_{n} \angle \delta \left( {R_{n} + jX_{n} } \right)} \right)$$
$$a = V_{n + 1}$$
$$b_{1} = - R_{n}$$
$$b_{2} = - X_{n}$$
$$x_{1} = I_{D}$$
$$x_{2} = \theta_{n + 1}$$

Equations (12.12) and (12.13) can be rewritten as

$$x_{1} = \frac{{a{\text{Cos}}x_{2} - k_{1} }}{{ - b_{1} {\text{Sin}}x_{2} - b_{2} {\text{Cos}}x_{2} }}$$
(12.14)
$$x_{1} = \frac{{a{\text{Sin}}x_{2} - k_{2} }}{{ - b_{2} {\text{Sin}}x_{2} + b_{1} {\text{Cos}}x_{2} }}$$
(12.15)

Solving (12.14) and (12.15) yields

$$\left( {k_{1} b_{2} - k_{2} b_{1} } \right){\text{Sin}}x_{2} + \left( { - k_{1} b_{1} - k_{2} b_{2} } \right){\text{Cos}}x_{2} + ab_{1} = 0$$
(12.16)

The previous equation can be simplified as

$$\left( {d_{1}^{2} + d_{2}^{2} } \right)x^{2} + \left( {2d_{1} ab_{1} } \right)x + \left( {a^{2} b_{1}^{2} - d_{2}^{2} } \right) = 0$$
(12.17)

where

$$x = Sin\left( {x_{2} } \right)$$
$$d_{1} = \left( {k_{1} b_{2} - k_{2} b_{1} } \right)$$
$$d_{2} = \left( { - k_{1} b_{1} - k_{2} b_{2} } \right)$$

Hence, (12.17) can be solved as

$$x = \frac{{ - B \pm \sqrt {B^{2} - 4AC} }}{2A}$$
(12.18)

where

$$A = \left( {d_{1}^{2} + d_{2}^{2} } \right)$$
$$B = \left( {2d_{1} ab_{1} } \right)$$
$$C = \left( {a^{2} b_{1}^{2} - d_{2}^{2} } \right)$$

Hence

$$\theta_{n + 1} = {\text{Sin}}^{ - 1} \left( x \right)$$
(12.19)

The value of \(I_{D}\) can be obtained from (12.14) or (12.15). The voltage at PCC, the DSTATCOM current and injected reactive power by DSTATCOM can be found as

$$\overrightarrow {{V_{n + 1} }} = V_{n + 1} \angle \theta_{n + 1}$$
(12.20)
$$\overrightarrow {{I_{D} }} = I_{D} \angle \left( {\theta_{n + 1} + \frac{\pi }{2}} \right)$$
(12.21)
$$Q_{D} = Im\left( {V_{n + 1} \angle \theta_{n + 1} \left( {I_{D} \angle \left( {\theta_{n + 1} + \frac{\pi }{2}} \right)} \right)^{*} } \right)$$
(12.22)

12.2.3 Unified Power Quality Conditioner (UPQC)

UPQC is a powerful controller that has applied for enhancing the power quality of the electric system where it has the ability to minimize the voltage sags, balance the system, mitigate the existed harmonics and minimizing the power loss, etc.

UPQC consists of two inverters on of these inverters is connected in series with a certain transmission line while the other converter is connected in shunt to the common bus. These inverters are combined thought dc linked bus. The inverters are connected to the network by coupling transformers as shown in as shown in Fig. 12.5 [26,27,28]. The main purpose of the series inverter is injecting an ac series voltage to system to mitigate the supply voltage flickers or imbalance from the load and forces the shunt branch to absorb harmonics generated by the nonlinear loads. The shunt converter is employed for delivering the reactive power compensation for improving the power factor correction in addition the shunt converter is used to mitigate of current distortions and adjusting the dc bus voltage. In other words, the series converter regulates the load voltage to be balanced and sinusoidal while the shunt converter ensures the balancing of system current and become sinusoidal (harmonic free). Several types of UPQC have produced which can be classified based on the converter topology or the supply system or UPQC configuration [28].

Fig. 12.5
figure 5

Schematic diagram of UPQC controller

Figure 12.5 shows the UPQC controller which included in the radial distribution system where the series controller is included between buses n, n + 1 while the shunt converter is connected at bus n + 1. It should highlight that the series injected voltage is kept in quadrature with current flow. In other words, the series and shunt current are kept in quadrature with the voltage of bus n + 1 [29]. Referring to Fig. 12.5, the voltage at bus n + 1 can be given as

$$V_{n + 1} \angle \theta_{n + 1} = V_{n} \angle \theta_{n} - \left( {R_{n} + jX_{n} } \right)\left( {I_{n} \angle \delta + I_{sh} \angle \left( {\theta_{n + 1} + \frac{\pi }{2}} \right)} \right) + V_{se} \angle \theta_{se}$$
(12.23)

where

\(V_{se}\) :

The magnitude of the series injected voltage.

\(\theta_{se}\) :

The phase angle of the injected voltage.

\(I_{n}\) :

The current flow through the transmission line.

\(I_{sh} \angle \left( {\theta_{n + 1} + \frac{\pi }{2}} \right)\) :

The injected current of the shunt converter

The injected current of the series converter can be found as

$$\overrightarrow {{I_{se } }} = \overrightarrow {{I_{n} }} + \overrightarrow {{I_{sh } }}$$
(12.24)

However, two equations are obtained by separating the real and imaginary part of (12.23). Three quantities are unknown \(\left( {V_{se} , \theta_{n + 1} , I_{sh} } \right)\). For solving this problem, it is assumed that the reactive shunt power by shunt converter is represented as the negative reactive load at bus n + 1 as shown in Fig. 12.6 [28].

Fig. 12.6
figure 6

Representation of UPQC in a distribution system

Referring to Fig. 12.6, the injected series voltage can be found as

$$V_{se} \angle \theta_{se} = V_{n + 1} \angle \theta_{n + 1} + Z_{n} \left( {\acute{I}_{n} \angle \acute{\delta }} \right) - V_{n} \angle \theta_{n}$$
(12.25)

where

$$\theta_{se} = \acute{\delta } + \frac{\pi }{2}\quad \acute{\delta } \le 0$$
(12.26)
$$\theta_{se} = \acute{\delta } - \frac{\pi }{2}\quad \acute{\delta } > 0$$
(12.27)

By separating the real and imaginary terms of (12.25) as

$$V_{se} { \cos }\left( {\theta_{se} } \right) = V_{n + 1} { \cos }(\theta_{n + 1} ) + Re\left( {Z_{n} \left( {\acute{I}_{n} \angle \acute{\delta }} \right)} \right) - Re\left( {V_{n} \angle \theta_{n} } \right)$$
(12.28)
$$V_{se} { \sin }\left( {\theta_{se} } \right) = V_{n + 1} { \sin }(\theta_{n + 1} ) + Im\left( {Z_{n} \left( {\acute{I}_{n} \angle \acute{\delta }} \right)} \right) - Im\left( {V_{n} \angle \theta_{n} } \right)$$
(12.29)

Equations (12.28) and (12.29) can be simplified as

$$V_{se} K_{1} = b_{3} { \cos }(\theta_{n + 1} ) + b_{1}$$
(12.30)
$$V_{se} K_{2} = b_{3} { \sin }(\theta_{n + 1} ) + b_{2}$$
(12.31)

where

$$x_{1} = V_{se}$$
$$x_{2} = \theta_{n + 1}$$
$$K_{1} = {\text{cos }}\left( {\theta_{se} } \right)$$
$$K_{2} = {\text{sin }}\left( {\theta_{se} } \right)$$
$$b_{1} = Re\left( {Z_{n} \left( {\acute{I}_{n} \angle \acute{\delta }} \right)} \right) - Re\left( {V_{n} \angle \theta_{n} } \right)$$
$$b_{2} = Im\left( {Z_{n} \left( {\acute{I}_{n} \angle \acute{\delta }} \right)} \right) - Im\left( {V_{n} \angle \theta_{n} } \right)$$
$$b_{3} = V_{n + 1}$$

Solving (12.30) and (12.31), the value of \(V_{se}\) can be given as

$$V_{se} = \frac{{ - B \pm \sqrt {B^{2} - 4AC} }}{2A}$$
(12.32)

where

$$A = \frac{{k_{1}^{2} + k_{2}^{2} }}{{b_{3} }}$$
$$B = - 2 \times \frac{{K_{1} b_{1} + K_{2} b_{2} }}{{b_{3} }}$$
$$C = \frac{{b_{1}^{2} + b_{2}^{2} }}{{b_{3} }}$$

The value of \(\theta_{n + 1}\) can be obtained from (12.30) or (12.31) as

$$\theta_{n + 1} = { \cos }^{ - 1} \left( {\frac{{K_{1} x_{1} - b_{1} }}{{b_{3} }}} \right)$$
(12.33)
$$\theta_{n + 1} = { \sin }^{ - 1} \left( {\frac{{K_{2} x_{1} - b_{2} }}{{b_{3} }}} \right)$$
(12.34)

The reactive power of series compensator can be found as

$$Q_{series} = Im\left( {V_{n + 1} \angle \theta_{n + 1} \left( {\acute{I}_{n} \angle \acute{\delta }} \right)^{*} } \right)$$
(12.35)

12.3 Optimization Techniques

Recently, the several optimization techniques are widely applied to determine the optimal sizes and locations of compensation device in distribution networks. Variety of optimization techniques have been proposed based on nature-swarm inspired methods, human-inspired methods, physics inspired methods and evolutionary inspired algorithms. In this section, a survey including the previous techniques for solving the allocation problem of compensation devices is presented. Table 12.1 shows an overview of application the optimization techniques in radial distribution systems.

Table 12.1 Summary of the literature review regarding compensation devices placement problem

12.4 Problem Formulation

12.4.1 Capacitor Allocation Problem Formulation

The objective of optimal capacitor placement problem of the radial distribution system is minimizing the total cost including the energy loss cost along with capacitor cost. The objective function can be formulated as

$$Minimize\quad Cost = K_{p} P_{ loss} + \sum\limits_{i = 1}^{nc} {K_{c,i} Q_{c,i} }$$
(12.36)

where

\(Cost\) :

The total cost

\(P_{ loss}\) :

The total active power loss (kW)

\(Q_{c}\) :

The capacitor reactive power (kVar)

\(K_{p}\) :

The annual cost of energy losses

\(K_{c}\) :

The cost of capacitor per kVar

12.4.2 DSTATCOM Allocation Problem Formulation

The objective of optimal placement problem of DSTATCOM in the radial distribution system is minimizing the total loss, improving the voltage profile and enhancing the voltage stability index simultaneously as

$$f_{1} = \frac{{\sum\nolimits_{i = 1}^{nl} {\left( {P_{loss} \left( i \right)} \right)_{after\,DSTATCOM} } }}{{\sum\nolimits_{i = 1}^{nl} {\left( {P_{loss} \left( i \right)} \right)_{before\,DSTATCOM} } }}$$
(12.37)
$$f_{2} = \frac{{\sum\nolimits_{i = 1}^{nb} {\left( {\left| {V\left( i \right) - V_{ref} } \right|} \right)_{after\,DSTATCOM} } }}{{\sum\nolimits_{i = 1}^{nl} {\left( {\left| {V\left( i \right) - V_{ref} } \right|} \right)_{before\,DSTATCOM} } }}$$
(12.38)
$$f_{3} = \frac{1}{{\sum\nolimits_{i = 1}^{nb} {\left( {\left| {VSI\left( i \right) } \right|} \right)_{after\,DSTATCOM} } }}$$
(12.39)

where \(nl\) is the number of branches in electric distribution network while \(nb\) is the number of buses in the network.

12.4.3 System Constraints

The required objective functions are subjected to equality and inequality constraints related to electric distribution network which can be represented as

  • Equality constraints

The equality constraints of the system are the active and reactive power flow constraints which can be obtained as

$$P_{slack} = \sum\limits_{i = 1}^{n} {P_{L} \left( i \right)} + \sum\limits_{j = 1}^{nb} {P_{ loss} \left( j \right)}$$
(12.40)
$$Q_{slack} + \sum\limits_{i = 1}^{nc} {Q_{c} \left( i \right)} = \sum\limits_{i = 1}^{n} {Q_{L} \left( i \right)} + \sum\limits_{j = 1}^{nb} {Q_{ loss} \left( j \right)}$$
(12.41)

where \(P_{slack}\) and \(Q_{slack}\) are active power and reactive powers supplied from the slack bus, respectively. \(P_{L}\) and \(Q_{L}\) are the active and reactive load demands respectively. \(nb\) is the number of branches in the network while \(nc\) is the number of compensation units.

  • Inequality constraints

  1. I.

    Bus voltage constraints

    $$V_{min} \le V_{i} \le V_{max}$$
    (12.42)

where \(V_{min}\) and \(V_{max}\) are the minimum and the maximum allowable bus voltage limit.

  1. II.

    Total reactive power constraint

Practically, the total injected reactive power using compensation devices is equal to or less than the reactive load demand.

$$\sum\limits_{i = 1}^{nc} {Q_{c} \left( i \right)} \le \sum\limits_{i = 1}^{n} {Q_{L} \left( i \right)}$$
(12.43)

where \(Q_{L}\) is the reactive load at a certain bus and \(Q_{c}\) is compensator reactive power.

  1. III.

    Thermal limit

The current flow through network branches must be within their allowable limits as

$$I_{n,i} \le I_{max,i} \quad i = 1,2,3 \ldots Nb$$
(12.44)

Nb is the number of branches in the distribution system.

12.5 Overview of Grasshopper Optimization Algorithm (GOA)

GOA is a new optimization technique that is inspired form the movement and migration of grasshopper in natural. The adult insects of grasshopper travel together over long distance which mimics exploration of optimization technique while the nymphs have no wings, so it move in small area which mimics the exploitation of optimization technique [72].

Grasshoppers are harmful insects that can destroy a wide area of the agriculture and crops where the grasshoppers swarm consist of million members which can cover a wide area up to 1000 km. The life cycle of Grasshopper consists of three stages as depicted in Fig. 12.7. The grasshopper can be found in two phases. In the first phase the individual of grasshoppers avoids interaction together (solitary phase) while in the other phase (gregarious phase), grasshoppers became sociable and form a swarm. The swarm became a flying swarm depends upon environmental consideration such as air temperature, sunshine and wind speed [73].

Fig. 12.7
figure 7

The life cycle of grasshopper

The swarm of grasshopper moves in rolling motion where groups are formed in ground firstly by a collection of individuals of insects which move in the ground or locally and short flight then these groups became coordinated together, and the insects share a common spatial orientation. The behavior of grasshopper swarm can be summarized as

  1. (1)

    The swarm flies with downwind.

  2. (2)

    The grasshoppers in front of swarm settle on the ground.

  3. (3)

    The settled insects start eating and resting.

  4. (4)

    The swarm starts taking of gain to altitude.

The grasshopper swarm navigation behavior aligned the wind is depicted in Fig. 12.8.

Fig. 12.8
figure 8

Motion of grasshopper swarm aligned with wind

The grasshopper swarm behavior depends upon the social interaction between a grasshopper, the gravity force and the downwind advection. Hence mathematical behavior can be represented as [74]:

$$X_{i} = r_{1} A_{i} + r_{2} B_{i} + r_{3} C_{i}$$
(12.45)

where

\(X_{i}\) :

The position of ith grasshopper

\(A_{i}\) :

The social interaction

\(B_{i}\) :

The gravity force on the ith grasshopper

\(C_{i}\) :

Wind advection

\(r_{1} ,r_{2} , r_{3}\) :

Random numbers

A social forced between two grasshoppers is established biologically where the repulsion forces are existed in order to prevent collisions over a short length scale and attraction force is existed for aggregation. The social interaction between grasshoppers can define as

$$A_{i} = \sum\limits_{{\begin{array}{*{20}c} {j = 1} \\ {i \ne j} \\ \end{array} }}^{N} {s\left( {Dis_{ij} } \right)\left( {\frac{{x_{i} - x_{j} }}{{Dis_{ij} }}} \right)}$$
(12.46)

where \(Dis_{ij}\) is the distance between i and j grasshoppers that equals to \(Dis_{ij} = \left| {{\text{x}}_{\text{i}} - {\text{x}}_{\text{j}} } \right|\) and the s function represents the social forces which can be represented as

$$s\left( {Dis_{ij} } \right) = Fe^{{\frac{{Dis_{ij} }}{l}}} - e^{{Dis_{ij} }}$$
(12.47)

where \(F\) is the intensity of attractive force and \(l\) is the attractive length scale. The swarm motion is directly affected by the gravity force which can be found as

$$B_{i} = - g\overrightarrow {{e_{g} }}$$
(12.48)

where \(g\) is the gravitational constant and \(\overrightarrow {{e_{g} }}\) the unity vector towards the center of earth. The wind advection effect on the motion swarm

$$C_{i} = u\overrightarrow {{e_{w} }}$$
(12.49)

Substituting the value of \(A_{i}\), \(B_{i}\) and \(C_{i}\) from (12.46), (12.48) and (12.49) in (12.45) yields

$$X_{i} = \mathop \sum \limits_{{\begin{array}{*{20}c} {j = 1} \\ {i \ne j} \\ \end{array} }}^{N} s\left( {Dis_{ij} } \right)\left( {\frac{{x_{i} - x_{j} }}{{Dis_{ij} }}} \right) - g\overrightarrow {{e_{g} }} + u\overrightarrow {{e_{w} }}$$
(12.50)

The previous equation is modified to be implemented for optimization problems and for enhancing the capability global searching of the algorithm it can be modified as

$$X_{i}^{m} = C\left( {\sum\limits_{{\begin{array}{*{20}c} {j = 1} \\ {i \ne j} \\ \end{array} }}^{N} {C\left( {\frac{Upper\left( m \right) - Lower\left( m \right)}{2}} \right)s\left( {Dis_{ij} } \right)\left( {\frac{{x_{i} - x_{j} }}{{Dis_{ij} }}} \right)} } \right) + P_{best}^{m}$$
(12.51)

where \(Upper\left( . \right)\) and \(Lower\left( . \right)\) are the upper and lower limits of the control variable, respectively. \(P_{best}^{m}\) is the best position (the target position). C is an adaptive coefficient that decrease linearly for enhancing the search capability of GOA which can be represented as

$$C = C_{max} - T\frac{{C_{max} - C_{min} }}{{T_{max} }}$$
(12.52)

where \(C_{max}\), \(C_{min}\) are the maximum and the minimum values of \(C\), respectivly. \(T\) and \(T_{max}\) are the current iterations and the maximum iteration, respectively.

  • Step 1: Determine the input data of GOA algorithm including number of the search agents (N), maximum number of iterations,\(C_{min}\), \(C_{max}\), \(F\), \(L\) and the upper and lower boundaries of control variables.

  • Step 2: Initialize the population of GOA algorithm as

    $$P_{i}^{m} = Lower\left( {i,m} \right) + rand\text{ * }\left( {Upper\left( {i,m} \right) - Lower\left( {i,m} \right)} \right)$$
    (12.53)
  • Step 3: Calculate the fitness functions for each search agent.

  • Step 4: Determine the best position (target position) in term of the best fitness function.

  • Step 5: Update the position of search agent according to (12.51).

  • Step 6: Check the boundaries of the updated agents and bring the violated variable to accepted limit.

  • Step 7: Calculate the fitness function for the updated positions and determine the target position.

  • Step 8: Repeat steps form (12.5) to (12.7) until the stopping criterion is achieved (current iteration equals to maximum iteration).

  • Step 9: Obtain the optimal solution by capture the target position and the related fitness function.

12.6 Numerical Examples

In this section the grasshopper optimization technique is employed to determine the optimal locations and sizes of shunt capacitors and DSTATCOM in the 69-bus radial distribution network. The line diagram of the network is shown in Fig. 12.9. The network data are given in [75] which are also tabulated in Table 12.7. A program code for optimal allocation of compensators is written using MATLAB 2009a and run on a PC with core i5 processor, 2.50 GHz and 4 GB RAM. The selected parameters of GOA technique are listed in Table 12.2. The parameters required for implementation of the proposed algorithm are adjusted by 50 times running of this algorithm. The obtained results using the GOA algorithm are compared with compared with other well-known optimization algorithms such as; Grey Wolf Optimizer (GWO) [76], Sine Cosine Algorithm (SCA) [77] and other meta-heuristics techniques. The studied cases are presented as

Fig. 12.9
figure 9

The line diagram of the 69-bus system

Table 12.2 The selected parameters of GOA

12.6.1 Case 1

The GOA technique is applied for optimal allocation of the capacitor in the 69-bus network to minimize the total cost as described in (12.36). The sizes of capacitors are selected to be standard with the available industrial market. The available sizes and costs of capacitors are listed in Table 12.3. The Total active and reactive load demands are 3801.89 kW and 2694.1 kVar respectively. The substation voltage is 12.66 kV and the single line diagram. The system power loss without inclusion compensation devices equal to 225 kW and the total cost for the system without any capacitor is found to be 37,800.0 $. The optimal size of capacitors, their locations and the impact of optimal placement and sizing of capacitors on the energy loss cost, capacitor cost and total cost of the system by 50 run trials are given in Table 12.4. Moreover, the best, worst and mean obtained results by GOA also are listed in Table 12.4. The power loss decreased to 145.405 MW with incorporating capacitor banks optimally using GOA. Moreover, the value of total cost is enhanced to 24,820.84 $. From Table 12.5 it can also be found that the objective value found by the GOA technique is better than those obtained by the CSA [33], DSA [78], TLBO [58], GSA [2], GWO and SCA. This demonstrates that the GOA successfully achieves better simulation results than other techniques. The voltage profiles of all system buses are enhanced significantly with incorporating capacitor banks optimally using GOA as shown in Fig. 12.10. The average computational time taken by the GOA technique and the other techniques are reported in Table 12.4. It can be obvious that GOA needs less computational time compared with other reported techniques. The convergence characteristic of the GOA, GWO and SCA are depicted in Fig. 12.11. From the convergence graph, it may be observed that the objective value (total cost) converges and smoothly rapidly at the 15th iteration compared to GWO and SCA. This confirms the convergence reliability of the proposed GWO algorithm.

Table 12.3 Available capacitor size and related cost ($/kVar)
Table 12.4 Obtained results for the 69-bus test system using different optimization techniques
Table 12.5 Simulation results of the 69-bus system at different loadings
Fig. 12.10
figure 10

Effect of compensation on system voltages for the 69-bus system

Fig. 12.11
figure 11

Change of total cost with iterations for the 69-bus using GOA, GWO and SCA

12.6.2 Case2

In this case, GOA technique is employed to determine the optimal locations and sizes of DSTATCOMs in the 69-bus network for minimizing the total loss, improving the voltage profile and enhancing the voltage stability index simultaneously as described in (12.37), (12.38) and (12.39). Hence, in this case, the objective function is a multi-objective function which can be formulated as

$$f_{t } = w_{1} f_{1} + w_{2} f_{2} + w_{3} f_{3}$$
(12.54)

where \(w_{1}\), \(w2\) and \(w3\) are weighting factors. The value of any weighting factor is selected based on the relative important on its related objective function with others objective functions. The sum of the absolute values of the weight factors in (12.54) assigned to all impacts should add up to one as [79]

$$\left| {w_{1} } \right| + \left| {w_{2} } \right| + \left| {w_{3} } \right| = 1$$
(12.55)

In this chapter, \(w_{1}\) is set as 0.5 while \(w_{2}\) and \(w_{3}\) equal 0.25.It should point out that the constraint of injected reactive power of DSTATCOM is restricted as [1]

$$0 \le Q_{STATCOM } \le 10,000 KVAR$$
(12.56)
$$\sum\limits_{i = 1}^{nc} {Q_{STATCOM} \left( i \right)} \le \sum\limits_{i = 1}^{n} {Q_{L} \left( i \right)}$$
(12.57)

In this case, three DSTATCOM devices are included in the 69-bus system. The optimal locations and sizes of DSTATCOMs that have been determined using GOA, GWO and SCA, are listed in Table 12.5. It is obvious that the power loss is reduced to 145.146 and the summation of voltage deviations is also reduced from 1.8374 to 1.3872 p.u with incorporating of the DSTATCOMs optimally using GOA. Moreover, the voltage stability is also enhanced to 62.7759 p.u with inclusion of DSTATCOMs. From Table 12.6, it is clear that the obtained results by GOA are better than those obtained by GWO and SCA.

Table 12.6 Obtained results for optimal allocation of DSTATCOM using different optimization techniques