1 Introduction

The increasing demand for electric power is one of the main challenges being faced by many countries in the World. Among other goals, electric companies aim at supplying power to consumers at a minimal operational cost. In general, this optimization problem known as Optimal Power Flow (OPF) seeks to optimize the overall operation cost of generating and transmitting electric power subject to system constraints and control limits. Many other goals can also be considered in this problem, such as the minimization of modifications in controls, minimization of the active power losses, minimization of power not supplied when load has to be curtailed, or even the minimization of the greenhouse gas emissions, just to name a few [1]. Thus, the software module in Energy Management Systems to solve the OPF problem plays an important role, as the whole operation of the power system must be optimized for each time interval.

OPF can be defined as a mono-objective problem dealing with the aggregation of two or more objective functions, or a multiobjective one trying to optimize each goal separately and simultaneously [2]. Traditionally, the control variables are the active power production and the voltage set point of generating units, the positions of transformer taps and the states of shunt compensator’s (reactors and capacitors). The equality constraints stem from the power flow equations and are associated with Kirchhoff’s current and voltage laws. Operational limits, such as the active and reactive power boundaries of generators, the bus voltage magnitude and the apparent power flow in the lines are modeled as inequality constraints. Additional security criteria can be included in the OPF problem, such that the operation of the system is kept within predefined security margins even when unplanned outages occur [3]. Usually, OPF is considered as an extremely difficult optimization problem to solve due to its highly dimensionality, non-linearity, combinatorial, non-convex and multimodal nature [1,2,3].

The OPF problem was modeled and solved for the first time by Carpertier [4] using deterministic techniques. The some common deterministic techniques used to solve this problem are Linear Programming, Quadratic Programming, Gradient Method, Interior Point Methods, to name a few [1, 2, 5]. Some examples of nondeterministic techniques are Genetic Algorithms (GA), Particle Swarm Optimization (PSO), Ant Colony Optimization (ACO) and Differential Evolution (DE) [6,7,8,9,10,11,12,13]. Table 1 describes in a simple manner the main advantages and disadvantages of the most important techniques.

Table 1 Summary of solution methods for OPF problems based on [1, 2]

Apart from supplying electric power at minimal operation cost, utilities must comply with high levels of safety and quality. To ensure adequate continuity and security of supply, the operator might want that the inequality constrains are not violated in case of equipment outage (generators, transformers, lines, etc.). When contingencies of equipment are included in the optimization model, the problem is known as Security Constrained Optimal Power Flow (SCOPF) [3]. Several research works handling the SCOPF problem can be found in literature, namely, methodologies that use GA, PSO, ANN, Linear Programming and some hybrid approaches [14,15,16,17,18,19,20].

Hybrid optimization techniques have been recently proposed to solve this problem. Hybrid methods can be defined as a combination of deterministic and nondeterministic techniques to solve a particular problem. In many cases, hybrid methods have proven to be more efficient and lead to faster convergence to the optimal solution than methods that optimize solely individual components [2]. Hybrid methods applied to solve the OPF problem are based on the combination of techniques such as GA and PSO, DE as well as PSO, ANN with GA, Interior Point and PSO, Newton Method, PSO and Artificial Bee Colony (ABC), PSO and others [21,22,23,24,25,26,27,28,29,30].

Hybrid methods are becoming reliable and effective techniques to solve real-world and complex optimization problems with remarkable performance. For instance, a PSO inspired multi-elitist ABC algorithm named PS-MEABC is proposed in [30] for real-parameter optimization. The optimal coordination of directional overcurrent relays in meshed networks using a hybrid PSO-DE approach is detailed in [31]. The economic dispatch problem of generating units is solved in [32] once again using a hybrid technique based on PSO and DE.

This paper proposes a new hybrid approach, the so called Hybrid Canonical Differential Evolutionary Particle Swarm Optimization (hC-DEEPSO), which combines C-DEEPSO [18] coupled with a multipoint search operator called Spiral Search (SLS) to solve the SCOPF problem. The usage of this search operator aims to better exploit the search space in the vicinity of the best solution found so far by the current population in the first stages of the search process. In addition, a simple diversity mechanism is applied to balance between exploration and exploitation. That mechanism is able to avoid premature convergence and to escape from local optima.

The algorithm is tested on three test systems well-known in literature - IEEE 57 bus, IEEE 118 bus and IEEE 300 bus systems - with two different objective functions: the minimization of active power losses in the transmission network and the minimization of total cost of electricity production for the expected operation scenario. In both scenarios, several unplanned outages of equipment are taken into account, requiring the system operation to be kept within pre-defined margins even in contingency scenarios.

This section has introduced the OPF problem and its SCOPF variation as well as the current state-of-art methods for solving these problems. The remainder of the paper is organized as follows: Section 1.1 deals with the modeling of the SCOPF problems; Section 2 presents the hybrid algorithm hC-DEEPSO, the problem-specific search operator SLS and the diversity mechanism; Section 3 discusses the experiments and the results obtained; finally, Section 4 concludes the work.

1.1 Problem formulation

The original OPF problem is a mixed-integer non-linear optimization problem. That formulation does not guarantee that operation of the network remains in a secure state after a sudden equipment outage. Therefore, an improved formulation has been proposed: the SCOPF. This model ensures that the power can be successfully transferred from generators to loads not only under the expected network topology, but also for some unplanned outage caused by sudden loss of sections of the network, such as transmission lines, distribution branches and/or transformers. Therefore, SCOPF problem has a considerable larger number of constraints than OPF problem.

This paper addresses the SCOPF problem considering two different objective functions: the minimization of total operation cost, which is known as Optimal Active Reactive Power Dispatch (OARPD) problem, and the minimization of total active power losses in the transmission network, known as Optimal Reactive Power Dispatch (ORPD) problem. These two objective functions can be expressed as non-linear functions: the OARPD version is a quadratic function of the generators active power output in $/h while the ORPD version is quadratic function of the bus voltage magnitudes and of the cosine of the difference between bus voltage angles. Note that the active power production of the power plants in the ORPD problem is an input parameter and not a decision variable: the only active power production to be optimized is that corresponding to the generator in the slack bus.

