Keywords

1 Introduction

The main aim of solving an OPF problem is to find optimal setting of control variables that optimizes a certain objective function such as minimization of generators fuel cost, improvement of voltage profile, and enhancement of voltage stability under normal and contingency condition, etc., subject to satisfying various operating constraints and power balance equation. OPF problem formulation yields a highly nonlinear, multimodal, non-convex, non-differential objective function having continuous and discrete control variables, and it has been introduced by Carpentier in the early 1960s [1].

Nowadays, voltage instability problem is being faced, because generation and transmission capability expansion is unable to meet the load demand. At the same time, lack of reactive power sources in power system leads to bulk power losses in transmission lines. So, it is very important to consider voltage profile improvement and voltage stability improvement as the objectives of OPF problem.

To solve optimal power flow problem, several conventional optimization techniques like mixed integer programming, linear programming, nonlinear programming, interior point method, quadratic programming, and Newton-based methods were used. Because of the nonlinear, non-differential, multimodal, non-smooth, and non-convex nature of the problem, the traditional optimization techniques are not appropriate for solving optimal power flow problem [2, 3]. On the other hand, evolutionary computing (EC)-based techniques [4] do not have any such restrictions of objective functions and are able to solve any type of the optimization problem. These population-based random search optimization techniques are heuristic in nature which, though not assuring global optimality, are able to offer good near-optimal solutions within acceptable computation time.

In recent years, various EC-based techniques have been implemented to solve OPF problem. Some of these techniques are Dragonfly algorithm (DA) [5], genetic algorithm (GA) [6], linear adaptive genetic algorithm (LAGA) [6], particle swarm optimization [7], quasi-oppositional biogeography-based optimization (QOBBO) [8], chaotic krill herd algorithm (CKHA) [9], refined genetic algorithm (RGA) [10], glowworm swarm optimization (GSO) [11], league championship algorithm (LCA) [12], improved differential evolution-based approach (IDE) [13], modified differential evolution algorithm (MDE) [14], and many others.

The BS algorithm developed by Xin She Yang in 2010, is a heuristic algorithm, and has been inspired by echolocation characteristics of bats. Most of the bats species use a type of sonar called echolocation that guides them in their flying as well as in hunting even in complete darkness [15]. Bat search algorithm has been applied in this paper for solving OPF problem with the objectives of minimizing fuel cost and improving voltage profile and voltage stability. Effectiveness of the BS algorithm is tested on IEEE 30-bus system.

2 Problem Formulation

The optimal power flow problem considered in this paper is for minimizing fuel cost and improving voltage profile and voltage stability subject to various equality and inequality constraints [16] as discussed below.

2.1 Objective Function

In this paper, four different objective functions are considered for solving OPF problem. The objective functions are as follows:

  1. (a)

    Minimization of Generators’ Fuel cost

The first objective function, namely generators’ fuel cost minimization, can be expressed as:

$$F_{1} \left( {x,u} \right) = \mathop \sum \limits_{i = 1}^{\text{NGN }} f_{i} \left( {P_{{{\text{g}}_{\text{i}} }} } \right) \left( {\$ / {\text{h}}} \right)$$
(1)

The fuel cost equation can be written as:

$$f_{i} \left( {P_{{{\text{g}}_{\text{i}} }} } \right) = A_{i} + B_{i} P_{{{\text{g}}_{\text{i}} }} + C_{i} P_{{{\text{g}}_{\text{i}} }}^{2} \left( {\$ / {\text{h}}} \right)$$
(2)

where \(A_{i}\), \(B_{i}\), and \(C_{i}\) are the quadratic fuel cost coefficients of the ith generator.

  1. (b)

    Voltage profile improvement

The second objective function deals with minimization of voltage deviations at all the load (PQ) bus voltage from 1.0 p.u.

In Case 1, considering only fuel cost may provide feasible solution but poor voltage profile. So, in this case (Case 2) simultaneous minimization of fuel cost and improvement of voltage profile has been considered using twofold objective function as:

$${F}_{2} \left( {x},{u} \right) = \mathop \sum \limits_{{{i} = 1}}^{\text{NGN }} {f}_{i} \left( . \right)\$ /{\text{h}} + {\alpha }_{\text{VD}} \mathop \sum \limits_{{{i} \in {\text{NL}}}}^{ } \left| {{V}_{i} - 1} \right|$$
(3)

where \(\alpha_{\text{VD}}\) is a weight factor, and it is to be selected by the user.

  1. (c)

    Enhancement of Voltage Stability

