Novel Adaptive Bacteria Foraging Algorithms for Global Optimization

This paper presents improved versions of bacterial foraging algorithm (BFA). The chemotaxis feature of bacteria through random motion is an effective strategy for exploring the optimum point in a search area.The selection of small step size value in the bacteria motion leads to high accuracy in the solution but it offers slow convergence. On the contrary, defining a large step size in themotion provides faster convergence but the bacteria will be unable to locate the optimumpoint hence reducing the fitness accuracy. In order to overcome such problems, novel linear and nonlinearmathematical relationships based on the index of iteration, index of bacteria, and fitness cost are adopted which can dynamically vary the step size of bacteria movement. The proposed algorithms are tested with several unimodal andmultimodal benchmark functions in comparison with the original BFA.Moreover, the application of the proposed algorithms in modelling of a twin rotor system is presented. The results show that the proposed algorithms outperform the predecessor algorithm in all test functions and acquire better model for the twin rotor system.


Introduction
Bacteria foraging algorithm is one type of bioinspired optimization algorithm that is gaining popularity due to its capability in dealing with numerous real world applications [1].The strategy is based on Escherichia coli (E.coli) bacteria behaviour to find nutrient or food source during their lifetime which consists of several phases.The most prominent phase that determines the performance of the algorithm is the chemotaxis mechanism through random tumble and swim actions.In this phase, the bacteria movement can be made faster if they move with a large step from one location to another location.However, the risk of this option is that the bacteria may be unable to locate the optimum food source location if it is positioned in a remote area.From an optimization point of view, this results in faster convergence but low accuracy.On the contrary, the optimum food source location might be easily found if the bacteria are moving with smaller step size.Nevertheless, with this choice, bacteria require more time and more steps need to be considered in order to reach the optimum food source.In other words, the convergence speed of the algorithm is slower but high accuracy can be achieved.In order to overcome such problems, variation of bacteria step size throughout the search operation might be introduced.This can be realized through adaptation of a certain relationship such as using mathematical formulation and fuzzy logic approach.
There are several adaptation mechanisms previously adopted by researchers to improve BFA performance.Reference [2] employed Takagi-Sugeno fuzzy logic scheme to establish relationship between bacteria step size and minimum value of actual cost function at every iteration.Four fuzzy rules based on triangular membership function were used in the adaptation scheme.Another adaptive scheme using fuzzy logic approach was presented by [3].In the work, the authors used Mamdani-type fuzzy inference with Gaussian membership function which established relationship between bacteria step size and nutrient value.This technique also was used by [4] to solve congestion management problem.Another popular adaptation technique is through incorporation of mathematical formulation.Reference [5] proposed a simple linear formulation to vary the step size within [0, 1] based on fitness value at every iteration.The analytical work on the formulation was conducted by [6], which showed that it was capable of improving convergence speed of BFA.Reference [3] presented a similar adaptive scheme with nonlinear equations where they offer more flexible range of bacteria step size, which can be defined within [0,  max ], where  max is maximum step size.Alternatively, instead of using cost function value, the bacteria step size can be varied based on number of iterations.References [7][8][9] utilized the total number of chemotaxis or bacteria lifetimes and index of chemotaxis to vary the step size within a specified range [ min  max ].Reference [10] used the index of reproduction, elimination, and dispersal loops to adjust the step size.References [11][12][13] incorporated the total number of iterations and current iteration to introduce bacteria step size within user defined range [ min  max ].Through these approaches, bacteria move with maximum step size  max at the early search operation and they continuously move with smaller step until reaching  min when approaching last iteration.
In this work, the bacteria step size is dynamically varied based on the combination of index of iteration and index of bacteria in the population and the combination of all indexes and fitness value.Linear and nonlinear adaptive formulations are established which effectively improve the BFA performance.The rest of the paper is organized as follows.Section 2 provides detailed explanation about the proposed adaptive BFA algorithms.Validation of the proposed algorithm in comparison to its predecessor algorithm with unimodal and multimodal benchmark functions as well as in optimizing parameters of an autoregressive with exogenous inputs (ARX) model for a twin rotor system is presented in Section 3. Section 4 provides conclusion of the paper.

Adaptive Bacteria Foraging Algorithm
The details of adaptive schemes for bacteria foraging algorithm are presented in this section.The full elaboration of original BFA can be referred to in [1].The modification here is the chemotactic step size in the chemotaxis phase of BFA, which has a significant impact on the BFA performance.The introduction of the adaptive schemes into chemotaxis phase in BFA aims to improve the convergence speed and fitness accuracy of the algorithm.This can be done if the exploration and exploitation stages throughout the search operation are kept balanced.Adopting a relationship between bacteria step size and the combination of iteration index, bacteria index, and fitness value in the population to replace constant step size is a proposed solution to the problem.

