Optimization of nonlinear controller with an enhanced biogeography approach

. This paper is dedicated to the optimization of nonlinear controllers basing of an enhanced Biogeography Based Optimization (BBO) approach. Indeed, The BBO is combined to a predator and prey model where several predators are used with introduction of a modified migration operator to increase the diversification along the optimization process so as to avoid local optima and reach the optimal solution quickly. The proposed approach is used in tuning the gains of PID controller for nonlinear systems. Simulations are carried out over a Mass spring damper and an inverted pendulum and has given remarkable results when compared to genetic algorithm and BBO.


Introduction
PID controllers are easier and efficient solutions in engineering applications because they do not need prior knowledge of the process to be controlled.The PID control involves three gains to be determined: Proportional, Integral and Derivative [1].
Biogeography based optimization (BBO) is an evolutionary algorithm (EA) initially developed in [8].It takes cue from the science of biogeography which studies the movement of species between islands moving from less habitable places to good ones.It operates by sharing information between candidate solutions (habitats).
Since its development, several researchers tried to enhance the BBO algorithm, so in [9], the performance of BBO is accelerated with the help of a modified mutation and clear duplicate operators while in [10], a blended migration operator was introduced.Authors of [11] proposed three variations of BBO called Total immigration BBO, Partial emigration BBO and Total emigration BBO using Markov models.In [12], modified migration and mutation operators are used in a biogeography optimization of a PID controller.
Authors of [13] introduced the Predator and Prey model (P&P) to enhance the diversification process in the BBO.
Predator and Prey (P&P) is a natural model where groups of preys try to flee from predators to survive, this model has been used to explore new parts of the search space in optimization problems [13,14].
In this paper we introduce a new approach: Predator and Prey based modified biogeography optimization (PMBBO) where a new modified migration operator is used to prevent best solutions from being deteriorating while the mutation is replaced by a predator and prey behavior in aim to ensure diversification and speed up the optimization process by avoiding to stay a lot of time in local optima.In difference with [13], we propose to consider a set of predators instead of one and to use a variable hunt rate and a new prey movement formula is also introduced.
The proposed approach (PMBBO) is validated through numerical simulations to tune the PID controller parameters for a nonlinear inverted pendulum.A comparison of the performances of our approach with those of BBO and GA is done [7].
The remainder of this paper is organized as follows: In section 2, the PID control structure is defined.Section 3, is dedicated to the original biogeography based optimization (BBO) while in section 4, the proposed improvement approach is detailed where the new introduced operators are described and the chart of the proposed algorithm is given.Section 5 is dedicated to the architecture of tuning PID controller with the PMBBO approach.The last section is divided into three subsections: In the first, numerical simulations of the application of PMBBO in tuning PID controller for nonlinear systems (Mass spring damper and inverted pendulum) are presented.Next, comparison of our approach with genetic algorithms and Biogeography based optimization is carried out.