It is very important to maintain load bus voltage within acceptable operating limit under normal condition, as well as under increased or decreased loading condition or changed system configuration condition. Voltage stability can be assessed by determining voltage stability indicator, L-index at every load bus of a power system. The value of L-index varies from 0 at no load condition to 1 at voltage collapse condition of a power system. The bus or node with the highest value of L-index will be the most vulnerable bus in a power system. Voltage stability of a power system can be enhanced by moving far from the voltage collapse point through minimization of the overall power system L-Index [16]. The objective function in this case (Case 4) can be written as follows:

$$F_{3} \left( {x,u} \right) = \mathop \sum \limits_{i = 1}^{\text{NGN}} f_{i} \left( . \right)\$ / {\text{h}} + \alpha_{L} L_{ \hbox{max} }$$
(4)

where \(\alpha_{L}\) as \(\alpha_{\text{VD}}\) is a scaling factor and is decided by the user.

  1. (d)

    Voltage stability improvement during contingency

In this case (Case 4), single line outage contingency is considered in a power system. Thus, in this case, the objective function is enhancement of voltage stability under the condition of single line outage.

2.2 Constraints

The optimal power flow problem has two types of constraints, namely equality and inequality constraints, as given below.

  1. (a)

    Equality Constraints

These constraints are the power balance equations and can be divided into real power and reactive power static load flow equations as:

$$0 = P_{\text{gi}} - P_{\text{di}} - V_{i} \mathop \sum \limits_{j = 1}^{\text{NB}} V_{j} \left[ {G_{ij} \cos \left( {\theta_{ij} } \right) + {\text{B}}_{ij} \sin \left( {\theta_{ij} } \right)} \right]$$
(5)
$$0 = Q_{\text{gi}} - Q_{\text{di}} - V_{i} \mathop \sum \limits_{j = 1}^{\text{NB}} V_{j} \left[ {G_{ij} \sin \left( {\theta_{ij} } \right) - {\text{B}}_{ij} \cos \left( {\theta_{ij} } \right)} \right]$$
(6)

where \(\theta_{ij} = \theta_{i} - \theta_{j}\), the voltage magnitudes of bus i and bus j are \(V_{i }\) and \(V_{j}\), respectively, NB is the number of buses,\(P_{\text{gi}}\) and \(Q_{\text{gi}}\) are the active and reactive power generation, respectively, at bus i, \(P_{\text{di}}\) and \(Q_{\text{di}}\) are the active and reactive load demand at bus i, and \(G_{ij}\) and \(B_{ij}\) are the elements of the admittance matrix \(\left( {Y_{ij} = - G_{ij} + j\,B_{ij} } \right)\) representing the conductance and susceptance between bus i and bus j, respectively.

  1. (b)

    Inequality Constraints

These constraints can be categorized into four types, namely generation constraints, shunt VAR compensation constraints, transformer constraints, and security constraints.

  • Generator Constraints:

    $$V_{{{\text{g}}_{k} }}^{ \hbox{min} } \le V_{{{\text{g}}_{k} }} \le V_{{{\text{g}}_{k} }}^{ \hbox{max} } ,\quad k = 1\; \ldots \;{\text{NGN}}$$
    (7)
    $$P_{{{\text{g}}_{k} }}^{ \hbox{min} } \le P_{{{\text{g}}_{k} }} \le P_{{{\text{g}}_{k} }}^{ \hbox{max} } ,\quad k = 1\; \ldots \;{\text{NGN}}$$
    (8)
    $$Q_{{{\text{g}}_{\text{k}} }}^{ \hbox{min} } \le Q_{{{\text{g}}_{\text{k}} }} \le Q_{{{\text{g}}_{\text{k}} }}^{ \hbox{max} } ,\quad k = 1\; \ldots \;{\text{NGN}}$$
    (9)
  • Transformer Constraints:

    $$T_{k}^{ \hbox{min} } \le T_{k} \le {\text{T}}_{k}^{ \hbox{max} } \quad k = 1\; \ldots \;{\text{NTR}}$$
    (10)
  • Shunt VAR compensator constraints:

    $$Q_{{{\text{C}}_{k} }}^{ \hbox{min} } \le Q_{{{\text{C}}_{k} }} \le Q_{{{\text{C}}_{k} }}^{ \hbox{max} } \quad k = 1\; \ldots \;{\text{NC}}$$
    (11)
  • Security Constraints:

    $$V_{{{\text{L}}_{k} }}^{ \hbox{min} } \le V_{{{\text{L}}_{k} }} \le V_{{{\text{L}}_{k} }}^{ \hbox{max} } \quad k = 1\; \ldots \;{\text{NLB}}$$
    (12)
    $$S_{{{\text{l}}_{k} }} \le S_{{{\text{l}}_{k} }}^{ \hbox{max} } \quad k = 1\; \ldots \;{\text{ntl}}$$
    (13)

