# Genetic algorithm Based Tuning of PID and Fuzzy controller for first order plus dead time system

Text Only Version

#### Genetic algorithm Based Tuning of PID and Fuzzy controller for first order plus dead time system

Genetic algorithm Based Tuning of PID and Fuzzy controller for first order plus dead time system

Ganeshan M

Dept. of electrical and electronics engineering Dr.Mahalingam College of engineering and technology Pollachi,

ganeshanm21@gmail.com

Karthik kumar R

Dept. of electrical and electronics engineering Dr.Mahalingam College of engineering and technology Pollachi,

mailtokarthik1290@gmail.com

AbstractGenetic algorithms are widely used in industries for the optimization problems. The PID controller whose performance is greatly depends on the proportional gain (kp) integral gain (ki), derivative gain (kd).our design method aims on minimizing Integral Time Absolute Error. We carry out simulation of the single tank level system which has considerable delay time. This paper attempts to study about the performance of the Genetic Algorithm in the selection of suitable controller parameter. It is noted that the optimization of the controller parameters improve the performance of the controller in regulatory as well as in servo analysis.

KeywordsGenetic Algorithm; first order plus dead time proces;PID; ITAE criterion

1. PID CONTROL SYSTEM

The PID Controller consists of proportional, integration and derivative gains. Due to the easy understanding and simple structure it is most widely used controller in industries. It is well known that many of the process in the industries are away from the optimal point of operation Astrom and hagglund indicate that one of the most important fact is to choose the adequate control technique. In this sense, several works has developed with the aim to improve the behavior and consequently make the process more optimal .PID control is the most common solution for practical control systems, non-linear control systems. The differential equation of PID controller is given by following equation.

There are several indexes are available, those criterions are ISE (Integral Square Error), IAE (Integral Absolute Error), ITAE Integral Time Absolute Error) and MSE (Mean Square Error) .

It is observed that among these above mentioned performance indexes the ITAE is best index that has more sensitivity than other indexes .hence the objective function of genetic algorithm is chosen as the function of ITAE in order to get the smoother response for the process plant.

III. OVERVIEW OF GENETIC ALGORITHM

Due to their powerful optimization property genetic algorithms are studied widely in the optimization techniques and also GA is able to give the solutions for highly complex search space. And GA is an abstraction from the theory of biological evolutions. And it was invented by John Holland (University of Michigan) in the 1960s.GA consist of following steps generating random population of n chromosomes, evaluate the fitness of each chromosomes and creating new population by selection, crossover and mutation.

• Initialize the setting of GA parameters and generate an initial random population of individuals. We implemented the genetic algorithm with small population size. In this paper we took the population size as 50.crossover rate Pc =0.9. And mutation rate Pm=0.01.And the number of generation is taken as 50.

u(t) k

e(t) T D 1e(t) T

De(t)

(1)

• The initial population is set by encoding the controller

p i d

Where kp,Ti,Td are the parameters that are to be chosen according the process. The determination of these three parameters is called as tuning of the controller. There are several methods are available to obtain the values of gain of the controller .it is necessary to optimize the parameter the parameters in order to achieve best control over the process. In literature there are several number of optimization techniques are studied. The Genetic Algorithm is one of the popular optimization technique employed in the optimization problems.

2. PERFORMANCE INDEX OF CONTROLLER

A. selecting a best index

The controllers performance is evaluated from several indexes. The selection of this index depends on the process.

parameters into binary strings known as chromosome.

The length of the strings depends on the required precision.

• Evaluate the fitness of each chromosome is carried out in this stage. The fitness of each chromosome is evaluated by converting its binary string into a real value which represents the PID parameter.

• After the fitness calculation the selection and cross over and mutation is carried out. All chromosomes will go through the selection process based on their fitness value.

• The tournament selection is considered to be better selection process because it offers good selection than the other selection process. After the selection process the individual with the higher fitness value is made to undergo the crossover process. And generations are

continued till the stopping condition is reached. The following flow graph explains the GA approach toward the tuning of PID.

