Abstract
The paper proposes a new set of improved Quantum-behaved Particle Swarm Optimization (QPSO) algorithms by using the avoidance from the worst behaviour. The avoidance behaviour, which consist in introducing personal/local or global worst terms, are applied to the attractor’s formula. The enhanced QPSO algorithms are targeted towards benchmark electromagnetic optimization problems, and their efficiency is tested and tuned on Loney’s solenoid.
Introduction
The PSO (Particle Swarm Optimization) algorithms are part of stochastic optimization methods which use a population of candidate solutions that evolve over time. Comparable in terms of performance with the genetic algorithms, these algorithms are problem independent and are suitable for solving difficult optimization problems where the analytical expression of the objective function is not known.
First proposed by Kennedy and Eberhart in [1], the original PSO (classic) has its root in biology and is inspired by social behaviour within fish schools or bird flocks. Each particle in the swarm (population) is characterized by its current position and velocity. The position encapsulates the potential solution of the optimization problem, while the velocity influences how that position will be changed at the next iteration.
The main issues of the classical PSO are the high probability to get stuck in a local minimum and the large number of iterations required to find the global solution. Over time, to improve the performance of the PSO algorithm several solutions have been proposed in the literature [2], but the most efficient options currently available are based on SPSO (Standard PSO) [3] and QPSO (Quantum-behaved PSO) [4].
The SPSO and QPSO algorithms have been successfully used to solve a variety of problems, such as [5,6], but also to solve electromagnetic optimization problems [7–9]. Although the latest QPSO versions proposed by Sun&others [10–12] are better than the SPSO algorithm when optimizing CEC benchmark functions, in case of statistical studies conducted on electromagnetic optimization problems the SPSO algorithm is more stable [13,14]. In some cases the performance offered by the QPSO based algorithms provide better solutions (smaller values of the objective function) but statistically the QPSO based methods are outperformed by the SPSO algorithm, which provides a smaller mean and a smaller standard deviation.
To improve the QPSO algorithms performances when solving electromagnetic problems this paper studies and proposes the enhancement of the QPSO algorithm using avoidance from the worst behaviour strategies.
The avoidance behaviour was succesfully applied in the past to improve the performances of the PSO based algorithms.
In 2002 Riget and Vestterstorm proposed the ARPSO (Attractive and Repulsive PSO) [15]. To avoid being premature trapped in local minima the algorithm introduces a diversity factor which controls the exploration and exploitation. Later in 2010 Liu et al. proposed MARPSO (Modified ARPSO) [16] an improved version of the algorithm which makes the convergence even faster.
In 2005 Yang and Simon [17] proposed a PSO based algorithm which does not include attraction terms to personal or global best positions and only considers avoidance from the worst cases.
In 2015 Altinoz, Yilmaz, Duca and Ciuprina [18] improved the SPSO by incorporating the avoindance from the bad behaviour in the 2011 version proposed by Clerc. Three different cases were defined: SPSO-CA (Cognitive Avoidance) with avoidance from the personal worst memory, SPSO-SA (Social Avoidance) with avoidance from the group (neighborhood) worst memory, and SPSO-CSA (Cognitive and Social Avoidance) with avoidance from both personal and group worst memories. Using CEC benchmark tests we have shown that the best approach is SPSO-SA.
In 2016, Min-Kyu Baek et al. [19] introduce an improved attractive and repulsive PSO algorithm. The algorithm improves the exploration and exploitation by introducing a penalty factor which forces the particles to move away from the global worst particle taking into account the distance of each particle relative to the worst position. The superiority of the new algorithm is demonstrated on nonconvex economic optimization problems.
In the present paper several avoidances from the worst strategies are introduced for the first time in the QPSO algorithms. The avoidance terms, social and/or cognitive, with or without penalty factors, are applied to the attractor’s formula of the classic QPSO. The newly proposed algorithms are tested on Loney’s solenoid benchmark, a nonconvex and difficult electromagnetic optimization problem.
QPSO with avoidance behaviour
Unlike PSO and SPSO algorithms, where the particle trajectories are according to Newton’s mechanic laws, QPSO is a quantum system proposed by Sun & others [4]. In QPSO the behaviour of each particle is described by a wave function 𝛹 (Schrödinger’s equation) |𝛹|2 being the probability density function for the particle position. On the other hand, while in the PSO algorithm the particles converge to the solution through the global best position, in QPSO the particles exert a greater influence on each other through an average of the personal best positions, so the probability to get stuck in a local minimum is smaller.
The coordinate j for a particle i at the step (t +1) is given by:
Three different avoidance from the worst behaviour strategies are proposed and analyzed for enhancing the QPSO algorithm, cognitive avoidance (avoidance from personal worst), social avoidance (avoidance from global worst), and combined cognitive and social avoidance (avoidance from the personal and global worst).
Each of the strategies introduces a new term in the attractor formula as follows, terms which move the attractor away from a personal and/or global worst position. In the QPSO with avoidance behaviour from personal worst (cognitive avoidance), denoted QPSO-AB-PW, the so called attractor of the particle i at the step (t) is:
Similar, in the QPSO with avoidance behaviour from global worst (social avoidance), denoted QPSO-AB-GW, the so called attractor of the particle i at the step (t) is:
Finally, in the QPSO with avoidance behaviour from personal and global worst, denoted QPSO-AB-PWGW, there are two new terms in the attractors formula:
The Loney’s solenoid benchmark problem, formulated in [10] consists of a main coil (Fig. 1), with given dimensions (r 1 = 11 mm, r 2 = 29 mm, h = 120 mm) and two identical correction coils, having fixed radii (r 3 = 30 mm, r 4 = 36 mm). A constant current flows through the coils such that they current density is the same. The aim is to produce a constant magnetic flux density in the middle of the main coil. The parameters to be optimized are the length of the correction coils (s) and the axial distance be-tween them (l).
The objective function is of minmax type, i.e. minimize the maximum difference between the values of the magnetic flux density along a straight segment in the middle of the main solenoid, i.e. minimize (B max − B min)∕B 0, where B 0 is the magnetic field density in the middle of the main coil (r = 0, z = 0). The maximum and minimum values are sought along the segment [−z 0, z 0], where z 0 = 2.5 mm. Tests done by the authors of this benchmark revealed that the problem is non convex and ill conditioned [36]. The electromagnetic field problem is easily solved, in a magnetostatic regime, by discretizing the coils in elementary coils without thickness and by applying well known analytical formulas for the field along the solenoid axis.