PID Control
PID control consists of three components: Proportional, Integral and Derivative part (See Figure 1) [1].The controller aims to reduce the error between the plant output y(t) and the desired output yd(t) which is given in Eq. ( 1 The BBO algorithm uses a vocabulary similar to that of biogeography where each habitat is similar to a solution of the problem; features of a solution are called suitability index variables (SIV).Each solution is evaluated and its quality is called the Habitat suitability index (HSI) which is analogous to the fitness in genetic algorithms [16].
The whole BBO algorithm could be explained as follows [7]:  Step 1: The BBO starts by initializing the algorithm parameters: the SIV's number nsiv and ranges, maximum species number, termination criterion (generation number or other performance criterion), maximum immigration and emigration rates E and I, mutation coefficient and define the appropriate HSI, then the start population islands are generated randomly [20].


Step 2: Evaluate each island in the population, get its HSI value and map it to obtain the species count s.Immigration and emigration rates λ i and μ i are calculated in this step by Eq. (3): where smax is the maximum species number and ki is the rank of the habitat Hi after evaluation.E and I are maximum immigration and emigration rates respectively.The immigration and emigration curves are straight lines (See Figure 2).Simon's Classical where  is the assignment operator.In each generation, the probability of an island is modified using Eq.(6): where s P is the variation of probability given by Eq. ( 7):  The whole BBO algorithm chart is presented in Figure 3.
where c=1..nsiv.and In this paper, we propose that best islands shared information according to their quality against all other islands.Our migration operator is given in Eq. ( 10): where max j k s   .

Predator and prey model
Predators usually search for groups of animals to hunt, preys by their nature, try to run away from predators looking for safe places to ensure their where  is the hunt rate whose value is given in Eq. ( 12), g is the current generation and gmax is the maximum generation number.
We choose the value of ρ to be decreasing to the fact that, as generation's number increases, we need more to intensify the search than diversifying.
 For the next generation, update other solutions values (preys) i g H ( g ib  ) to make them run away from the predator in order to explore new parts of the search space.The new positions are calculated by Eq. ( 13): where d is the distance between a prey and the predator.

Description of PMBBO algorithm
We propose to modify the BBO originally developed by [8] by introducing two major modification: First we replaced the original migration operator given by Eq. (4) by our novel operator in Eq. (10) to prevent best islands to be deteriorated, Second we propose to replace the mutation operator by Predator and prey model since it is a natural process like biogeography and it ensures diversification.Indeed, in nature species try to find habitable places and avoid predators.We propose also to use more then one predator, this is motivated by the fact that predators usually hunt in groups.let ' are the minimum and maximum possible ranges of the features of an island H, μ is a random number between -1 and 1.The new PMBBO approach is described by the chart in Figure 4.

Tuning PID Controller Using PMBBO
Adjusting the PID parameters could be considered as an optimization problem where we try to find the optimal solution inside a predefined search space to fulfill a desired reference of a nonlinear system.In this context, the PMBBO algorithm could be used to find the optimal combination of the proportional, integral and derivative parts of the controller, so the variables of islands(SIV) in our problem are the three gains of the PID controller Kp, Ki, Kd.The gains must be in a user defined range regarding to the system physical limits (See Eq. ( 17)): To evaluate the habitats, we use one of the objective functions HSI given by Eq. ( 18): where Ts and Tr are the settling and rising times respectively.Omax is the overshoot and es is the steady state error while be is a weighting constant.
The implementation of the PMBBO for tuning PID is shown in Figure 5.

Simulation Results
To evaluate the proposed BBO improvement algorithm, it will be used to tune PID controller for two nonlinear systems

Nonlinear Mass spring damper system
A mass-spring-damper (MSD) nonlinear system with friction is considered (Figure 6) (Eq.19), where we want to move the mass M accurately to the reference position (x=1 in our case) using a PID controller [1].
The dynamic model of the system is given in Eq. 19.
The initial parameters of the PMBBO algorithm used in tuning the mass spring system are in Table 1.
The desired and real positions are in Figure 7 while the position errors are in Figure 8. Velocity of the mass is in Figure 9.
Figure 10 and Figure 11 show the evolution of the HSI and best gains during the run of BBO respectively.The PMBBO algorithm has found the optimal gains in few generations (10 generations).The resulted gains give a good result in steady error and rising time (Figure 8).

Inverted pendulum system
The second application of the PMBBO algorithm is to tune PID controller parameters to control a nonlinear inverted pendulum system (IP) (Eq.20).The controller aims to keep the rod vertical while moving the cart so the desired angle is to be (θ = 0) (See Figure 12) [15].The algorithm parameters are in Table 2 and HSI in Eq. (18a) was used.
With ,  are the angular position and velocity of the rod respectively, g is the gravity, m the mass of the rod and mc the cart mass; l is the half of rod length [10] with m=0.1Kg, mc=1Kg, g=9.8m/s 2 and l=0.5m.
The obtained angle error of the inverted rod is presented in Figure 13, PID output signal in Figure 14.
We see that the inverted pendulum angle converges to zero starting from ( /10)   with a small overshoot (0.0125 ) rad , settling and rising times are less then (0.1s).These good performances are obtained due to the optimization power of the PMBBO witch gives us the best combination of Kp, Ki and Kd.The optimal found gains are: Kp= 21.423; Ki= 4.486; Kd=16.129.
The evolution of the best HSI values Eq. (18a) is in Figure 15 and the best gains of each generation are in Figure 16.

Comparing PMBBO approach to genetic algorithms
The performances of the PMBBO had been compared to those of Genetic algorithm (GA), Biogeography based optimization (BBO), Modified migration based BBO (MBBO).The comparison was in the same conditions (generation number, population size, initial population), the angle error of the inverted pendulum for GA, BBO and PMBBO are represented in Figure 17.
For comparison purpose, we run each algorithm 10 times.For each run, the same start population was used in the same conditions (initial population, generation number and population size) for GA, BBO, MBBO and PMBBO.We measured the minimum costs (HSI for BBO versions and fitness for GA).results are in Table 3.
From Table 3, PMBBO gives good results even with different runs and different start populations, this is due to the modified P&P behavior witch avoid local optima and improve the BBO.This results are detailed in Table 4 and Table 5 where it'is clear that PMBBO optimal gains enhance the system performances (Rising time Tr, Settling time Ts and maximum overshoot Omax) where PMBBO gets better results then GA    The presented optimization approach could be used in tuning a PID controllers for nonlineaar systems where the controller gains are found only by Trial /Error.When applied to real systems, the enhanced biogeography approach needs the desired performances of the plant to be given.After that, the designer has to run the algorithm to tune the gains offline.The optimal values are injected into the real PID controller.

Conclusion
We presented in this paper a PID tuning method using the enhanced Biogeography based optimization.
The BBO was enhanced by two major modification: A new migration operator to share better the good feaures between islands and the mutation operator was replaced by a predator and prey model to improve its diversification process.The SIVs of the algorithm are the three gains (Proportional, Integral, and Derivative).We tested our approach to control a mass spring damper nonlinear system and an inverted pendulum with good performances for the two nonlinear systems using two cost functions based on system performances.
A comparison of the proposed enhanced approach with BBO and genetic algorithms was presented.The compared approaches were applied to tne a PID controler of an inverted

Figure
Figure 3. BBO flowchart 4. Predator and Prey Modified Biogeography Optimization (PMBBO) 4.1.Modified migration operator In difference with the modified migration operator in [12] who based on works of [10].The new introduced operator in this paper does not only reconstruct existing islands but it can provide a new solution to the population witch increase diversity of the optimization problem.This operator shares information between habitats using Eq.(9):

Table 5 .
Performances of the PID controlled inverted pendulum GA.