Fig.1. Genetic algorithm approach in tuning PID

1. OVERVIEW OF FUZZY CONTROLLER

In a fuzzy logic controller, the control action is determined from the evaluation of a set of simple linguistic rules. The development of the rules requires an exhaustive understanding of the process to be controlled, but it does not require a mathematical model of the system. A fuzzy inference system (or fuzzy system) fundamentally consists of a formulation of the mapping from a given input set to an output set utilizing fuzzy logic. This mapping process provides the substructure from which the inference or conclusion can be made. A fuzzy inference process consists of the following steps

• step 1:Fuzzification of input variables

• Step 5: Defuzzification (COA).

• After the selection process the individual with the higher fitness value is made to undergo the crossover process.

Fig.2.Membership Functions for Input- Error Variables

Fig.3. membership functions for input-change in error Variables

Fig. 4.Gaussian Membership Functions for Output Variable

The same genetic algorithm is applied to the fuzzy logic controller. The membership function is made to optimized by the genetic algorithm. The parameters range that we give in the fuzzy controller will have direct impact on the performance of the controller. The objective function that is given for optimizing the fuzzy controller parameter is made as the function of ITAE.

• Step 2: Application of fuzzy operator (AND,OR,NOT) in the IF(antecedent) part of the rule

J (t)

f (ITAE)

(2)

• Step 3: Implicative insinuation from the antecedent to the consequent(THEN part of the rules)

• Step 4: Aggregation of the consequents across the rules

The rule list of the fuzzy controller is given in the following table. It is obvious that the formation of rules in the controller is also can be optimized by the genetic algorithm.

TABLE I. RULE LIST

 E/CE N Z P N N N Z Z N Z P P Z P P

The simulation model of the system by using Fuzzy controller is shown in the follwing diagram. The transfer function of the process is derived by open loop method. And the obtained transfer function of the system is given in following equation.

G(s)

1

11.4s 1

(3)

And identified that the system have the delay time of 7 seconds.

Fig.5. Simulink model of the system

1. FUZZY GA

The choice of the fuzzy controllers membership function is very consequential to derive optimum performance. The performance of a fuzzy classification system predicated on fuzzy IF-THEN rules depends on the choice of a fuzzy partition. If a fuzzy partition is too coarse, the performance may be low as many patterns may be misclassified. If a fuzzy partition is too fine, many fuzzy IF-THEN rules cannot be engendered because of a lack of patterns in the corresponding fuzzy subset. The involution and speed of the fuzzy inference system withal increases with the size of the rule base. The design of MFs is mainly accomplished iteratively, by tribulation and error, or by experts. In this paper, the GA has been applied to engender MFs that function optimally. The GA is essentially a search algorithm inspired by the process of natural evolution.

The following flow graph explains the genetic algorithm based parameter selection of Fuzzy controller. The range of each variable is given by the genetic algorithm and each chromosome is evaluated to determine the fitness. And then the GA operations is carried out on the selected individuals.

Fig.6.GA based Fuzzy Controller

It is a method for solving an optimization quandary through a search procedure. In the design of a fuzzy controller, the MFs control the degree to which a particular rule fires and, hence, there is an interdependent relationship between the fuzzy MFs and the rule base. The GA can be habituated to derive the fuzzy MFs and their partitioning . A fuzzy GA is a directed arbitrary search over all fuzzy subsets of an interval. The controller performance on the different load is studied and presented in following table. it is observed that the fuzzy controller performs better than the PID as fuzzy controller has the inherit advantage of specifying the parameter range instead of crisp set of values.

Fig.7. Performance of Fuzzy Controller

The PID controller also made to undergo the test of set point tracking .the following diagram is obtained by simulating the set point change variation of 0 to 10 by using random reference.

Fig.8. Performance of PID Controller