Aggregating above equations, optimal power flow problem can be written in general form as:

$${\text{Minimize}}\,F(x,u)$$
(14)

Subject to;

$${\text{Equality}}\,{\text{constraint}}\,g\left( {x,u} \right) = 0$$
(15)

and

$${\text{Inequality}}\,{\text{constraint}}\,h\left( {x,u} \right) \le 0$$
(16)

and

$${\text{Variable}}\;{\text{bounds}}\quad u_{k}^{\left( L \right) } \le u_{k} \le u_{k}^{\left( U \right)} ,\;k = 1,2,\; \ldots ,\;n$$
(17)

where x is set of dependent variables, u is set of control variables, and \(u_{k}^{\left( L \right) } ,u_{k}^{\left( U \right) }\) are lower and upper bounds, respectively, of kth decision variable

Here, x can be expressed as

$$x^{\text{T}} = \left[ {P_{{g_{1} }} ,V_{1} \; \ldots \;V_{\text{NLB}} ,Q_{{{\text{g}}1}} ,\; \ldots \;Q_{\text{gNG}} ,S_{1} ,\; \ldots \;S_{\text{ntl}} } \right]$$
(18)

while u can be expressed as

$$u^{\text{T}} = \left[ {P_{{g_{2} }} \; \ldots \;P_{{g_{{ {\text{NGN }}}} }} ,{\text{V}}_{{{\text{g}}_{1} }} \; \ldots \;{\text{V}}_{{{\text{g}}_{\text{NGN}} }} ,{\text{Q}}_{{{\text{C}}_{1} }} \; \ldots \;{\text{Q}}_{{{\text{C}}_{\text{NC}} }} ,{\text{T}}_{1} \; \ldots \;{\text{T}}_{\text{NTR}} } \right]$$
(19)

where NLB is the number of load buses; ntl is the number of transmission lines; NGN, NC, and NTR are the numbers of generators, numbers of VAR compensation units, and numbers of regulating transformers, respectively.

2.3 Incorporation of Constraints

To obtain feasible solution, the inequalities are included into the objective function and the extended objective function can be formulated as:

$$F_{\text{aug}} = F + C_{1} .h\left( {x_{i} } \right) + C_{2} \mathop \sum \limits_{i = 1}^{\text{NGN}} h\left( { Q_{{{\text{G}}_{i} }} } \right) + C_{3} \mathop \sum \limits_{i = 1}^{\text{NLB}} h\left( { V_{{{\text{L}}_{i} }} } \right) + C_{4} \mathop \sum \limits_{i = 1}^{\text{ntl}} h\left( { S_{{{\text{l}}_{i} }} } \right)$$
(20)

where \(C_{1}\),\(C_{2}\), \(C_{3}\), and \(C_{4}\) are the penalty factors corresponding to limit violations and selected by the user.

Bat search algorithm has been applied for this optimal power flow problem, which is a combinatorial optimization problem having nonlinear and multi-extremism property. In this paper, the OPF problem has been solved by optimizing real power output and voltages of the generators, tap settings of regulating transformers, and settings of shunt VAR compensations, and these optimization variables are considered as continuous values.

3 Bat Search Algorithm

Bat search algorithm is a nature-inspired optimization technique, developed by Xin She Yang in the year 2010. This algorithm is based on the echolocation capability of bats responsible for their unique foraging behavior. Most of the bats are using sonar echoes to recognize, detect, or sense different types of obstacles. The species including bats using sonar echoes ability emit some sound pulses of frequencies in the range of 10–200 kHz. These pulses when hitting the objects or the prey around a bat produce echoes. The bats listen to the echo and then analyze and evaluate the distance of prey from them. Yang developed basic BS algorithm considering following approximation and ideal rules [17]:

  • Echolocation is used by all the bats to sense the distance, and the difference between food/prey and background barriers is also known to bats.

  • The bats have a random flying velocity \(v_{k}\) at position \(X_{k}\) with a frequency \(f^{ \hbox{min} }\), changing wavelength or frequency, and loudness \(L^{O}\) to find prey.

  • Bats have capability to regulate automatically the frequency (or wavelength) of their emitted pulses and to regulate the pulse emission rate R ∈ [0, 1], according to the proximity of the object.

  • Even though the loudness of the emitted pulses can vary in various ways, it is assumed to lie within a large positive value \(L^{O}\) to some minimum value \(A^{ \hbox{min} }\).