The Loney’s solenoid problem configuration.
To solve the Loney’s solenoid electromagnetic optimization problem three types of QPSO algorithms with avoidance behaviour have been considered: with cognitive avoidance (QPSO-AB-PW), with social avoidance (QPSO-AB-GW), with cognitive and social avoidance (QPSO-AB-PWGW). For each type of algorithm high (H) and low (L) values for the c constant have been considered, c = 1 and c = 0.5. After a preliminary study, for the QPSO with social avoidance weighted versions of the algorithm have also been tested (QPSO-AB-wGW).
Table 1 presents the solution fitness values for 30 independent tests (runs), each run having different random values for the initial population. For each test the swarm size was 32, and the stop criteria was the maximum number of iterations equivalent to 2560 objective function evaluations. These values have been considered optimal and chosen according with previous studies published in [13]. Mean-best is the average of the best solutions (minimum values) obtained at each of the 30 runs, while Min-best (Max-best) is the minimum (maximum) of the minimum values obtained at each run.
The QPSO with both cognitive and social avoidance behaviour, QPSO-AB-PWGW, does not manage to improve the performances of the classic QPSO neither in terms of best objective function value or stability (mean best, standard deviation). The other two proposed algorithms QPSO-AB-PW and QPSO-AB-GW provide better Min-best OF value for either high or low c value, and QPSO-AB-GW also improves the stability for a high c value.
The best performances of the avoidance behaviour algorithms are obtained with the weigted version of the QPSO with social behaviour, QPSO-AB-wGW, The best overall Min-best is obtained for a high value of the c parameter, while the most stable version is the one with a small value of c.
QPSO with avoidance behaviour performances for Loney’s solenoid problem
QPSO with avoidance behaviour performances for Loney’s solenoid problem
The improvements obtained in terms of stability with the algorithms enhanced with avoidance behaviour for the QPSO with social behaviour can also be seen from the mean-best evolution with the iteration number during the optimization process. Figure 2 shows the superiority of the QPSO with social avoidance over the classic QPSO and the QPSO with cognitive avoidance, while Fig. 3 underlines the fact that the stability is better for low values of c. In the same time, once again, Fig. 3 shows the overall best performance in terms of stability is achieved with the weighted version of the QPSO with social avoidance, QPSO-AB-wGW, for a low value of c.

QPSO classic/with avoidance behaviour mean OF, classic vs. GW vs. PW.

QPSO with avoidance behaviour mean OF, GW vs. weighted GW.
The present paper studied the efficiency of the avoindance from the worst behaviour when applied to QPSO classic algorithm to solve benchmarks electromagnetic problems.
Three different avoidance behaviour strategies have been proposed and analyzed, cognitive avoidance (avoidance from the personal worst), social avoidance (avoidance from the global worst), and combined cognitive and social avoidance. The strategies add new terms in the formula of the particles attractors, terms which move the particles away from personal and/or global worst memories (positions).
The newly proposed algorithms were tested on a nonconvex and ill conditioned problem from electromagnetism, namely Loney’s solenoid. The most suitable approach is the QPSO with social avoidance, which provides both overall best solution and increased stability, smaller mean and standard deviation values. Adding a cognitive behaviour to the previously mentioned approach does not lead to better performances.
For the QPSO with social avoidance was also proposed a weighted version. The approach ponders the term containing the global worst position with a weight. The weight is specific to each particle and is a measure of the relative distance of the particle to the global worst. If a particle is closer to the global worst the value of the weight increases and the influence of the global worst term over the particle’s attractor is bigger.
This last approach, the QPSO with weighted social avoidance, increases even further the performances obtained with the QPSO with social avoidance, offering a better best solution, smaller mean and smaller standard deviation.
Footnotes
Acknowledgements
This work was funded by the Politehnica University Bucharest, through UPB-GEX project no. 76/2016 (id 254/2016), and the Romania – Belgium (RO-BE) bilateral project, EchoMEMS, PN-III-CEI-BIM-PBE, 2017 (id 98 BM).