Linear
Adaptive Bacteria Foraging Algorithm.The mathematical equation for linear adaptive bacteria foraging algorithm (LBFA) is defined as where  LBFA , , , , and  are bacteria step size, index of total number of bacteria in the population, index of total number of chemotaxis or bacteria lifetimes, index of total number of reproduction, and index of total number of elimination and dispersal events, respectively.The constant  is a rate of convergence, which has a very high impact on the performance. max is bacteria maximum step size and  is constant equal to 0 or 1.Notice that the equation is rearranged such that it is reciprocal to the product of iteration index and bacteria index.This approach enables bacteria to move with large step if [ ×  ×  × ] is small, making it a good strategy for exploration thus resulting in faster convergence.On the contrary, bacteria move with smaller step size when approaching last iteration or when [ ×  ×  × ] is large so that the location of optimum point can be traced accurately due to better exploitation technique.In the equation, the step size is varied within [0,  max ] if constant  is defined as 1.
On the other hand, the range of step size is changed within [0, ∞] if constant  is set to 0. Small value of  produces large range of step size, which increases convergence speed while large value yields smaller step size range thus leading to slower convergence.

Nonlinear
Adaptive Bacteria Foraging Algorithm.The mathematical equation for linear adaptive BFA is further modified as a nonlinear adaptive bacteria foraging algorithm (NLBFA).It is defined as where the constant  ̸ = 0 is the order of the equation while the other parameters are the same as in (1).Defining  away from zero increases step size range, which can accelerate bacteria movement and contribute to faster convergence.The  selection of  and  is crucial in determining performance of the algorithm.

Fitness-Iteration
Based Adaptive Bacteria Foraging Algorithm.Fitness and iteration index based adaptive BFA (FIBFA) is a technique to vary bacteria step size through a relationship based on a combination of fitness value of bacteria in each iteration and index of total iteration of BFA.Equations ( 1) and ( 2) are further modified and FIBFA can be mathematically defined as where the constant  ̸ = 0 is the order of the equation, the constant  is a rate of convergence, and (, , , ) is fitness value of bacteria in each iteration while the other parameters are the same as in ( 1) and (2).Apart from the schemes presented in (1) and (2), FIBFA is designed such that  is increased and approaching  max when J is large and  is reduced towards zero when  is small.Moreover, with the introduction of  into the equation, different step sizes for every bacterium can be realised in each iteration.

Implementation and Results
The section presents the implementation of the proposed algorithms to find global optimum point for two unimodal and two multimodal functions.In order to see the effectiveness of the proposed schemes, each function is defined with different dimensions, ranging from low to high order.Moreover, the application of the proposed algorithms in determining high order dynamics model of twin rotor system is also presented.In this work, as a matter of comparison, the number of bacteria,  = 20, number of swims,   = 4, number of iterations, and initial position of bacteria are kept the same in all cases.This provides equal chances for the algorithms to locate the global optimum point.

Unimodal Ackley Function. Ackley function is defined as
The function has global minimum at   = [0, 0, . . ., 0] with fitness () = 0.The Ackley function was considered with dimension  = 2 and variable   in the range [−32.768,32.768].The total number of chemotaxis,   = 500, total number of reproduction,  re = 6, and total number of elimination and dispersal,  ed = 6, were chosen for all algorithms while bacteria step size  = 0.00005 was selected for BFA.The parameters for LBFA were defined as  max = 1,  = 1, and  = 0.5 and for NLBFA the parameters were defined as  max = 1, = 1, = 0.5, and  = 2.The parameters for FIBFA were  max = 0.99,  = 1,  = 1,  = 1,  = 1, and  = 1.The convergence plot for twodimensional Ackley function is depicted in Figure 1.Notice  that FIBFA achieved the fastest convergence speed and all the proposed algorithms performed better than BFA.