The basic steps used in bat search algorithm can be summarized as follows [18]:

3.1 Initialization of Bats

The initial population of bats N is randomly generated with dimension d by taking into account upper and lower boundaries. The jth component \(x_{kj}\) of position vector \(X_{k}\) can be written as:

$$x_{kj} = X_{j}^{ \hbox{min} } + \varphi \left( {X_{j}^{ \hbox{max} } - X_{j}^{ \hbox{min} } } \right)$$
(21)

where k = 1, 2 … N, j = 1, 2 … d, and \(X_{j}^{ \hbox{min} }\) and \(X_{j}^{ \hbox{max} }\) are the lower and upper boundaries for dimension j, respectively. \(\varphi\) is a randomly generated number, and it lies within range of 0–1.

3.2 Movement of Bats

The frequency, velocity, and position of the bat are updated according to Eqs. (22)–(24).

$$f_{k} = f^{ \hbox{min} } + \beta \left( {f^{ \hbox{max} } - f^{ \hbox{min} } } \right)$$
(22)
$$v_{k}^{t} = v_{k}^{t - 1} + \left( {X_{k}^{t} - X_{*} } \right)f_{k}$$
(23)
$$X_{k}^{t } = X_{k}^{t - 1} + v_{k}^{t}$$
(24)

where \(f^{ \hbox{max} }\) and \(f^{ \hbox{min} }\) are the maximum and minimum values of frequency, \(f_{k}\) represents the frequency of the kth bat; \(\beta\) is a number that is randomly generated between 0 to 1; vector \(X_{*}\) is present global best location or solution obtained on comparison of all the N number of solutions; and \(v_{k}^{t}\) and \(X_{k}^{t}\) are the velocity and position of the kth bat at tth time step.

BS algorithm uses the benefit of the local search for maintaining the solutions’ diversity of the population. The local search follows the random walk strategy to generate a new solution.

$$X_{\text{new}} = X_{\text{old}} + \epsilon A^{t}$$
(25)

where \(\epsilon\) is a random number uniformly distributed ranging from −1 to 1 and \(A^{t}\) is average loudness value of all bats at tth time step.

3.3 Loudness and Pulse Emission Rate

The loudness L and pulse emission rate r can be updated according to Eqs. (26) and (27), respectively.

$$L_{k}^{t + 1} = \alpha L_{k}^{t}$$
(26)
$$r_{k}^{t + 1} = r_{k}^{0} \left( {1 - e^{ - \gamma t} } \right)$$
(27)

where \(\gamma\) and \(\alpha\) are constants, and \(r_{k}^{0}\) is the initial pulse emission rate value of the kth bat.

4 Implementation of BS Algorithm for OPF

The solution algorithm for solving OPF using BS algorithm can be summarized in following steps:

  1. (i)

    Set the bat population size (N), loudness (L), pulse emission rate ro, the maximum number of iteration (itermax), and the number of decision variables (d). Initialize the load flow data.

  2. (ii)

    Initialize bat position \(X_{k}\) of N individuals randomly in the feasible area and their velocities \(v_{k}\).

  3. (iii)

    For each virtual bat, run load flow (e.g., NRLF) program, to find the fitness for each individual as per the objective functions of various cases mentioned above.

  4. (iv)

    Adjust the frequency, and update velocities and position using Eqs. (22)–(24) to produce new solutions.

  5. (v)

    If rand is greater than rk, select the best solution among various solutions and generate new solution using local search. Otherwise, create a new solution randomly.

  6. (vi)

    If rand is less than Lk and f(Xi) is less than f(X*), accept the created new solution. Increase the value of rk, and decrease the loudness Lk.

  7. (vii)

    Perform the ranking of bats (solutions), and find the present best solution.

  8. (viii)

    If iter < itermax, increase iter by 1, i.e., iter = iter+ 1 and go to step (iv), Otherwise, go to step (iii).

  9. ix)

    Best solution obtained. Stop.

Flowchart of BS algorithm has been shown in Fig. 1.

Fig. 1
figure 1

Flowchart of bat search algorithm

5 Result and Discussion