We also studied the ancient methods to tune the PID controller such as Ziegler-Nichols tuning. It is noted that the tuning of PID by this method is not gives an optimal operation with the lower values of performance indexes The technique, developed more than 50 years ago, has been used extensively to tune loops in the process industries. The original Ziegler- Nichols tuning rules were designed to provide a quarter amplitude damped response to a load disturbance. Once considered ideal, the under damped and oscillatory nature of Ziegler-Nichols tuning has been criticized for destabilizing control loops, i.e. increasing variability instead of reducing it. The following steps are followed to tune the PID controller by using the Good Gain-tuning method.

• Bring the process to or close to the normal or specified operation point by adjusting the nominal control signal u0 (with the controller in manual mode).

• Ensure that the controller is a P controller with Kp = 0 (set Ti = and Td = 0). Increase Kp until the control loop gets satisfactory stability as seen in the response in the measurement signal after e.g. step in the set point or in the disturbance (exciting with a step in the disturbance may be impossible on a real system, but it possible in a simulator). If you do not want to start with Kp = 0, we can try Kp = 1 (which is a good initial guess in many cases) and then increase or decrease the Kp value until you observe a slight overshoot but a well damped response.

• Set the integral time Ti equal to

controller parameters, leads to a significant improvement in the dynamical response of the system under control and preserves the good performances in the existent of different process types. The simulation results indicate that the presented approach works effectively, and provides a good relation between the objective function that optimizes the PID controller and dynamic response of the system to be controlled and also the fuzzy controller that tuned by genetic algorithm also shows improved performance. Despite the PID controller GA based Fuzzy controller works good with minimum deviations in the set point tracking Hence, the presented method seems to be particularly appropriate to adopted in different process types.

REFERENCES

1. Astrom K.J.,&Hagglund,T(2009).Advanced pid control.pearson Education.

2. Yogendra kumar soni, BF-PSO Optimised PID controller design using ISE,IAE,IATE and MSE error creteria International journal of advanced Research in Computer Engineering and Technology.volume 2 issue 7, july 2013.

3. Ma Teo Lian Seng, Tuning of a Neuro-Fuzzy Controller by Genetic Algorithm, IEEE Transactions on systems, man, and cyberneticspart b: cybernetics, vol. 29, no. 2, april 1999.

4. Homaifar A and McCormicE., Simultaneous design of membership functions and rule sets for fuzzy controllers using genetic algorithm, IEEE Transactions on Fuzzy System, vol. 3, no. 2, 1995.

5. Chen Y.M and ConnellR. M. O. Active power line conditioner with neural network control, IEEE Transactions on Industrial Applications, vol. 33,

6. SureshMikkili and Anup Kumar Panda PI and Fuzzy Logic Controller Based 3-Phase 4-Wire Shunt Active Filters for the Mitigation of Current Harmonics with the Id-Iq Control Strategy Journal of power system, No.6. 2011.

7. Anup Kumar Panda, Suresh Mikkili FLC based shunt active filter (p qandIdIq) control strategies for mitigation of harmonics with different fuzzy MFs using MATLAB and real-time digital simulator Elsevier Electrical Power and Energy Systems 47 313336. 2013.

8. P. Karuppanann, Kamala KantaMahapatra(2012) PI and fuzzy logic controllers for shunt active power filter A reportElsevierISA Transactions 51667671.

9. Parmod Kumar Alka Mahajan Soft Computing Techniques for the Control of an Active Power Filter IEEE Transactions on Power Delivery, vol. 24, no. 1. 2009.

Ti 1.5 *Tou

(4)

Where Tou is the time between the first overshoot and the first undershoot of the step response (a step in the set point) with the P controller.

The value of the PID controller parameter is given by the above equation is given in the simulation and the simulation is carried out by set point change in the process. The Good Gain method produces the high overshoot than the GA tuned PID.

1. CONCLUSION

In this paper, an efficient and effective tuning approach based on a genetic algorithm is presented to obtain the optimal PID controller parameters and Fuzzy controller parameters. The use of the genetic algorithm, in conjunction with a systematic neighborhood structure for the tuning of the PID