Multimodal Rastrigin Function. Rastrigin function is defined as
The function has global minimum at   = [0, 0, . . ., 0] with fitness () = 0.The Rastrigin function was considered with 10 dimensions and variable   in the range [−5.12, 5.12].The parameters   = 1000,  re = 7, and  ed = 7 were chosen for all algorithms while bacteria step size  = 0.000045 was selected for BFA.The parameters for LBFA were defined as  max = 1,  = 0, and  = 0.1 while  max = 1,  = 0,  = 0.2, and  = 0.8 for NLBFA.The parameters for FIBFA were  max = 0.1,  = 1,  = 0.09,  = 1.9,  = 10, and  = 3.1.The convergence plot for 10-dimensional Rastrigin function is shown in Figure 4.Note that the FIBFA achieved the best accuracy compared to others.Numerical values of the best fitness accuracy achieved by the algorithms under study are summarized in Table 1.
Notice that, in Figures 1, 3, and 4, the proposed adaptive BFA algorithms show spikes in the beginning of their convergence graphs as a result of setting large step size in the early iterations.However, towards the end of the iteration process, the figures show that the graphs become smoother and display higher convergence speed and better accuracy.Table 1 shows that FIBFA achieved the best fitness accuracy for Ackley, Sphere, and Rastrigin functions.On the other hand, all algorithms gave perfect result for Shubert function.

Modelling of Twin
Rotor System.Twin rotor system is a highly unstable nonlinear dynamic system, which is often used as a platform to test a controller.It is laboratory scale equipment that mimics a real helicopter in hovering mode.A schematic diagram of the twin rotor system is shown in Figure 5.The main rotor moves the system up and down while the tail rotor rotates the system horizontally about yaw axis.Complex body construction and multi-inputs multioutputs nature cause the dynamic modelling for the vertical and horizontal channels of the twin rotor system is difficult.
An effective solution to model such a system is through system identification approach.The advantage of this method is that a complex dynamic system can be modelled accurately even when there is no prior information about the physical system available [14].Moreover, through incorporation of optimization algorithm, the optimum parameters of the model may be determined effectively.A schematic diagram for modelling of twin rotor system in hovering mode (vertical channel) optimized by adaptive bacteria foraging algorithms is represented in Figure 6, where ŷ() is the estimated output while () and () are recorded output-input from experimental exercise.In this work, a fifth-order ARX structure is considered for modeling of vertical channel of twin rotor system.The ARX model can be represented in discrete transfer function form as Therefore, there were 10 parameters required to be optimized making it a 10-dimensional problem.In this modelling task, as a matter of comparison,  = 10,   = 4,   = 100,  re = 4,  ed = 4, and initial position of bacteria were kept the same for all algorithms.This provides equal chances for the algorithms to trace the global optimum point.Moreover, for simplicity,  max = 1 was chosen for all problems in determining adaptive step size of bacteria.The constant step size  = 0.00575 was selected for BFA.The parameters for LBFA were defined as  = 0 and  = 0.7 while  = 0,  = 0.5, and  = 0.8 for NLBFA.The parameters for FIBFA were  max = 0.1,  = 1,  = 0.6,  = 0.8,  = 1, and  = 0.8.The comparisons of convergence plot, vertical channel response, and modelling error for all optimization  Notice that all the proposed adaptive algorithms converged faster than standard BFA.Moreover, NLBFA had the best fitness accuracy of 8.2616 followed by LBFA, FIBFA, and BFA, with best fitnesses of 9.2216, 9.4190, and 11.4488, respectively.The vertical channel responses in modelling and validation phases show that all the algorithms successfully followed the actual response with very small error.It can be clearly seen from Figures 9 and 11 that LBFA had the smallest error range.
The numerical values of the time domain response in both modelling and validation phases are summarized in Table 2.The table reveals that LBFA had the smallest error range.The power spectral density plot in validation phase shows that the acquired model had dominant mode frequency at 0.35 Hz, which is consistent with the previously reported work [14].

Conclusion
Novel linear and nonlinear adaptive bacteria foraging algorithms have been proposed.The introduction of adaptive schemes into bacteria foraging algorithm balances the exploration and exploitation parts and hence provides more efficient search strategy.Simulations with unimodal and multimodal benchmark functions with various dimensions have shown that the proposed algorithms improve the speed of convergence and fitness accuracy which implies that the proposed schemes find better optimum point in shorter time.Moreover, the application of the proposed algorithms to estimate a high order dynamics model for vertical channel of twin rotor system has shown that the proposed algorithms outperform their predecessor algorithm in terms of fitness accuracy, time domain, and frequency domain responses of the estimated model.The application of the proposed algorithm to other real world problems such as optimization of intelligent controller parameters for flexible systems will be investigated in future studies.

Figure 9 :
Figure 9: Comparison of errors in modelling phase.

Figure 10 :
Figure 10: Comparison of vertical channel responses in validation phase.

Figure 11 :
Figure 11: Comparison of errors in validation phase.

Figure 12 :
Figure 12: Comparison of power spectral densities in validation phase.

Table 1 :
The best fitness of the BFA, LBFA, NLBFA, and FIBFA on the benchmark functions.

Table 2 :
Performance of the BFA, LBFA, NLBFA, and FIBFA in modelling twin rotor system.