Tuning Pi Controller Bases on Chemical Reaction Optimization Algorithm

This paper we present Chemical Reaction Optimization (CRO) algorithm for determining optimal parameters of PI controller. The model of doubly fed induction generator (DFIG) is used as a plant in this paper. Tuning PI controller using traditional method such as Ziegler-Nichols (ZN) method usually produces large overshoot and Integral time absolute error, integral absolute error and integral square error performance indices. Therefore, recently researchers have applied random search approach such as genetic algorithm (GA) and particle swarm optimization (PSO) and Grey Wolf Optimizer (GWO) to find optimal parameters for PI controller. Among modern heuristics algorithm, CRO was introduced in 2010, it combines features of both GA and Simulated Annealing (SA) to find global minimum in search space. CRO has been applied to solve successfully many optimization problems such as: Minimum transportation cost, resource-constrained project scheduling problem, channel assignment problem in wireless mesh networks, standard continuous benchmark functions, and so on. In this paper we present to apply CRO algorithm to search optimal parameters for PI controller. The comparison between tuning PI controller by CRO and traditional Ziegler-Nichols method is presented. The simulation results show the advantages of PI tuning using CRO compared to traditional method in terms of performance index and setting time.


Introduction
Proportional Integral and Derivative (PID) controllers have been used in industrial control applications for a long time. This is due to its simplicity, low cost design and robust performance in a wide range of operating conditions. According to a survey in 1998, nearly 90% of the controllers used in industries are PID controllers [1]. By adding a derivative term in to Proportional Integral (PI) controller improves the stability of control loop. The combined effect of Proportional and Derivative (D) of controller introduces a predictive capability into the controller since D term is able to react to foreseeable future control errors. However, the use of derivative term in the controller has some negative effects.
It is necessary to protect actuators in case of step change of controller set point. Due to, this case the derivative would become infinitive value. Therefore, derivative term should only apply to controlled variable via a single derivative block. This solution is not applicable as such there is much noise in the measured controlled variable. Hence, the most suitable controller for power system is PI type controller. Here, a PI type controller is used to maximum power of DFIG. The proportional term does the job of fast acting correction which will produce a change in the output as quickly as the error arises. The integral action takes a finite time to act but has the capability to make the steady state error zero. Unfortunately, tuning the PI controllers is tedious and it might be difficult to tune the PI gains properly due to the nonlinearity and the high complexity of the system [2]. Therefore, beside traditional tuning method we need heuristic methods for tuning parameters of controller. Recently, random search algorithms are widely choose to solve nonlinear optimization problems. The categories of these algorithms do not require objective function has differentiable and continuous. Some random search algorithms use for tuning PI and PID controllers such as: GA [3,4,15], PSO [2,[11][12][13][14], GWO [10].
Among random search optimization, CRO is algorithm combines both features of GA and SA random search algorithms [6]. It is proposed by Albert Y. S. Lam and Victor O. K. Li in 2010. This algorithm applies successfully to maximize expectation clustering [5] and solve many problems such as Quadratic assignment problem, Resourceconstrained project scheduling problem, Channel assignment problem in wireless mesh networks, Population Transition Problem in peer-to-peer live streaming, Cognitive radio spectrum allocation problem, Grid scheduling problem, Standard continuous benchmark functions, Stock portfolio selection problem, Artificial neural network training and so on [6]. CRO is modern meta-heuristics for optimization problem. It simulates the nature of chemical reaction. When chemical reaction is in balance state, the substances produced are stable and have minimum energy. In other word, chemical reaction converts unstable substances to stable ones. In chemical point of view, the chemical reaction begins with some molecules with large energy react with each other through sequence of elementary reactions [6]. Finally, they transform to molecules with minimum energy for existence. This nature is implemented in CRO algorithm for solving optimization problems. In this paper, we use CRO algorithm to find global optimization for parameters of PI controller and compare result with tradition tuning method Ziegler-Nichols with respect to integral performance indices.

Pi Controller
Proportional Integral (PI) controller widely uses in power control system. PI often uses in close loop control system presented by figure 1. PI controller combines two features of P and I controller. P element instantaneous adjusts control variable proportionally to the error signal. This quite logical and it may be compared to the natural reaction of a process operator. The larger is the error signal the larger should be adjustment of control variable. One drawback of P term is any change in the operating conditions will result into an offset, which is a steady state deviation of controlled variable from the set point. To overcome this drawback P term is added to form PI controller. In PI controller the control variable is related to the error signal by equation (1).
This expression often writes in other form. (2) where is referred as the integral time constant or reset time of controller. The transfer function of PI controller can be written as flowing form: where K P , K I are proportional gain and integral gain respective. By tuning the two parameters in the PI controller algorithm, the controller can provide control action designed for specific process requirements. There are some traditional methods to determine K P , K I such as Ziegler -Nichols, CHR modification of the Ziegler -Nichols settings, Cohen-Coon controller settings, Lambda Tuning Technique, Haalman Controller Settings. In addition, there are some optimization methods widely used for tuning controller. In these methods the controller parameters are determined with a view to the minimization of a given integral performance criterion such as integral of the absolute error (IAE), integral of the square error [7] are listed below: In case of PI controller, error signal e (t) is function of K P , K I . We can choose one of integrals above as objective function for modern heuristic random search algorithms.

CRO Algorithm
CRO algorithm is modern meta-heuristic for optimization problem. It simulates the loosely couple of chemical reacts with optimization [6]. A chemical reacting system consists of the chemical substances and its environs. Each chemical material has potential and kinetic energies and energy of the environs are presented by central energy buffer [6]. The chemical reactions divide two type are endothermic which needs supply heat from environs to initialize the reaction process and exothermic which chemical substances release heat to the surroundings. To implement two type of chemical reactions in CRO by assigning initial buffer size: positive value means endothermic reaction and zero value means exothermic reaction. When the chemical reaction reaches balance sate, all chemical substances are stable and has minimum potential energy. CRO captures this phenomenon by converting potential energy to kinetic energy and by gradually releasing the energy of chemical molecules to the environs. CRO bases on four kind of elementary reactions are on-wall ineffective collision, decomposition, inter-molecular ineffective collision, and synthesis. Two ineffective collisions perform local search and the rest perform global search. Therefore, CRO mixtures two type of searching makes effective search of the global min in solution space. CRO combines advantage features of both SA and GA. The energy conservation requirement gives similar effects of the Metropolis Algorithm used in SA while the decomposition and synthesis operations share similarities with the crossover and mutation operations of GA. When the number of molecules is small, CRO is more like SA. When some crossover and mutation operators are implemented in decomposition and synthesis, CRO performs more like GA [6]. CRO simulates each solution for given problem by a molecule. Each molecule has some essential properties such as molecular structure (ω) presents for a solution of given problem, potential energy (PE) is objective function value corresponds given solution presented by ω, kinetic energy (KE), number of hit (NumHit) count number of collision the molecule has been taken. When molecule undertakes a collision with wall of container or other molecule, one of elementary reaction will happen and may make a change in molecular structure (change solution). Other attributes of molecule include minimum structure (MinStruct) stores molecular structure that has minimum objective function value, minimum potential energy is PE value when molecule reaches its minimum structure. The last property of molecule is minimum hit number (MinHit) that is number of hit the molecule achieves MinStruct. There are four elementary reactions implemented in CRO including [6]: On-wall ineffective collision: This reaction happens when a molecule collides with the wall of container. This reaction changes structure of molecule from ω to ω ' (neighborhood of ω) drives energy changes. In addition, a portion of kinetic energy of transformed molecule is released to central energy buffer (buffer). Let KElossRate denotes a parameter of CRO and its value lies in range 0 to 1, and k is random number generated from KElossRate to 1. The kinetic energy of transformed molecule can be calculated by the equation (8) below: , -. , + , − . , -× 0 Where . , -1 2 3 with f is objective function. Remaining energy is released to buffer is determined as . , + , − . , -× 1 − 0 and condition of energy conservation holds: . , + , ≥ . , - Decomposition: This elementary reaction take places when molecule hits a wall of container and then breaks into several parts (this case we consider 2 part for simple). It means that we change a solution with two new ones. In other word decomposition permits system search another region of solution space after enough local searches by taking On-wall ineffective collision. To be satisfied condition of energy conservation then inequality (10) must hold: . , + , + 5 × 5 + × 6 11 7 ≥ . , 8 -+ . , 9 -(10) where: 5 , 5 + are random numbers generated from 0 to 1 and 2 3 , 2 + 3 are produced from ω.
If inequality (10) is hold then we replace existing molecule with ω by two new ones with ℎ 2 3 <= 2 + 3 respectively and their kinetic energy can be determined by formula (11) where 5 A is random number generated from 0 to 1. and buffer is assigned new value by: 6 11 7 6 11 7 − 5 × 5 + × 6 11 7 1 − 5 × 5 + × 6 11 7 Inter-molecular ineffective collision: This reaction happens when two molecules collide with each other produced two new ones. The conservation energy can be expressed by (15) . , 8 + . , 9 + , 8 + , 9 ≥ . , 8 -+ . , 9 -(15) If (15) is satisfied then two old molecules are replaced by two new ones and their kinetic energy can be calculated as following: >?@ B. , 8 + . , 9 + , 8 + , 9 C − . , 8 -+ . , 9 - The CRO algorithm processes in three steps. The first step is initialization. In this step we initialize parameters of algorithm which include: PopSize is number of molecules, each one's structure represents for a solution of given problem; KElosssRate; MoleColl is the parameter decides mono-molecular collision or inter-molecular collision. If we generate random number in range of zero to one is greater than MoleColl then mono-molecular collision take places. Otherwise, inter-molecular collision happens; buffer is initial energy of environs; InitialKE is initial kinetic energy of each molecule; δ and θ are parameters relate decomposition and synthesis reaction. If inequality (21) meets then decomposition take places and if inequality (22) is satisfied then synthesis happens.
The next step of algorithm is iteration. In this step we make sequence of sub steps. First we generate random number c belongs the range from zero to one then check if it is greater than MoleColl or system has only one molecule then we have mono-molecular collision. Otherwise, we have inter-molecular collision. In case of mono-molecular collision we choose randomly one molecule from system and check condition (21) on it. If it meets we perform decomposing. Otherwise, we perform on-wall ineffective collision. For inter-molecular collision, we also randomly choose two molecule from system then check condition (22) on each molecule. If both molecules are satisfied then we perform synthesis reaction on them. Otherwise, we perform inter-molecular ineffective collision reaction. After performing an elementary reaction, we check conversation energy condition is met. If not meet then the change is canceled. Next, we check objective function value of any new solution. If it is better than best solution so far then we update the best solution. Last step we check stopping criterion. If it is satisfied then we move to final step. Otherwise, we will start new iteration.
The final step, we find best solution for given problem and its objective function value.
Summarizing, the CRO algorithm can be expressed by flowchart as figure 2.

Tuning PI Controller
This article we apply oldest tradition method is Ziegler Nichols for tuning PI controller and our proposal method using CRO algorithm for finding optimal parameters of PI controller so that minimum integral performance indies. NN method was proposed by John Ziegler and Nathaniel Nichols in 1942 and is still a simple and fairly effective PI tuning method. Ziegler and Nathaniel Nichols proposed two methods for tuning PI controller. The first method applies for process model type of first order system with transport lag. Which has step response likes figure 3 [8]. From this response we can estimate delay time L, constant time T and state value K. Then K P and K I of PI controller can be calculated by equation (23) and (24) following: The second of ZN method for tuning PI controller as flowing step: Decrease integral gain to zero (disable integral effect) Increase proportional gain from zero to ultimate value K u at which oscillations occur with period T u .
From estimated K u and T u , we can calculate parameters of PI controller as: To apply CRO for finding optimization of PI controller, we can choose one of integral performance index listed in (4) -(7) as objective function. In our case we choose integral of time absolute error (ITAE) as objective function. We encode K P , K I as molecule structure (solution) and then we run CRO algorithm to search global min of ITAE. When stopping criterion is satisfied we obtain optimal parameters of PI controller.

Simulation
To test our proposal method we consider model of DFIG is described by system equation (27) We apply PI controller to the system so that maximize active and reactive power when win speed changes and principal of control system can be expressed by figure 4. We use traditional tuning method and our proposal method to specify K P and K I of PI controller for the model and we obtain results are described in table 1. To compare performance of tradition and our proposal method we use step change of wind speed which is initially set to 5m/s, suddenly changes to 6m/s at 3s lasts until 6s and change to 7 m/s extends to 9s, corresponding to rotor current changes from -5.65A to -9.47A at 3s and to -15.30A at 6s [9]. Figure  5 and 6 show step response of system with PI controller tuned by traditional and CRO methods.

Figure 5.
Step response of the system with traditional tuning method.

Figure 6.
Step response of the system with CRO tuning method.

Conclusions
In this paper, we present traditional rule and meta-heuristic random search algorithm CRO for tuning PI controller. CRO combines advantages of both GA and SA algorithm to find global optimal solution for given problem. To test performance of applying CRO for tuning PI controller, we perform simulation on DFIG model. We choose ITAE as objective function and encode K P , K I as molecule structure. The CRO algorithm found optimal parameters for PI controller. From the simulation results show that our proposal method is better than classical rule with respect to performance integral indices and setting time. In the future, we are going to compare performance of our proposal method with other optimization algorithms such as GA and PSO.