In order to assess the superiority of the proposed bat search algorithm, it has been implemented for solving OPF problem in IEEE 30-bus system [19]. This system has following characteristics: six generators at bus nos. 1, 2, 5, 8, 11, and 13; four transformers with off-nominal tap settings in line nos. 6–9, 6–10, 4–12, and 27–28; and shunt VAR compensation at buses 10, 12, 15, 17, 20, 21, 23, 24, and 29.

The standard IEEE 30-bus system bus data, line data, generator data, and their control variable maximum and minimum limits are taken from [19]. As many as, 30 trials were taken using BS algorithm for solving the optimal power flow problem, and the best results are given here.

5.1 Case 1: Total Fuel Cost Minimization

In this case, total fuel cost minimization was considered as objective function as defined in Eq. (1). Here, cost characteristics of all the generators were assumed to be quadratic in nature. The total fuel cost obtained using BS algorithm is compared with those of other methods reported in Table 1, while the optimal setting of decision or control variable yielded by the proposed algorithm is given in Table 2. This demonstrates the potential of the proposed approach to solve OPF problem. Figure 2 shows the convergence characteristic of BS algorithm for minimization of total fuel cost. It has been observed that the methods reported in [20,21,22] provided lesser minimum fuel cost than the proposed algorithm. However, as reported in [23, 24], the best solutions obtained in [20,21,22] are infeasible solutions. Due to limited space, only few result are compared in Table 1 and the result marked with ‘*’ is actually infeasible.

Table 1 Comparison of Case 1 result
Table 2 Optimum value of control variable for different cases
Fig. 2
figure 2

Convergence for fuel cost minimization

5.2 Case 2: Voltage Profile Improvement

The objective function chosen in Case 2 was the minimization of total fuel cost and improvement of voltage profile simultaneously as defined in Eq. (3). The value of minimum total fuel cost and voltage deviation obtained by the BS algorithm were 807.3128 $/h and 0.0789, respectively. The optimal setting of control variables is given in third column of Table 2. It is clear that the voltage profile is significantly improved as compared to that of Case 1, as the total voltage deviation is reduced from 0.8871 in Case 1 to 0.0789 in Case 2. The voltage at various buses of IEEE 30-bus system in Case 1 and Case 2 is compared in Fig. 3. The results attained using bat search algorithm have been compared with reported results using other algorithms in Table 3. However, the best solutions reported in [20, 21] are indeed infeasible solutions.

Fig. 3
figure 3

System voltage profile improvement

Table 3 Comparison of Case 2 results

5.3 Case 3: Voltage Stability Enhancement

The objective function for minimization of the total fuel cost and enhancement of voltage stability simultaneously as defined in Eq. (4) was selected in Case 3. The value of minimum total fuel cost and L-index as obtained by the BS algorithm were 825.2849 $/h and 0.1237, respectively. The optimal setting of control variables is given fourth column of Table 2. The result attained using BS algorithm is compared with the reported results obtained using other algorithms in Table 4. As depicted in Table 4, BS algorithm has provided better results as compared to other meta-heuristic optimization algorithms. In this case also, it has been observed that result marked with ‘*’ in Table 4 is the infeasible solution indeed [24].

Table 4 Comparison of Case 3 result

5.4 Case 4: Improvement of Voltage Stability During Contingency

In practical power system operation, there might be various types of contingencies occurring such as transmission line outage and generator unit outage. It is necessary to have enough stability margins in normal operating condition of a power system as well as under contingency conditions. So, objective function of Case 4 is minimization of the total fuel cost and enhancement of voltage stability of the power system simultaneously under (N − 1) contingency, which is simulated as outage of the line connected between bus no. 2 and bus no. 6. The optimum setting of decision variables is given in Table 2, and comparison of the results obtained using the proposed BS algorithm and reported results using other algorithms are given in Table 5. From Table 5, it is clear that the bat search algorithm has provided better optimization results as compared to other reported algorithms. Further, it has been reported in [24] that the best solutions provided by DE algorithm [21] and GS algorithm [31] are infeasible.

Table 5 Comparison of Case 4 result

6 Conclusion

In this paper, a recently developed Bat Search algorithm has been applied to solve optimal power flow problem with the objectives as minimization of total fuel cost, improvement of voltage profile, and enhancement of voltage stability under normal condition as well as during contingency.

The proposed bat search algorithm has been applied to solve OPF problem in the standard IEEE 30-bus system. The results obtained using BS algorithm were compared with the reported results obtained using other meta-heuristic algorithms. On comparison, this has been clearly observed that the BS algorithm provides better results than those reported in literature. This confirms the superiority and effectiveness of BS algorithm over other EC-based techniques to solve different cases of OPF problem with feasible results.