Both optimization problems can be formulated using three types of variables - the control or decision variables, the state variables and the parameters - as follows:

  • Control: active power and voltage magnitude for the generators; tap status of transformers; switching state of capacitors; power electronic controls and phase position of transformer taps (when available);

  • State: voltage magnitude and angle for all busses;

  • Parameters: network topology, resistance, reactance, shunt conductance and susceptance of transmission lines and transformers, susceptance of shunt capacitors, physical limits of the control variables, reactive power limits of generators, apparent power limits of transmission lines and transformers, slack bus, and set of N-1 contingency scenarios.

SCOPF problem includes security constraints, namely the N-1 criteria, to uphold the inequality constraints even in case of failure of a single component. The two objective functions, which are represented in (1) as minC in $/h and Ploss in MW, are solved for the expected scenario of operation, whereas the constraints are met not only in the case of that scenario but also for all the contingency scenarios. Note that these two problems are solved separately using a mono-objective approach.

$$\begin{array}{@{}rcl@{}} && {}\min C \,=\, {\sum}_{i = 1}^{NG} a_{i} + b_{i} \times Pg_{i} +c_{i} \times P{g}_{i}^{2},\\ && {} \min P_{loss} \,=\, {\sum}_{K = 1}^{{}^{N_{L}}} G_{K}[{{U}_{i}^{2}} \,+\, {{U}_{j}^{2}} \,-\, 2 |U_{i}| | U_{j} | \cos(\delta_{i} \,-\, \delta_{j})],\\ && {}\text{s.t.}:\! \left\{\begin{array}{l} P_{i} \,=\, Pg_{i} - Pl_{i} \,=\, \\ {\sum}_{j = 1}^{NB} U_{i} U_{j} \left[ G_{ij} \cos(\delta_{i} - \delta_{j}) \,+\, B_{ij} \sin (\delta_{i} - \delta_{j}) \right],\\ \forall_{i} \in NB, \forall_{s} \in NS; \\ Q_{i} = Qg_{i} - Ql_{i} = \\ {\sum}_{j = 1}^{NB}U_{i}U_{j} \left[G_{ij} \sin(\delta_{i} - \delta_{j}) + B_{ij} \cos(\delta_{i} \,-\, \delta_{j})\right], \\ \forall_{i} \in NB, \forall_{s} \in NS; \\ \underline{U}_{i}\leqslant U_{i} \leqslant \overline{U}_{i}, \forall_{i} \in NB, \forall_{s} \in NS; \\ \left|\begin{array}{l}S_{ij}\\S_{ji}\end{array}\right|\begin{array}{l}\leqslant \overline{S_{ij}},\forall_{i} \in NC, \forall_{s} \in NS; \\ \leqslant \overline{S_{ij}}, \forall_{i} \in NC, \forall_{s} \in NS; \end{array}\\ \underline{Pg_{i}}\leqslant Pg_{i}\leqslant \overline{P_{i}}, \forall_{i} \in NG, \forall_{s} \in NS; \\ \underline{Qg_{i}}\leqslant Qg_{i}\leqslant \overline{Q_{i}}, \forall_{i} \in NG, \forall_{s} \in NS; \\ \underline{t_{i}}\leqslant t_{i}\leqslant \overline{t_{i}}, \forall_{i} \in NOLTC, t_{i} \in \forall_{s} \in NS;\\ 0\leqslant q_{i}\leqslant 1, \forall_{i} \in NSHUNT, q_{i} \in Z, \forall_{s} \in NS, \end{array}\right. \end{array} $$
(1)

in which Pgi (MW) is the active power generation. The reactive power generation is represented by Qgi (MVar), Pl (MW) is the active power load, Ql (MVar) is the reactive power load, U (kV) is the voltage magnitude, δ (degrees) is the voltage angle, Sij (MVA) is the apparent power flow injection at the sending end of the transmission circuit connecting bus i to bus j whereas Sij (MVA) is the apparent power flow injection at the receiving end of the same circuit.

The variable t is the tap setting position of the OLTC (O n-L oad T ap C hanger), q is a binary variable that represents the state of the capacitor/reactor banks, a ($/h), b ($/MWh) and c ($/MWh2) are cost coefficients, Y = G + jB is the bus admittance matrix, NG is the number of generators, NB is the number of busses, NC is the number of circuits in the network, NOLTC is the number of OLTC transformers, NSHUNT is the number of capacitor/reactor banks and NS is the number of scenarios that represent the expected operation scenario and contingency states. Note that all constraints must be satisfied for all scenarios.

In this research work, the active power production at PV busses, the voltage magnitude at REF and PV busses, the OLTC tap setting position and the state of the capacitor banks were modeled as hard constraints, i.e. the limits of these variables were not allowed to be violated. The algorithm proposed in this paper is a metaheuristic devised for continuous search spaces, a simple rounding procedure was used to convert real variables into integer ones.

Soft constraints, i.e. the constraints that were modeled as penalties to two functions presented in (1), consist of the active power production of the REF bus, the voltage magnitude at PQ busses, the apparent power flow through branches, and the reactive power generation at REF and PV busses. The deviations from the limits were computed in per-unit system. The adopted penalty function fp is described in (2):

$$\begin{array}{@{}rcl@{}} f_{p} = [ 1 \, 1 \, 1 \, 1 ] \left[\begin{array}{c} max (0, Pg_{REF} - \overline{Pg_{REF}})^{2} + max (0, \underline{Pg_{REF}} - Pg_{REF})^{2}\\ {\sum}_{i = 1}^{NB_{PQ}}[max(0, U_{i} - \overline{U_{i}}) + max(0, \underline{U_{i}})]^{2}\\ {\sum}_{i = 1}^{NC}[max(0, |S_{ij}| - \overline{S_{ij}}) + max (0, |S_{ji}| - \underline{S_{ij}})]^{2}\\ {\sum}_{i = 1}^{NB_{REf+PU}}[max(0, Q_{i} - \overline{Q_{i}}) + max(0, \underline{Q_{i}} - Q_{i})]^{2} \end{array}\right]. \end{array} $$
(2)

The fitness functions used for the individuals computed by our algorithm depend on the penalty function selected and are defined as minC and Ploss respectively,

$$\begin{array}{@{}rcl@{}} fit &=& C + 1 \times 10^{7} \times f_{p}, \end{array} $$
(3)
$$\begin{array}{@{}rcl@{}} fit &=& P_{loss} + 1 \times 10^{7} \times f_{p}, \end{array} $$
(4)

in which fp represents the penalty function.

2 hC-DEEPSO with spiral search

Evolutionary algorithms (EAs), popular algorithms in optimization research community, are methods that mimic the processes of Darwinian evolution. In practice, simple EAs are usually outperformed by hybrid EAs when solving complex optimization problems. The concept of hybridization refers to combine EAs with local search algorithms or to combine features of different optimization techniques to produce a more powerful algorithm. In this context, the combination of Differential Evolution (DE) and Particle Swarm Optimization (PSO) represents a promising way to create superior optimizers [33].

While being similar in terms of basic algorithm features and manipulating a population of candidate solutions, PSO and DE differ in terms of population sampling approach. Sampling in PSO is based on individual cognition and social collaboration while sampling in DE relies on differential mutation and crossover [33]. The hybrid algorithm, C-DEEPSO [18], creates a vector of differences inspired by the mutation operator of DE and introduces that vector in the movement equation of PSO. Moreover, C-DEEPSO addresses the binomial recombination operator observed on canonical DE.

This metaheuristic constitutes an enhancement over Differential Evolutionary Particle Swarm Optimization (DEEPSO) [17] and can be viewed as an evolutionary algorithm with recombination rules borrowed from PSO or a swarm optimization method with selection and self-adaptiveness properties inherent from DE algorithm. Table 2 describes the main parameters of the C-DEEPSO algorithm.

Table 2 Parameters in C-DEEPSO

C-DEEPSO is based on the concept of biological evolution, in which a population of solutions evolves and gradually improves over time according to the adaptation of its individuals to the environment. Selection, recombination and mutation operators are applied to create new solutions. Recombination in C-DEEPSO is governed by the so called Movement Rule, which in DEEPSO is given by (5) and (6):

$$\begin{array}{@{}rcl@{}} X_{t} = X_{t-1} + V_{t}, \end{array} $$
(5)
$$\begin{array}{@{}rcl@{}} V_{t} &=& {w}_{i}^{*} \times V_{t-1} + {w}_{m}^{*} \times (X_{r} - X_{t-1})\\ && +\, {w}_{c}^{*} \times C \times ({X}_{gb}^{*} - X_{t-1}), \end{array} $$
(6)

in which Xr is an individual different from Xt− 1 that can be obtained according to one of the following four options [34]:

  1. 1.

    Sg: sampled from all individuals in current generation;

  2. 2.

    Pb: sampled from a Memory B of the best individual found so far;

  3. 3.

    Sg-rnd: sampled as an uniform recombination from the individuals of the current generation, and;

  4. 4.

    Pb-rnd: sampled as an uniform recombination within Memory B.

Typically, the mutation of a generic weight w of an individual follows a simple additive rule as described by (7),

$$\begin{array}{@{}rcl@{}} w^{*} = w + \tau \times N(0,1), \end{array} $$
(7)

in which τ is the mutation rate that must be set by the user. N(0,1) is a number sampled from the standard Gaussian Distribution.

Note that the mutated weight must not become negative nor greater than 1. Moreover, not only the weights presented in (5) are mutated but also Xgb. This attracting position is slightly moved in the search space using a Gaussian Distribution to prevent the population from being trapped in a given region of the search space. This is especially evident in those cases when the cooperation term becomes more dominating than the other terms. Mutation of Xgb, which is carried out for every particle, is performed according to the following equation:

$$\begin{array}{@{}rcl@{}} {X}_{gb}^{*} = X_{gb}[1 + \tau \times N(0,1)]. \end{array} $$
(8)

An analysis of the Movement Rule shows that DEEPSO is best described as a metaheuristic stemming from swarm intelligence with selection and self-adaptation abilities rather than from the canonical DE algorithm (see [35]). For the sake of clarity, the traditional DE mutation operator is shown in (9):

$$\begin{array}{@{}rcl@{}} v_{t,i} = x_{t,r1} + F (x_{t,r2} - x_{t,r3}); ~~ r_{1}, r_{2}, r_{3} \in \{1, {\ldots} ,N\}, \end{array} $$
(9)

in which parameters xt,r1, xt,r2 and xt,r3 are different solutions randomly obtained from the population and F is a number that belongs to the interval [0,2], aiming to control the amplification of differential variation. It is easy to see that three vectors are used in the DE mutation process of (9), while in DEEPSO movement rule, only two vectors are required, represented by Xr and Xt− 1, which are used in (6). On the other hand, C-DEEPSO uses the original DE mutation operator, as described by (9).

The distinguishing feature of C-DEEPSO is to use instead of a memory term, as in the classic PSO, a more general term, called assimilation term. This term is sensitive to macro-gradients, that lead to improvements in the fitness function. To obtain the assimilation term, C-DEEPSO relies on a collective memory instead of multiple and independent memories, corresponding to the search experience of each individual. This memory, called Memory B, contains not only the position of the individual but also its fitness. A new way to generate Xr is proposed to ensure a better assimilation of the search space. This new strategy, named SgPb-rnd, is a combination of Sg-rnd and Pb-rnd strategies. In this case, when using SgPb-rnd, an uniform recombination from the solutions in Memory B and in the current population is used to obtain Xr. The Movement Rule for C-DEEPSO is described by (10) as:

$$\begin{array}{@{}rcl@{}} V_{t} \,=\, {w}_{I}^{*} V_{t-1} \,+\, {w}_{A}^{*} (X_{st} \,-\, X_{t-1}) + {w}_{C}^{*} C ({X}_{gb}^{*} \,-\, X_{t-1}). \end{array} $$
(10)

The superscript * in (10) indicates that the corresponding parameter/quantity undergoes evolution under a mutation process. The strategy st used in this paper is current-to-best [36], which can be expressed by means of (11),

$$\begin{array}{@{}rcl@{}} X_{st} = X_{r} + F(X_{best}-X_{r}) + F (X_{r1} - X_{r2}). \end{array} $$
(11)

In (10) and (11), t denotes the current generation, X the current position or solution. Moreover, Xgb is the best solution ever found by the population, V is the velocity of the individual, and C represents a n × n diagonal matrix of Bernoulli random variables that is sampled in every iteration. A communication rate, P, is applied to generate matrix C. The variables wI,wA and wC are weights on the inertia, assimilation and communication terms, respectively. The terms Xr1 and Xr2 are randomly sampled solutions. After the calculation of Xst, the corresponding solution is evaluated. If the fitness of Xst is better than that of Xr, then Xst receives the value of Xr. This operation is similar to the crossover operator in DE algorithm (see [35]). The superscript ∗ indicates that the corresponding parameter/quantity undergoes evolution under a mutation process. Figure 1 shows a planar (2D) representation of the Movement Rule, with focus on the different iterations between solutions (inertia, cooperation and assimilation). Algorithm 1 describes a pseudo-code for C-DEEPSO.

figure h
Fig. 1
figure 1

Illustration of the movement equation for C-DEEPSO, showing similarity with PSO, however not having a memory term as attractor

2.1 The multipoint search operator and the diversity mechanism

Some real-world optimization problems present a high number of variables to optimize and, in this case, the domain search increases exponentially with the dimension size. Algorithms for solving these types of problems need to be carefully designed and more efficient than the ones applied to low dimensional problems. Due to the high dimensionality of SCOPF problems, the evolutionary algorithm will benefit from a inclusion of a multipoint search operator. The proposed search operator is inspired by the Spiral Optimization Algorithm (SOA) [37]. SOA is based on multipoint search for n dimensions applied to the solution of problems that have continuous characteristics, based on an analogy of the spiral shape natural phenomena. The basic idea is to explore the search space using logarithmic spiral shape, which can be observed in nature, such as in shells, some flowers, formation of cyclones and even galaxies [38]. The logarithmic spiral trajectory model, centered at xRn, starting with an arbitrary point, is given by:

$$\begin{array}{@{}rcl@{}} x^{(k + 1)} = rM(\theta) \cdot x^{(k)} - (rM(\theta)- I_{n}) \cdot x^{*}, \end{array} $$
(12)

in which the rotation angle 𝜃 belongs to the range [0, 2π] around the origin in each k. The radius r, 0 < r < 1 is a convergence rate of the distance between the current point and the origin, for each k. In is the n-dimensional identity matrix and M(𝜃) is the rotation matrix.

A general rotation in the n-dimensional space can be seen as the rotation of an axis i in direction to an axis j. The plane described by axis i and j is the rotation plane and the general matrix for main rotation, \(M_{i,j}^{(n)}(\theta _{i,j})\), is given by,

$$\begin{array}{@{}rcl@{}} {M}_{i,j}^{(n)}(\theta_{i,j}) \,=\, \left[\begin{array}{cccccccccc} \!1 & & & & & & & & & \\ & {\ddots} & & & & & & & & \\ & & & \cos(\theta_{i,j}) & & \cdots\! \!& & -\sin(\theta_{i,j}) & & \\ & & & {\vdots} & & \!\ddots\! & & {\vdots} & & \\ & & & \sin(\theta_{i,j}) & & \!{\cdots} \!& & \cos(\theta_{i,j}) & & \\ & & & & & & & & {\ddots} & \\ & & & & & & & & & 1\! \end{array}\right],\\\ \end{array} $$
(13)

in which all blank elements are equal to zero.

It is worthwhile to observe that \({M}_{i,j}^{(n)}(\theta _{i,j})\) is almost an identity matrix except in the intersection of columns i and j with rows i and j, meaning that only the coordinates i and j will change after a \({M}_{i,j}^{(n)}(\theta _{i,j})\) rotation. This is consistent with the bi-dimensional and three-dimensional cases. Since there are \(\left (\begin {array}{c}n\\2\end {array}\right )\) main planes in a n-dimensional space, this corresponds to the number of possible main rotations in that space. The rotation matrix in the n-dimensional space is obtained by the composition of all (n(n − 1)/2) existing combinations [39]. Therefore, Mn(𝜃) can be defined by (14), in which n is the number of dimensions:

$$\begin{array}{@{}rcl@{}} M^{(n)} (\theta) = \underset{i < j}{\prod} {M}_{i,j}^{(n)} (\theta_{i,j}). \end{array} $$
(14)

The n-dimensional logarithmic spiral model is given by,

$$\begin{array}{@{}rcl@{}} x^{(k + 1)} = rM^{(n)}(\theta) \cdot x^{(k)}-(rM^{(n)}(\theta)- I_{n}) \cdot x^{*}, \end{array} $$
(15)

in which the rotation angle 𝜃 belongs to the range [0, 2π] around the origin in each k. The radius r, 0 < r < 1 is a convergence rate of the distance between the current point and the origin, for each k. In is the n-dimensional identity matrix and the M(𝜃) is the rotation matrix. In a 3-dimensional space, Fig. 2 shows the trajectory of 50 points starting at x0 = (10, 10, 10) and using (15).

Fig. 2
figure 2

Examples of logarithmic spiral trajectories using (12). Different values of convergence rate r produce distinct spiral shape behaviors. a trajectory using r = 0.95; 𝜃 = π/4 and b trajectory using r = 0.90; 𝜃 = π/4. The right-hand side column shows a rotated version of the corresponding spiral

It is important to notice that the choice of the number of points used to build the spiral, the radius and angle of the rotation matrix affect the shape of the logarithmic spiral. Four different spirals are shown in Fig. 3. Each spiral is constructed using the parameters given in Table 3.

Fig. 3
figure 3

Examples of logarithmic spiral trajectories using (12). Different values of convergence rate r produce distinct spiral shape behaviors. a trajectory using r = 0.95, 𝜃 = π/4 and popsize = 25, br = 0.95, 𝜃 = π/4 and popsize = 50, cr = 0.80, 𝜃 = π/4, popsize = 25 and dr = 0.95, 𝜃 = π/7 and popsize = 25

Table 3 Illustration parameters

Therefore, for coupling the idea inspired on SOA as a local search operator inside C-DEEPSO, some definitions must be given:

  • Given an occurrence rate (γ), the new local search operator will be run every generation, until a specified generation Ngl;

  • Radius and angle are randomly chosen and the number of points to be used to construct the spiral is given by the user;

  • The number of generated points is directly related to the initialization parameters used in SOA. For convenience, the number of points generated will be the same as the population started in C-DEEPSO;

  • The center point of the logarithmic spiral is Xbest since the main idea of the local search operator is to widen the search around a promising space region. Preliminary experiments were conducted using different point as center point of the logarithm spiral and the results showed that using Xbest as the center point the multipont search is more effective;

  • An additive inverse logarithmic spiral is introduced with respect to Xbest, to intensify the exploration of possible individuals close to Xbest;

In this new approach, a sampled set of individuals, totally randomized of logarithmic spirals is generated, allowing to name this new local search operator as Spiral Local Search (SLS). For purposes of illustration of a spiral and its additive inverse used in SLS operator, Fig. 4 shows two spirals starting at points x0+ = (10,10,10) and x0− = (− 10,− 10,− 10).

Fig. 4
figure 4

An example of reverse spiral additive, in a 3-dimensional space, starting at x0+ = (10,10,10) and x0− = (− 10,− 10,− 10)

The procedure of SLS operator corresponds to the generation of spiral samples starting at Xbest. A population sampled by the obtained spiral is evaluated on the original objective function and the individual who has lowest objective function value is named XSLS. The SLS operator is elitist, meaning that the worst individual, Xworst, in the current population of C-DEEPSO, is replaced by XSLS.

The proposed search operator helps C-DEEPSO algorithm to find a local optimum in the first generations of the search. Not only the usual selection pressure pushes C-DEEPSO to focus more and more on already discovered better regions, but also does the search operator in-depth. As a result, population diversity declines and premature convergence may occur. Although premature convergence is not caused by the diversity loss, maintaining a certain degree of diversity is widely believed to help to avoid entrapment in non-optimal solutions. Having that in mind, a simple diversity mechanism is proposed. This diversity mechanism uses a distance-to-best measure to alternate between exploration and exploitation. The distance to an average-point, Xd, among the population individuals and Xbest, is obtained:

$$\begin{array}{@{}rcl@{}} X_{d} = \frac{1}{NP} \sum\limits_{i = 1}^{NP} \sqrt{\sum\limits_{j = 1}^{N} (x_{ij}-x_{best})^{2}}, \end{array} $$
(16)

in which NP is the population size and N is the problem dimension. New individuals Xd+ = X + Xd and Xd = XXd are generated and, then, evaluated on the original objective function. The best NP individuals are then selected for the next generation. Algorithm 2 presents the pseudo-code of the search algorithm, SLS, and the diversity mechanism proposed in this work.

figure i

According to [40], it is now well established that pure population-based algorithms are not well suited to refinement of complex combinatorial spaces and that hybridization with other techniques can significantly improve search efficiency. In this way, the proposed algorithm unites different concepts of evolutionary optimization in order to be a viable approach to solve real world problems. The proposed algorithm, the C-DEEPSO coupled with the search operator and diversity mechanism, is called Hybrid Canonical Differential Evolutionary Particle Swarm Optimization (hC-DEESPO).

3 Simulation results and discussion

In this section, the performance of hC-DEEPSO for solving SCOPF problems is evaluated on IEEE Test Beds. The three IEEE test systems in the ORPD and OARPD are presented and discussed. The experimental setup is divided into the following case studies:

  1. 1.

    to verify the performance of hC-DEEPSO in the preliminary experiment using benchmark functions by literature to compare our algorithm with the canonical PSO and DE methods.

  2. 2.

    to validate the effect of the canonical DE mutation operator in and the multipoint search operator insertion in the hC-DEEPSO algorithm are analyzed;

  3. 3.

    a parameter fine-tuning for the hC-DEEPSO, regarding the mutation and communication rates, is conducted; and

  4. 4.

    a statistical comparison of the results obtained by hC-DEEPSO, in its best parameters, with three benchmark algorithms available in the literature - DEEPSO, ICDE and MVMO - is performed.

3.1 Preliminar experiment

A preliminary experiment using two benchmark functions of literature - Rastringin and Rosenbrock - was realized. The goal for this experiment was to verify the results obtained in hC-DEEPSO in a comparison with the results of canonical PSO and DE algorithms presented in [41]. The initialization parameters that hC-DEEPSO used was: Mutation rate 0.5 and Communication rate 0.9. The number of total fitness values was set at 1 × 105. For each dimension (30, 50, 100) the algorithms tested using the population size (30, 50, 100) respectively and was tested 30 times. The (17) and (18) shows the benchmark functions:

  • Rastringin function - Multimodal - Goal = 0,

    $$\begin{array}{@{}rcl@{}} f(x) = \sum\limits_{i = 1}^{D}\left[{{x}_{i}^{2}} - 10 cos(2\pi x_{i}) + 10\right]. \end{array} $$
    (17)
  • Rosenbrock function - Unimodal - Goal = 0,

    $$\begin{array}{@{}rcl@{}} f(x) = \sum\limits_{i = 1}^{D-1}\left[100({{x}_{i}^{2}} - x_{i + 1})^{2} + (x_{i} -1)^{2}\right]. \end{array} $$
    (18)

Table 4 shows the results of the PSO, DE and hC-DEEPSO algorithms. The results showed that hC-DEEPSO obtained a good performance in relationship to canonical DE and PSO algorithms in to solve the Rastringin and Rosenbrock functions in different dimensions. Thus, it is possible show that hC-DEEPSO is able to overcome the results of the base algorithms used for its design in continuous problems.

Table 4 Mean and standard values for PSO, DE and hC-DEEPSO on Rastringin and Rosenbrock functions in 30, 50 and 100 dimensions

3.2 IEEE test systems - case studies

Three well-known IEEE test systems - 57 bus, 118 bus and 300 bus - for ORPD and OARPD problems are presented. The IEEE 57 bus test and the IEEE 118 bus test represent a portion of the American Electric Power System, in the Midwestern US, as it was in the early 1960’s. The IEEE 300 bus test was developed, in 1993, by the IEEE Test System Task force. Figure 5 shows a single-line diagram of each system. IEEE 57 bus system has 25 optimization variables in ORPD, comprising 7 continuous variables associated to generator voltage set-points, 15 discrete variables associated to stepwise adjustable on-load transformer tap positions, and 3 binary variables associated to switchable shunt compensation devices. On the other hand, the number of optimization variables in OARPD is 31, in which the extra 6 continuous variables correspond to the active power production of generators. In both problems, in addition to the expected operation scenario, two contingency scenarios are considered (N-1 criterion) corresponding to the outage of branches 8 and 50. The number of constraints is 178 for non-contingency conditions, and 177 for each N-1 condition.

Fig. 5
figure 5

Diagram systems by IEEE 57, 118 and 300 bus. Please refer to [42] for more details and clear diagrams illustrating these systems

IEEE 118 bus system has 77 optimization variables in ORPD, comprising 54 continuous variables associated to generator bus voltage set-points, 9 discrete variables associated to stepwise adjustable on-load transformer tap positions, and 14 binary variables associated to switchable shunt compensation devices. The difference between ORPD and OARPD is the additional number of control variables (total of 130) that represent the active power production of generators. In both problems, considered contingency scenarios result from outages in branches 21, 50, 16, and 48 were considered. The number of constraints is 492 for non-contingency conditions, and 491 for each N-1 condition.

Finally, IEEE 300 bus system has 145 variables in ORPD, comprising 69 continuous variables associated to generator bus voltage set-points, 62 discrete variables associated to stepwise adjustable on-load transformers and 14 binary variables associated to switchable shunt compensation devices. The total number of control variables in the OARPD problem is 213. Table 5 presents a summary of all characteristics for each system. In both problems, three contingency scenarios are considered as a result of outages at branches 187, 176, and 213. The number of constraints is 651 for non-contingency conditions, and 950 for each N-1 condition.

Table 5 Summary of characteristics presented by IEEE 57, 118 and 300 bus systems. The number of additional security constraints is indicated between brackets (index - 1:ORDP and 2:OARDP)

3.3 Study on efficacy of hybrid C-DEEPSO

The difference between DEEPSO and C-DEEPSO lies in the usage of the canonical DE mutation operator inside the Movement Rule. Despite the good performance of DEEPSO when applied to SCOPF problem, the efficacy of hC-DEEPSO needs to be assessed. For that, it is necessary to investigate the benefits of the inclusion of the canonical DE operator when applied to the SCOPF problems. Moreover, the performance of the Multipoint Search insertion must be analyzed. For assessing the performance of DEEPSO, C-DEEPSO and hC-DEEPSO when applied to SCOPF problems, an experiment using the IEEE 57 bus system was conducted. To have a fair comparison, all initialization parameters were the same: NP = 60; MB = 6; γ = 0.5; Ngl = 20; Mutation = 0.6; Communication = 0.2; Maximum number of function evaluations = 5 × 103. Each algorithm was executed 31 times. Figure 6 presents the mean convergence line for DEEPSO, C-DEEPSO and hC-DEEPSO throughout the 5 × 103 function evaluations.

Fig. 6
figure 6

Mean convergence line for the IEEE 57 bus system/ORDP. The x-axis represents the function evaluations and the y-axis the mean value of the objective function over the 31 runs

Analyzing Fig. 6, it is possible to perceive that hC-DEESPO is the first algorithm to converge followed by C-DEEPSO. The magnified area shows the mean value of each algorithm obtained in a specific range of function evaluation counter. The obtained mean value for hC-DEEPSO was 25.91 MW while the obtained mean values of C-DEEPSO and DEEPSO were 4456 MW and 927.6 MW, respectively. The fact indicates the multipoint search operator, SLS operator, plays an important role in the convergence velocity when compared. Figure 7 illustrates the experimental results (corresponding to the total operation cost) of the 31 runs using boxplots for the three algorithms. The Fig. 7 shows that hC-DEEPSO performed better as compared to DEEPSO and C-DEEPSO.

Fig. 7
figure 7

Comparison of hC-DEEPSO, C-DEEPSO and DEEPSO - IEEE 57 bus system/ORDP

This behavior can be statistically assessed via an ANOVA followed by a Tukey test. The p-value, calculated using a 5% significance level, was 6.19 × 10− 13. Figure 8 shows the Tuckey test results. The result indicates the hC-DEEPSO presents a lower mean value of the total operation cost when compared to C-DEEPSO and DEEPSO and C-DEEPSO presents a lower mean value of the total operation cost when compared to DEEPSO. In this way, it is possible to state that the usage of the canonical DE mutation operator and the multipoint search operator enhances the performance of the algorithm when applied to IEEE 57 bus system. The main idea behind the multipoint search operator is to sample the search space more effectively, exploring some neighbors of the best solution. In large scale optimization problem context, such as SCOPF problems, a more effective search space sampling is a key feature to overcome the dimensionality curse when designing powerful algorithms.

Fig. 8
figure 8

Tucky Test for each algorithm using IEEE 57 bus system/ORDP

3.4 Parameter fine-tuning

To determine the optimum value of mutation rate and communication probability, the Response Surface Methodology has been chosen as the experimental setup to perform the fine-tuning of the parameters. This methodology is a collection of mathematical and statistical techniques that are useful for modeling and analysis in applications in which the output variable is influenced by many variables and the goal is to optimize that output variable [43]. Using a specific design of experiments, the goal is to optimize the response (output variable) of the hC-DEEPSO algorithm which, in this work, is influenced by two input variables, the mutation rate and the communication probability.

Making some changes on mutation rate and communication probability, it is possible to identify the corresponding changes in the output response. In this case, each output response corresponds to each objective function regarding minimization of total system losses and total cost of production. Each objective function f then is a function of mutation (τ) and communication (P) levels. The response expected by the function f(τ,P) can be represented graphically in the three-dimensional space and is called the response surface. The goal is to find the best parameter values, τ and P, that minimize each objective function.

To construct an approximation model that captures the interaction between those input variables, τ and P, a factorial experiment is necessary [43]. In simple words, in a factorial experiment the input variables are varied at the same time instead of one at a time. The lower and the upper bounds for mutation and communication rates are empirically set to [0.2, 0.9]. Each input variable is defined at only the upper and down level bounds at each discretization of the predefined range. In total, hC-DEEPSO is run 1984 times for each test problem.

Using the input variable values and the corresponding value for each objective function and test scenario in SCOPF, a second-order model for the response surface can be fitted. All executions were performed on a small Cent-OS Cluster composed by 32 Intel Xeon E5-1650 3.5GHz cores and 32GB of RAM memory. The other initialization parameters, empirically chosen, are shown in Table 6. Figure 9 shows the response surfaces, and their corresponding contour plots, obtained using the mean and best objective function values found on ORDP problem - IEEE 57 bus system.

Table 6 Initialization parameters
Fig. 9
figure 9

Response surfaces, and their corresponding contour plots, obtained using the mean and best objective function values of IEEE 57 Bus System in ORPD problem

It can be observed that the best set of parameters obtained for mutation and communication is [τ,P] = [0.6,0.2] with a mean value of total active power loss equal to 24.7286 MW. Furthermore, using the response surface generated via the best objective function values, the best set of parameters is [τ,P] = [0.4,0.3], resulting in a total active power loss of 24.606 MW. Similarly, hC-DEEPSO is used to solve OARDP problems, whose objective is to minimize the total cost of energy production. Figure 10 shows the response surfaces, and their corresponding contour plots, obtained using the mean and best objective function values found on OARDP problem for the IEEE 57 bus system scenario.

Fig. 10
figure 10

Response surfaces, and their corresponding contour plots, obtained using the mean and best objective function values of IEEE 57 Bus System in OARPD problem

In OARPD problem, it can be observed that the best set of parameters obtained for mutation and communication is [τ,P] = [0.9,0.7] with an mean value of total cost of energy production equal to 41691.5 $/h. Using the response surface generated via the best objective function values, the best set of parameters is [τ,P] = [0.3,0.3], resulting in a total cost of energy production of 41686.9 $/h.

Same methodology was applied to IEEE 118 bus system and IEEE 300 bus system using ORDP and OARDP problems. In all cases, the response surfaces and this corresponding contour plots were generated using the mean and the best objective function values. Similar response surfaces were obtained and the best configuration is [τ,P] = [0.9,0.4] for a mean result of 117.9 MW regarding the total active power losses and, when using the best objective function values, [τ,P] = [0.6,0.4] resulting in a total active power losses equal to 117.4 MW.

For OARDP within IEEE 118 bus system scenario and using the mean objective function values, the best parameter configuration is [τ,P] = [0.7,0.2] resulting in 135560.03 $/h of a total cost of energy production. Using the best objective function values, the best parameter configuration is [τ,P] = [0.7,0.2] resulting in 722160.00 $/h of total cost of energy production. The best set of parameters obtained for mutation and communication is [τ,P] = [0.8,0.3] with an mean value of total active power losses equal to 394.048 MW. Furthermore, using the response surface generated via the best objective function values, the best set of parameters is [τ,P] = [0.9,0.6], resulting in a total active power loss of 387.09 MW.

The obtained results in factorial experiment show that hC-DEEPSO algorithm performs best when the mutation rate used is greater than 0.5 in all cases and that the communication rate was always lower than the communication rate. It can be concluded that the DE mutation operator incorporated the motion equation of hC-DEEPSO produced a beneficial effect to the algorithm. In addition, it is conclusive that the global optimum information at each iteration is not an effective measure since the communication rates were always less than 0.5 (except for IEEE 57 bus system - OARPD).

3.5 Performance analysis

After having the best parameter configuration, τ and P, for hC-DEEPSO to solve ORDP and OARDP problems in the considered test scenarios, it is necessary to evaluate its performance comparing with some state-of-the-art algorithms. For this task, three different algorithms, DEEPSO [17], MVMO [19] and ICDE [44] in their best overfit initialization parameters, chosen. These algorithms were used to solve SCOPF problems and were extracted from Competition on Application of Modern Heuristic optimization algorithms for solving optimal power flow problems [42]. The competition represents an initiative for development of power system optimization test beds, providing some comparative analysis, in the field of heuristic optimization. Preliminary tests proved that all test cases are solvable however finding feasible solutions has proven to be a hard-to-solve task.

Although MVMO was not a participant algorithm, it was used to produce reference results for comparisons. It is worthwhile to notice that DEEPSO was the winner of the 2014 Competition. The other algorithms participating on that competition have not been considered in this comparison, because they violated the restrictions of the given problem and given their inferior performance. It is important to highlight that some algorithms in the competition are tailor-made while others utilize specialized mechanism to handle the continuous and discrete variables.

In the experimental setting, the SCOPF problems were treated as black-box task which should be solved for the test cases. Final results for each optimization test bed over 31 independent runs were used in the statistical test to assess the algorithm performance. The only stopping criteria is the completion of the maximum number of function evaluations: in the IEEE 57 bus system, the maximum number of function evaluation is set to 50,000, in IEEE 118 bus system it is set to 100,000 and, in the IEEE 300 bus system, the maximum number of function evaluations is set to 300,000. All the algorithms extracted from the competition have been fine-tuned. So, the best parameters for mutation rate and communication probability obtained in each test case were used in hC-DEEPSO. Table 7 shows the results of the three algorithms used to solve SCOPF problems [42] and results for hC-DEEPSO.

Table 7 Mean and standard values for hC-DEEPSO, DEEPSO, ICDE and MVMO on ORDP and OARDP problems using the three test scenarios

The mean values and standard deviation, for all the runs, are shown and, since it is a minimization problem, lower mean values are preferable over the higher ones. The best mean and standard deviation values are marked in boldface. In a very raw analysis, the hC-DEEPSO shows better results than the DEEPSO and ICDE algorithms, when compared in terms of mean values in all the three test scenarios for the ORDP problem. The same can be seen for OARDP problem, except in IEEE 118 bus system scenario. In this case, MVMO has a better mean value when compared to hC-DEEPSO.

For assessing the statistical significance of the results, it is necessary to perform an statistical inference on the difference between each pair of mean values. A T-test [43] can be performed to compare more effectively the obtained results. Such test can be used if one wants to compare results of population samples on a “two by two” basis. The null hypothesis adopted in this work is the equality of means, so the experiment is designed to detect whether this hypothesis is rejected or not using a significance value α = 5%. If the null hypothesis is reject, a post hoc comparison can be done to determine which one is the best algorithm. Tables 8 and 9 show the results of the T-test, using the P-Value calculated, and the results after the post hoc comparison for ORDP and OARDP problems, respectively. Blank values mean that the post hoc comparison is not able to detect any statistical difference between the algorithms.

Table 8 Comparing results using T-test and a post hoc comparison in ORDP problems
Table 9 Comparing results using T-test and a post hoc comparison in OARDP problems

Analyzing ORDP problem results, T-test indicated that, with 95% of confidence, hC-DEEPSO shows better results compared to DEEPSO, ICDE and MVMO in IEEE 57 bus system. For IEEE 118 bus system and IEEE 300 bus system scenarios, hC-DEEPSO is better than DEEPSO and ICDE. However, the statistical test is not able to detect any difference between hC-DEEPSO and MVMO. Examining OARDP problem results, the T-test indicated that, with 95% of confidence, hC-DEEPSO shows better results compared to DEEPSO, ICDE and MVMO in IEEE 57 bus system. For IEEE 118 bus system and IEEE 300 bus system scenarios, hC-DEEPSO is better than DEEPSO and ICDE. However, MVMO is better than hC-DEEPSO in IEEE 118 bus system and the statistical test is not able to detect any difference between hC-DEEPSO and MVMO in IEEE 300 bus system.

The experimental results showed that the proposed hC-DEEPSO was able of controlling the operation of large power systems successfully, as an economical solution for optimizing the fuel generation cost and power losses and voltage profile. In particular, if we make a future projection of the economy for the dispatch in the IEEE 300 bus system, it is possible to observe an economy of approximately $1.4 million using hc-DEEPSO instead of MVMO for the period of one year. The proposed hC-DEEPSO demonstrated the effectiveness comparable or better than those presented by state-of-the-art algorithms of the literature. The hC-DEEPSO has complied with all restrictions imposed by the problems if it shows a safe approach to the operation.

4 Conclusion

The competitive structure of modern energy available resources present new changes and challenges to future electrical energy production in the World. Following this, new techniques are being developed for optimization of the operation in large scale networks. In this paper, a hybridization of DE and PSO coupled with a specialized search operator was presented for solving non-linear, highly constrained, mixed-integer, multimodal Optimal Power Flow problems. To ensure adequate continuity and security of the energy supply, some contingencies of equipment are included in the model in order to preserve the inequality constraints in case of any equipment outage. In this case, the problem is known as Security Constrained Optimal Power Flow problem. The proposed hC-DEEPSO, a hybrid metaheuristic that incorporates distinct features of DE and PSO, is applied to solve SCOPF problems, ORPD and OARPD. Due to a large number of constraints and contingencies in SCOPF problems, the mathematical solution to these problems can become hard to find and finding a feasible solution is a very hard task. To overcome the inherent difficulties of these problems, a multipoint search operator is proposed, aiming to find a local optimum in the beginning of the search and, to maintain a certain degree of diversity, a simple diversity mechanism is also applied. The proposed multipoint search operator, in order to carry out an in-depth investigation from the best individual in the population, guarantees hC-DEEPSO to achieve a better performance than its original version.

The effectiveness of the proposed algorithm was investigated through a comparative study using the algorithm version without the canonical DE mutation operator and the multipoint search operator. Using a test case, the proposed hC-DEEPSO has been proven to be more efficient when compared with the previous version. A parameter fine-tunning procedure for hC-DEEPSO was also carried out using the Response Surface procedure and, using the optimal parameters, hC-DEEPSO was tested against three different algorithms, DEEPSO, ICDE nd MVMO, to solve SCOPF problems using three test scenarios. Experimental results showed that hC-DEEPSO obtained results competitive with those present in the literature. According to statistical comparison, the results for IEEE 57 bus system showed that, with 95% confidence level, hC-DEEPSO proven to be better than ICDE, DEEPSO and MVMO algorithms in all test cases. In ORDP problem, for IEEE 118 bus system and IEEE 300 bus system scenarios, hC-DEEPSO was better than DEEPSO and ICDE. However, the statistical test was not able to detect any difference between hC-DEEPSO and MVMO in both scenarios. In OARDP problem, for IEEE 118 bus system and IEEE 300 bus system scenarios, hC-DEEPSO was better than DEEPSO and ICDE. However, MVMO was better than hC-DEEPSO in IEEE 118 bus system and the statistical test was not able to detect any difference between hC-DEEPSO and MVMO in IEEE 300 bus system. Therefore, hC-DEEPSO is a relevant hypothesis tested in this research as a method of good performance and suitable to be used to solve problems of this nature.