# Tuning PID Controller Using Multiobjective Ant Colony Optimization

Authors: Ibtissem Chiha; Noureddine Liouane; Pierre Borne
Journal: Applied Computational Intelligence and Soft Computing
 (2012)

---

## Abstract

This paper treats a tuning of PID controllers method using multiobjective ant colony optimization. The design objective was to apply the ant colony algorithm in the aim of tuning the optimum solution of the PID controllers (Kp, Ki, and Kd) by minimizing the multiobjective function. The potential of using multiobjective ant algorithms is to identify the Pareto optimal solution. The other methods are applied to make comparisons between a classic approach based on the “Ziegler-Nichols” method and a metaheuristic approach based on the genetic algorithms. Simulation results demonstrate that the new tuning method using multiobjective ant colony optimization has a better control system performance compared with the classic approach and the genetic algorithms.


---

## Body

## 1. Introduction

Proportional-integral-derivative (PID) controllers are frequently used in the control process to regulate the time domain behavior of many different types of dynamic plants. These controllers are extremely popular because of their simple structure and they can usually provide a good closed loop response characteristic. Despite its simple structure it seems so hard to find a proper PID controller [1]. Considering this problem, various methods have been proposed to tune these parameters.Ziegler-Nichols tuning method is the most standard one but it is often difficult to find optimal PID parameters with these methods. Therefore many optimization methods are developed to tune the PID controllers such as fuzzy logic [2, 3], neural network [4], neural-fuzzy logic [5], immune algorithm [6], simulated annealing [7], and pattern recognition [8]. In addition, we have many other optimum tuning PID methods based on many random search methods such as genetic algorithm (GA) [9, 10], particle swarm optimization [11], and ant colony optimization [12].In this work, we developed the problem of design PID controllers as a multiobjective optimization problem taking in consideration the ant colony optimization algorithm (ACO). Researchers have reported the capacity of ACO to efficiently search for and locate an optimum solution. This method was mainly inspired by the fact that ants are able to find the shortest route between their nest and a food source.Ant colony optimization (ACO) [13, 14] is a recently developed metaheuristic approach for solving hard combinatorial optimization problems such as the travelling salesman problem TSP [15], quadratic assignment problem [16], graph coloring problems [17], hydroelectric generation scheduling problems [18], vehicle routing [19], sequential ordering, scheduling [20], and routing in Internet-like networks [21].Ant colony optimization algorithms are especially suited for finding solutions to difficult optimization problems. A colony of artificial ants cooperates to find good solutions, which are an emergent property of the ants’ cooperative interaction. Based on their similarities with ant colonies in nature, ant algorithms are adaptive and robust and can be applied to different versions of the same problem as well as to different optimization problems.The main traits of artificial ants are taken from their natural model. These main traits are as follows: (1) artificial ants exist in colonies of cooperating individuals, (2) they communicate indirectly by depositing (artificial) pheromone (stigmergic communication), (3) they use a sequence of local moves to find the shortest path from a starting position, to a destination point (i.e., the optimal solution to a given problem), and (4) they apply a stochastic decision policy using local information only (i.e., they do not look ahead) to find the best solution. If necessary in order to solve a particular optimization problem, artificial ants have been enriched with some additional capabilities not present in real ants.An ant colony of finite size searches collectively for a good solution to a given optimization problem. Each individual ant can find a solution or at least part of a solution to the optimization problem on its own but only when many ants work together they can find the optimal solution. Since the optimal solution can only be found through the global cooperation of all the ants in a colony, it is an emergent result of such this cooperation. While searching for a solution the ants do not communicate directly but indirectly by adding pheromone to the environment. Based on the specific problem an ant is given a starting state and moves through a sequence of neighboring states trying to find the shortest path. It moves based on a stochastic local search policy directed by its internal state (private information), the pheromone trails, and local information encoded in the environment (together public information). Ants use this private and public information in order to decide when and where to deposit pheromones. In most applications the amount of pheromone deposited is proportional to the quality of the move an ant has made. Thus, the more pheromone, the better the solution found. After an ant has found a solution, it dies, that is, it is deleted from the system.This paper is organized as follows: the implementation of ACO to design multiobjective optimization is developed in Section2. In Section 3, the effectiveness of this approach is tested, compared with other methods which are the standard method (Ziegler-Nichols), metaheuristique method (Genetic Algorithm), and ant system in the same section the construction of a Pareto optimal set of solutions, and the convergence graph in the ACO method are shown. Finally, some conclusions are given in Section 4.


