The bat algorithm (BA) is inspired by the echolocation behaviour of a small species of bats. Echolocation helps bats orient themselves in the dark for hunting. Most bats using echolocation emit ultrasonic waves of frequency varying from 20 kHz to 100 kHz.

The BA was introduced in 2010 [13]. This algorithm combines the advantages of two different non-deterministic optimization methods: the particle swarm optimization (PSO) and the simulated annealing (SA). The SA method shows high probability of finding a global optimum but only provided that the optimization process is carried out slowly enough. Nowadays, this method is rarely used as a tool to solve tasks of synthesis of permanent magnet machines. On the other hand, the PSO method is commonly used for such tasks [9, 14]. In its classic form, one can notice a strong correlation between the placement of the swarm leader and the trajectory of the whole swarm, where the swarm leader is the most adjusted particle in the swarm system. For this reason, the most advanced method of PSO includes some modifications for the improvement of the performance and the quality of calculations.

The set of bats constitute the colony. Each individual bat represents an acceptance solution of the optimization task. Each bat is described by position **x**^{i} and velocity **v**^{i}. Moreover, it is characterized by variable frequency *F*^{i}, loudness *A*^{i} and the rate of pulse emission *r*^{i}. In *j*-th time step, the bats know the position of leader **x**_{B} – the best bat in the colony. In order to calculate position vector for *i*-th individual, the following formula is used:

$$\begin{array}{}{\displaystyle {\mathbf{x}}_{j}^{i}={\mathbf{x}}_{j-1}^{i}+\left[{\mathbf{v}}_{j-1}^{i}+{F}^{i}\cdot \left({\mathbf{x}}_{j-1}^{i}-{\mathbf{x}}_{B}\right)\right]}\end{array}$$(1)

where *F*^{i} = *F*_{min} + *r*_{1}(*F*_{max} – *F*_{min}), *F*_{max}, *F*_{min} are the minimum and maximum value of frequency, *r*_{1} is the random number, usually selected from the range (0, 1).

The method of setting new consecutive velocity vectors and bats’ position vectors is similar to the algorithm used in the PSO method. The dynamics of bats’ movements in a space of a considered problem depends on the range of change of frequency.

In order to imitate precisely the tactic of a single bat’s hunting, there are two additional parameters defined in the algorithm: a loudness parameter *A*^{i} and the rate of pulse emission *r*^{i}. A hunting bat emits on average 5 – 10 impulses per second but this depends on the species. If it locates an insect in the surroundings, at this very moment the quantity of the impulses raises up to as many as 50 impulses per second. And it is the coefficient *r*^{i} that shows the dynamics of the change of impulses emitted by a bat. This proved to be the most successful parameter order to obtain an improved value of the objective function in the optimization calculations.

The block diagram of the bat algorithm is presented in Figure 1.

Figure 1 Flowchart of the bat algorithm

After setting new positions of each and every bat in the *j*-th time step, a value of *β*_{1} is randomly picked from the range (0, 1), as shown in the Figure 1. Taking into consideration the value of *β*_{1} and the average coefficient of pulse emission for the whole colony *r*_{av}, a new position is defined for the current best-bat in the colony or for a randomly chosen bat according to the formula:

$$\begin{array}{}{\displaystyle (\mathbf{x}\ast {)}_{j}^{i}={\mathbf{x}}_{j}^{i}+\chi {A}_{av}}\end{array}$$(2)

where *χ* is the random number from range (-1, 1), *A*_{av} is the average loudness of all bat population in the *j*-th time step.

If a bat attains a better value of the objective function and it gets closer to the searched optimum point and the random parameter *β*_{2} from the range (0, 1) is smaller than the average loudness *A*_{av} of the whole colony, then the rate of pulse emission *r*^{i} is increased and the loudness *A*^{i} is decreased:

$$\begin{array}{}{\displaystyle {A}_{j+1}^{i}=\alpha {A}_{j}^{i}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{r}_{j+1}^{i}={r}_{0}\left[1-\mathrm{exp}(-\gamma j)\right]}\end{array}$$(3)

where *α* and *γ* are the constants, and *r*_{0} is the initial value of emission rate.

## Comments (0)

General note:By using the comment function on degruyter.com you agree to our Privacy Statement. A respectful treatment of one another is important to us. Therefore we would like to draw your attention to our House Rules.