## 2. Design PID Controller Using Multiobjective Ant Colony Algorithm

The series controllers are very frequent because of higher order systems. The transfer function of PID controller is defined for a continuous system as:(1)Gc(p)=Kp+Kis+Kds.
The design implies the determination of the values of the constants Kp, Ki, and Kd, meeting the required performance specifications.The textbook version of the PID controller in continuous time is(2)e(t)=r(t)-y(t),u(t)=Kpe(t)+Ki∫0te(τ)dτ+Kde(t)=up(t)+ui(t)+ud(t),
where e(t)=r(t)-y(t) is the difference between the reference signal r(t) and the output, y(t) of the controlled process.The PID controller is implemented to improve the dynamic response in addition to reduce or eliminate the steady-state error. To characterise the performance of the PID controller systems, we compute the indexes’ performance of the transient response such as rise time(tr), overshoot (Os), settling time (ts), the integral square error (ISE)….The problem is how to tune the parameters of the PID controllers using the multiobjective ant colony optimization as indicated in Figure1.Figure 1
PID control system.As shown in Figure3, the gains Kp, Ki, and Kd of the PID controller are generated by the multiobjective ACO algorithm for a given plant.In order to exploit the ACO algorithm, it would be better to represent our optimization problem by a direct way in the form of construction graph.The population is represented by100*3 matrix, where the ant select the optimum parameters Kp, Ki, and Kd of the PID control system by minimizing the objective function LA. The graph shown in Figure 2 illustrates the design PID problem using ant colony algorithm.Figure 2
Ant colony optimization graph.Figure 3
Comparison of step responses of theG1(s) plant.In this study, each parameter ofKp, Ki, and Kd is coded by 100 numbers (nodes), respectively. Therefore, only one node represents the optimum solution values of the parameters Kp, Ki, and Kd.The basic step in applying optimization method is to choose the optimization criteria that are used to evaluate fitness. Since the PID controller has many indexes performance of the transient response, then we can combine them into one objective function composed of the weighted sum of objectives.The objective function must be set:(3)LA=min⁡(ΦF),
where F=[f1f2f3f4f5f6f7]T: vector of objective functions, f1: setting time (ts), f2: overshoot (OS), f3: rise time (tr), f4: integral absolute error (IAE), f5: integral square error (ISE), f6: integral time absolute error (ITAE), f7: integral time square error (MSE), and Φ=[λ1λ2λ3λ4λ5λ6λ7]: vector of nonnegative weights.The goal of multiobjective optimization problems is to find the best compromise between multiple and conflicting objectives. Considering all objectives in these problems, there will be more than one solution that optimizes simultaneously all the objectives and there is no distinct superiority between these solutions. Usually there is not a single best solution being better than the remainder with respect to every objective. Therefore, we face with a set of solutions which are better than remainder solutions called the Pareto front. Among the feasible solutions, solutions belonging to the Pareto front are known as nondominated solutions, while the remainder solutions are known as dominated. Since none of the Pareto set solutions is absolutely better than the other nondominated solutions, all of them are equally acceptable as regards the satisfaction of all the objectives [22].ACO uses a pheromone matrixτ={τij} for the construction of potential good solutions. The initial values of τ are set  τij=τ0for all (i, j), where τ0>0.The probabilityPijA(t) of choosing a node j at node i is defined in (4). At each generation of the algorithm, the ant constructs a complete solution using (4), starting at source node.
(4)PijA(t)=[τij(t)]α[ηij]β∑i,j∈TA[τij(t)]α[ηij]β,ifi,j∈TA,
where ηij representing heuristic functions, α and β are constants that determine the relative influence of the pheromone values and the heuristic values on the decision of the ant, and TA: is the path effectuated by the ant A at a given time.The pheromone evaporation is a way to avoid unlimited increase of pheromone trails. Also it allows the forgetfulness of the bad choices:(5)τij(t)=ρτij(t-1)+∑A=1NAΔτijA(t),
where ΔτijA the quantity of pheromone on each path, NA: number of ants, ρ: the evaporation rate 0<ρ≤1.Implementation Algorithm
The proposed algorithm can be described by the following general algorithm.
BeginStep 1.
Initialize randomly a potential solutions of the parameters (Kp, Ki, Kd) by using uniform distribution.
Initialize the pheromone trail, and the heuristic value.
Initialize the Pareto set to an empty set.Step 2.
Place theAth ant on the node.
Compute the heuristic value associated in the multiobjectiveLA.
Choose the successive node with probability:(6)PijA(t)=[τij(t)]α[ηij]β∑i,j∈TA[τij(t)]α[ηij]β,ifi,j∈TA,
where ηij=1/Kj, j=[p,i,d]: representing heuristic functions, TA: is the path effectuated by the ant A at a given time.
The quantity of pheromoneΔτijA on each path may be defined as:(7)ΔτijA={Lmin⁡LA,ifi,j∈TA,0,else,
where LA is the value of the objective function found by the ant A. Lmin is the best solution carried out by the set of the ants until the current iteration.Step 3.
Use pheromone evaporation given by (5) to avoid unlimited increase of pheromone trails and allow the forgetfulness of bad choices:
(8)τij(t)=ρτij(t-1)+∑A=1NAΔτijA(t),
where  NA: number of ants, and  ρ: the evaporation rate 0<ρ≤1.Step 4.
Evaluate the obtained solutions according to the different objectives.
Update the Pareto archive with the nondominated ones.
Reduce the size of the archive if necessary.Step 5.
Display the optimum values of the optimization parameters.Step 6.
Globally update the pheromone, according to the optimum solutions calculated at Step5.
Iterate from Step2 until the maximum of iterations is reached.
End


## 3. Simulation Results

In this section, we presented the numerical results to improve the performance of the proposed solution algorithm.All the computation is implemented with Matlab/Simulink. The values of the parameters in ACO arem=500 (numbers of ants), α=0.5, β=0.5, ρ=0.5, and maximum generation = 300.In this study, we utilised two examples in order to illustrate the efficiency of the proposed algorithm.Example 1.
The performance of the algorithm developed was tested with three transfer functions with different order. The chosen performance criterion is often a weighted combination of various performance characteristics such as rise time, settling time, overshoot, and integral of the square of the error [24].
We chose the following objective function:(9)LA=min⁡(λ1f1+λ2f2+λ5f5).
The objective function here is f1: the setting time to measure the performance of the closed-loop system, f2: the overshoot, and f5: the integral square error that should be minimized.
Therefore the vector of weights isΦ=[1100100].
The closed loop PID controller cascaded with the process was tuned for the valuesKp, Ki, and Kd first by using the Ziegler-Nichols method [23], genetic algorithm [24], ant system [12] and then by our multiobjective ant colony algorithm. So that, the percent maximum overshoot, the settling time, the rise time, and the integral of the squared error were computed in both cases and given in Table 1.
In this table OS represents the percent maximum overshoot,ts is the 5 percent settling time, tr is the rise time, and ISE is the integral of the squared error.
The objective function used in [24] and [12] is defined using the performance indices: the response overshoot (OS), the 5% settling time ts, and integral of the square of the error (ISE).
As shown in results of Table1 and in all the cases tested, the value of the maximum overshoot is quite small, nearly zero percent and the values of the settling times, the rise time, and the integral of the squared error obtained by multiobjective ant colony optimization were much less than those values by the other methods.
The graphs of the obtained three-dimensional Pareto optimal fronts (the settling times, the overshoot, and the squared error) for the generated problem corresponding in each transfer function are depicted in Figures4, 7, and 10. So that, it is possible to find a well-distributed set of nondominated solutions along the Pareto optimal front.
Figures3, 6, and 9 show the step responses of G1(s), G2(s), and G3(s), respectively, which are ploted with the optimum values of the parameters Kp, Ki, and Kd obtained by the proposed algorithm. the results obtained by using Ziegler-Nichols, genetic algorithm, and ant system algorithm are presented for comparison.
In all cases, the proposed algorithm produces better responses than that obtained using the other methods. So, we can say that the multiobjective ant colony algorithm well improves the performance of the PID controllers.
Figures5, 8, and 11 report the evaluation of the objective function on the above three transfer functions. It is observed that the objective function value decreases substantially.
Initially, each parameter (Kp, Ki, Kd) is randomly and uniformly distributed with an average value which is equal to the value founded by Ziegler-Nichols of the transfer function G1(s), the search space of these parameters is shown in Figure 12.
After several iterations, the multiobjective ant colony algorithm generated the best solutions of the PID parameters(Kpbest,Kibest,Kdbest), the search space of these parameters is shown in Figure 13, it may be noted that these solutions are somewhat condensed.
After that, each parameter(KpbestKibestKdbest) is randomly and uniformly distributed with an average value which is equal to the value founded in the last generation, the multiobjective ant colony algorithm generated the optimal solutions (KpoptKioptKdopt), as shown in the Figure 14, and these solutions are more condensed than that found in the last generation.Table 1
Simulation results.
Ziegle-Nichols [23]Genetic algorithm [24]Ant system [12]Multiobjective ant colony optimizationG1(s)=e-0.5s/(s+1)2Kp=2.808Ki=1.712Kd=1.151f1: ts=4.78f2: OS=31.59%f3: tr=0.664f5: ISE=0.854Kp=2.391Ki=1.072Kd=1.458f1: ts=3.63f2: OS=5.84%f3: tr=0.676f5: ISE=0.797Kp=2.4911Ki=0.8158Kd=1.3540f1: ts=5.9f2: OS=4.95%f3: tr=0.701f5: ISE=0.809Kp=1.905Ki=0.903Kd=0.989f1:ts=3f2: OS=0%f3: tr=0.7f5: ISE=0.772G2(s)=4.228/(s+0.5)(s2+1.64s+8.456)Kp=2.190Ki=2.126Kd=0.565f1: ts=6.6f2: OS=16.46% f3: tr=0.8f5: ISE=0.785Kp=1.637Ki=0.964Kd=0.387f1: ts=5.97f2: OS=3%f3: tr=2.45f5: ISE=0.588Kp=2.517Ki=2.219Kd=1.151f1: ts=6.51f2: OS=16%f3: tr=0.627f5: ISE=0.684Kp=2.1604Ki=1.8546Kd=1.6920f1: ts=5.22f2: OS=0.09%f3: tr=2.54f5: ISE=0.448G3(s)=27/(s+1)(s+3)3Kp=3.072Ki=2.272Kd=1.038f1: ts=8.2473f2: OS=51.47%f3: tr=22.5f5: ISE=0.66Kp=1.772Ki=1.061Kd=0.772f1: ts=7.3959f2: OS=30.7%f3: tr=15.3f5: ISE=0.7311Kp=2.058Ki=1.137Kd=0.746f1: ts=7.0311f2: OS=19.82%f3: tr=8.9f5: ISE=0.708Kp=1.702Ki=1.061Kd=0.772f1: ts=6.973f2: OS=6%f3: tr=6.2f5: ISE=0.501Figure 4
Multiobjective optimization Pareto-sets of theG1(s) plant.Figure 5
Convergence graph in the ACO method of theG1(s) plant.Figure 6
Comparison of step responses of theG2(s) plant.Figure 7
Multiobjective optimization the Pareto sets of theG2(s) plant.Figure 8
Convergence graph in the ACO method of theG2(s) plant.Figure 9
Comparison of step responses of theG3(s) plant.Figure 10
Multiobjective optimization Pareto sets of theG3(s) plant.Figure 11
Convergence graph in the ACO method of theG3(s) plant.Figure 12
The initial search space of parameters (Kp, Ki, Kd).Figure 13
The Intermediate search space of parameters(Kpbest,Kibest,Kdbest).Figure 14
The final search space of parameters(Kpopt,Kiopt,Kdopt).


## 4. Conclusions

In this study, a tuning PID method based on the multiobjective ant colony optimization is developed for getting good performances and tunes the optimal PID parameters. In contrast to the single-objective algorithms, which try to find a single solution of the problem, the multiobjective technique searches for the optimal Pareto set directly. The aim of the multiobjective ACO algorithm is to determine the optimal solutions of the PID controller parameters by minimization the multiobjective function and to identify the Pareto optimal solution. This method is able to ind the optimum solution of the PID controller’s parameters (Kp, Ki, and Kd) that they allow to guarantee the performance of the system.Simulation results demonstrate that the new tuning method using multiobjective ant colony optimization has a better control system performance compared with classic approach, the genetic algorithms and ant system. The multiobjective ACO algorithm is able to undertake local search with a fast convergence rate. From the simulation study it has been found that this method converges to the global optimum.



---

*Source: 536326-2012-04-17.xml*